>Hi,
>       Im trying to compile a program that uses alsa lib 0.9 and since by just
> 
>including alsa/asoundlib.h it doesnt give the compiler a valid definition of 
>the snd_pcm_hw_params_t Im wondering what else I have to include for my 
>program to compile.

its an opaque type. you can only declare a pointer to it, then call
the functions to allocate one and release it:
    

snd_pcm_hw_params_t *hw_params;
snd_pcm_sw_params_t *sw_params;

snd_pcm_hw_params_malloc (&hw_params);
snd_pcm_sw_params_malloc (&sw_params);

snd_pcm_hw_params_free (&hw_params);
snd_pcm_sw_params_free (&sw_params);

there are also stack-based alloca functions too, for params objects
that only need exist for a single function scope.

snd_pcm_hw_params_alloca (&hw_params);
snd_pcm_sw_params_alloca (&sw_params);

this design is there to ensure binary compatibility in future versions
of ALSA should the nature of the structs change.

--p

_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to