[alsa-devel] XRUN happens too often.
clemens at ladisch.de
Thu Apr 10 08:41:40 CEST 2008
> buffer size = 9408 frames
> A sample in 16-bit, two channels is 4 bytes.
> I allocate a audio data of 9408x4=37632 bytes.
> This audio_data buffer will receive audio data from the network.
> If this buffer is full, I use snd_pcm_writei( ) to put the buffer into the pcm.
When this buffer is full, the device buffer is completely empty,
and even the slightest delay will result in an underrun.
Write data to the device buffer immediately when you receive it.
More information about the Alsa-devel