[alsa-devel] Changing the sample rate/channels of an already opened PCM stream

Clemens Ladisch cladisch at fastmail.net
Tue Jun 19 07:59:42 CEST 2007


Ed Schouten wrote:
> I have been trying to get the device to reset so I can change the sample
> rate, but for some reason, it just gets ignored. Can someone explain me
> how it's possible to reset the sample rate after preparing the handle?

The various snd_pcm_hw_params_set_xxx() functions choose some value for
a parameter that has not yet been set, but they do not change a
parameter once it has been set.  To reset all parameters in a hw_params
container, call snd_pcm_hw_params_any() again.


HTH
Clemens


More information about the Alsa-devel mailing list