From 154170e4755fc53c56652a32b13d82db21ff7c2d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Jul 2020 15:08:58 +0200 Subject: [PATCH] output/osx: clear `pause` flag only after successful AudioOutputUnitStart() --- src/output/plugins/OSXOutputPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index fa65fa437..e87c5c3db 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -762,12 +762,12 @@ OSXOutput::Play(const void *chunk, size_t size) { assert(size > 0); if (pause) { - pause = false; OSStatus status = AudioOutputUnitStart(au); if (status != 0) { AudioUnitUninitialize(au); throw std::runtime_error("Unable to restart audio output after pause"); } + pause = false; } #ifdef ENABLE_DSD if (dop_enabled) {