Commit 52a06531 authored by Warren Dukes's avatar Warren Dukes

dmix fix, don't call snd_pcm_drain unless we're already in the RUNNING

state (when users press stop, previous snd_pcm_drop(), then snd_pcm_drain() was called. this would lockup dmix) git-svn-id: https://svn.musicpd.org/mpd/trunk@6517 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent df95a80f
......@@ -370,7 +370,9 @@ static void alsa_closeDevice(AudioOutput * audioOutput)
AlsaData *ad = audioOutput->data;
if (ad->pcmHandle) {
snd_pcm_drain(ad->pcmHandle);
if (snd_pcm_state(ad->pcmHandle) == SND_PCM_STATE_RUNNING) {
snd_pcm_drain(ad->pcmHandle);
}
snd_pcm_close(ad->pcmHandle);
ad->pcmHandle = NULL;
}
......
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