external PCM plugin, can't read hw params

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

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux