Re: How to get set/fixed sample rate of ALSA device?

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

 



> "Current sample rate" only has meaning with the device open , and if I
> understand you right, a "cat /proc/asound/card0/pcm0{p,c}/sub0/hw_params
> will then get you what you want as to the "get" part (substitute for 0 in
> the above as required).

I actually meant what kind of sample rate is set in sound card. For
example, my onboard sound card has fixed Hz. I would like to know such
information _before_ I touch sound card :)

So you suggest to open device via any means and then read that file? I
did this and it works.
I guess I can even try to implement it in app and check for sample
rate everytime before I play.

But is this only solution? It's rather hack, and I would like to have
more reliable method.

P.

> As to the set, you'd open it with different parameters, and you then
> supposedly know what they were, I guess...
>
> Rene.
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux