Commit 4dc25d39 authored by Jeffrey Middleton's avatar Jeffrey Middleton

alsa_plugin.c: workaround snd_pcm_drain bug

Reintroduce a fix from commit 52a06531 (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).
parent 0f9f82f2
...@@ -500,6 +500,7 @@ alsa_drain(void *data) ...@@ -500,6 +500,7 @@ alsa_drain(void *data)
{ {
struct alsa_data *ad = data; struct alsa_data *ad = data;
if (snd_pcm_state(ad->pcm) == SND_PCM_STATE_RUNNING)
snd_pcm_drain(ad->pcm); snd_pcm_drain(ad->pcm);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment