Bo-liang Guan wrote:
> Hi all
>
> I'd like to get the current sample rates. I know that the ioctl
> "SNDCTL_DSP_SPEED" could
> set the sample rates, but i can't find the ioctl to get the sample
> rates. Can anybody tell me.
>   
This is very simple. You should store the sample rate in a local
variable after setting it. The rate is returned by SNDCTL_DSP_SPEED in
the argument variable after the call.

It is possible to query the sample rate by setting the argument variable
to 0 before calling SNDCTL_DSP_SPEED. However it doesn't make any sense
to do this.Applications must always set the sample rate before using the
device.

Best regards,

Hannu
_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to