pyalsaaudio icon indicating copy to clipboard operation
pyalsaaudio copied to clipboard

How to check card state (number of channels, current rate)

Open mzakharo opened this issue 3 years ago • 1 comments

In light of PCM.setchannels(nchannels) and PCM.settrate(rate) API depreciation, there is a usecase for getchannel() and getrate() API, since it is useful to know if the rate\channel configuration, set during PCM() object construct was actually applied by the card.

Right now, one can just check the return value of PCM.setchannels(nchannels) and PCM.settrate(rate) to see if configuration issue has occurred.

mzakharo avatar Jul 23 '22 19:07 mzakharo

pcm objects actually have info() and dumpinfo() functions that provide the data you're looking for. they are just missing from the documentation ...

ossilator avatar Aug 05 '22 10:08 ossilator