[alsa-devel] external PCM plugin, can't read hw params
Hi,
This is during the init call-back of an external PCM plugin.
I'm trying to read the period size. The code is pretty basic, it looks like this:
--------------- snd_pcm_hw_params_alloca(&hw); status = snd_pcm_hw_params_any(ext->pcm, hw); if (status < 0) { // some error handling }
status = snd_pcm_hw_params_get_period_size(hw, size, NULL); if (status < 0) { // some error handling } --------------
I get size = 0 back, an no errors either. Other information that I needed, such as the rate & format are available in the ext structure, but not the period size. So I query the hw params of ext->pcm. Please let me know if I should be getting this information using a different way.
alsa-lib version is 1.0.14a
I've done something similar for alsa-lib verion 1.0.13 (I used snd_pcm_hw_params_current() call) which worked. This is based on that same code but for a different target.
Thank you, Ben
____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
participants (1)
-
Ben C