Commit 5e1deab0 authored by J. Alexander Treuman's avatar J. Alexander Treuman

decode: close audio device after initial open if paused

Currently, if we start decoding while the pause flag is set, we open the audio device and leave it opened, blocking other apps from using it. The obvious thing to do is to not open the audio device if the pause flag is set, but the open call also sets the audio format. Therefore I'm leaving the open call in, and just closing it immediately afterwards if the pause flag is set. git-svn-id: https://svn.musicpd.org/mpd/trunk@6745 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent d2862948
......@@ -125,6 +125,10 @@ static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af)
quitDecode(pc,dc); \
return; \
} \
if (pause) { \
dropBufferedAudio(); \
closeAudioDevice(); \
} \
pc->totalTime = dc->totalTime; \
pc->sampleRate = dc->audioFormat.sampleRate; \
pc->bits = dc->audioFormat.bits; \
......
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