Commit 154170e4 authored by Max Kellermann's avatar Max Kellermann

output/osx: clear `pause` flag only after successful AudioOutputUnitStart()

parent fb83936f
...@@ -762,12 +762,12 @@ OSXOutput::Play(const void *chunk, size_t size) ...@@ -762,12 +762,12 @@ OSXOutput::Play(const void *chunk, size_t size)
{ {
assert(size > 0); assert(size > 0);
if (pause) { if (pause) {
pause = false;
OSStatus status = AudioOutputUnitStart(au); OSStatus status = AudioOutputUnitStart(au);
if (status != 0) { if (status != 0) {
AudioUnitUninitialize(au); AudioUnitUninitialize(au);
throw std::runtime_error("Unable to restart audio output after pause"); throw std::runtime_error("Unable to restart audio output after pause");
} }
pause = false;
} }
#ifdef ENABLE_DSD #ifdef ENABLE_DSD
if (dop_enabled) { if (dop_enabled) {
......
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