output/Thread: don't wake up the player after receiving command in Play()

If we have a pending command, then the player thread is already awake.
Even if not, we'll wake it up as soon as we have finished the command.
This commit is contained in:
Max Kellermann 2016-12-13 22:17:06 +01:00
parent 6fcddaf8fa
commit 92eeb4969f

View File

@ -493,7 +493,10 @@ AudioOutput::Play()
in_playback_loop = false;
};
while (chunk != nullptr && command == Command::NONE) {
while (chunk != nullptr) {
if (command != Command::NONE)
return true;
if (!PlayChunk(chunk))
break;