[alsa-devel] Problem when using silence 'trick'
clemens at ladisch.de
Mon Feb 28 09:34:14 CET 2011
Bryan Ischo wrote:
> [...] when I use the "default" device with my silence
> technique, I have no problem playing multiple audio streams
> simultaneously by opening the "default" device multiple times and
> simultaneously playing streams into the different devices. BUT,
> whenever I cannot deliver audio fast enough to a stream, and the silence
> trick takes over and the stream plays some silence - boom, the device
> goes silent forever.
I tried to reproduce this with mplayer (which uses the same technique),
Have a look at mplayer's ALSA output driver here:
It regularly calls get_delay() before writing samples, and there uses
snd_pcm_forward() to catch up if an underrun has occurred.
> My apologies for sending this to the wrong mailing list. When I read
> that alsa-devel was for "work on ... an ALSA application", I assumed
> that this was any application; but now I realize that it is probably for
> official ALSA tools, not general third party applications that are not
> associated with the ALSA project.
This list is correct for questions about the ALSA API.
More information about the Alsa-devel