ALSA buffer overrun causes program exit
When a sound device is active, data is transferred continuously between the hardware and application buffers. In the case of data capture (recording), if the application does not read the data in the buffer rapidly enough, the circular buffer is overwritten with new data. The resulting data loss is known as overrun. During playback, if the application does not pass data into the buffer quickly enough, it becomes starved for data, resulting in an error called underrun. The ALSA documentation sometimes refers to both of these conditions using the term XRUN. Properly designed applications can minimize XRUN and recover if it occurs.
When the buffer underrun happens, GAPK stops processing with the following message:
[+] PQ: Adding ALSA output (dev='default', blk_len=320)
[!] pq_execute(): abort, item returned -1
[+] Processed X frames
The snd_pcm_prepare() should be called to recover pcm_handle from buffer underrun state.
#2 Updated by fixeria over 1 year ago
- Status changed from New to Feedback
- % Done changed from 90 to 100
Should be fixed by: http://lists.osmocom.org/pipermail/openbsc/2017-September/011092.html