diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index 10cf419e9..6d5bb3a23 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -667,7 +667,8 @@ OSXOutput::Disable() noexcept void OSXOutput::Close() noexcept { - AudioOutputUnitStop(au); + if (started) + AudioOutputUnitStop(au); AudioUnitUninitialize(au); delete ring_buffer; } @@ -821,7 +822,11 @@ bool OSXOutput::Pause() void OSXOutput::Cancel() noexcept { - AudioOutputUnitStop(au); + if (started) { + AudioOutputUnitStop(au); + started = false; + } + ring_buffer->reset(); #ifdef ENABLE_DSD pcm_export->Reset();