Re: Using snd_pcm_set_params() on a capture handle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Erik de Castro Lopo wrote:
> Clemens Ladisch wrote:
>> Erik de Castro Lopo wrote:
>>>     RATE: [44100 96000]
>>
>> snd_pcm_set_params() should have chosen a single rate.
>> Did you dump this after that call?
>
> Yep, the code is:
>
>     snd_pcm_set_params (capture_handle, format, SND_PCM_ACCESS_RW_INTERLEAVED, 2, rate, 0, 25000))
>     snd_pcm_hw_params_any (capture_handle, hw_params)
>     snd_pcm_hw_params_dump (hw_params, output) ;

snd_pcm_hw_params_any() gets a _new_ set of parameters.  You would use
it when you want to configure the device for the first time, or when you
want to reconfigure it from scratch.

To get the current parameters of the device, use snd_pcm_hw_params_current().


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux