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
This commit is contained in:
parent
d286294805
commit
5e1deab05f
@ -124,7 +124,11 @@ static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af)
|
||||
ERROR("problems opening audio device while playing \"%s\"\n", pc->utf8url); \
|
||||
quitDecode(pc,dc); \
|
||||
return; \
|
||||
} \
|
||||
} \
|
||||
if (pause) { \
|
||||
dropBufferedAudio(); \
|
||||
closeAudioDevice(); \
|
||||
} \
|
||||
pc->totalTime = dc->totalTime; \
|
||||
pc->sampleRate = dc->audioFormat.sampleRate; \
|
||||
pc->bits = dc->audioFormat.bits; \
|
||||
|
Loading…
Reference in New Issue
Block a user