alsa_plugin.c: workaround snd_pcm_drain bug
Reintroduce a fix from commit 52a0653
(Warren Dukes): "don't call
snd_pcm_drain unless we're already in the RUNNING state". This prevents
ALSA with dmix from sometimes hanging when snd_pcm_drain is called, e.g.
when moving from one song to the next (as in mantis issue 2634).
This commit is contained in:
parent
0f9f82f227
commit
4dc25d3908
|
@ -500,7 +500,8 @@ alsa_drain(void *data)
|
|||
{
|
||||
struct alsa_data *ad = data;
|
||||
|
||||
snd_pcm_drain(ad->pcm);
|
||||
if (snd_pcm_state(ad->pcm) == SND_PCM_STATE_RUNNING)
|
||||
snd_pcm_drain(ad->pcm);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue