[alsa-devel] Broken playback

Clemens Ladisch cladisch at fastmail.net
Thu Nov 22 09:14:26 CET 2007


Gabriele Melia wrote:
> > snd_pcm_hw_params_set_buffer_size_near(), but the allowed values are
> > hardware dependent. You might want to add your own circular buffer that
> > is bigger than ALSA's.
>  
> So your suggestion is to limit my buffer_size after decode to be same of
> ALSA's?

No; my suggestion is to use your own buffer which is big enough for your
decoder, and use this buffer to fill ALSA's buffer, whenever possible.

If one call to your decoder function needs so much time that ALSA's
buffer can become emptied, you need another thread to re-fill the ALSA
buffer in parallel with the decoding.


Regards,
Clemens


More information about the Alsa-devel mailing list