7 Sep
2011
7 Sep
'11
11:24 p.m.
I know that http://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg24794.htmlgiv... code to get the available sample rates (among other things). However, my quest is to get the actual HW sample rate. This code is quite helpful. I know that if a sound is already playing, I can look at /proc/asound/card0/pcm0p/sub0/hw_params to see what the HW sample rate is. But is there a way to get this using ALSA?
In my application, we want to know the actual HW rate so that we can do the sample rate conversion ourselves upfront and therefore we want to avoid yet another sample rate conversion when playing out the audio. (The application can synthesize audio and we can select the sample rate for the synthesis.)
Thanks,
Ray