22 Nov
2007
22 Nov
'07
9:14 a.m.
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