Commit fe5b81e1 authored by Max Kellermann's avatar Max Kellermann

output/osx: check `started` in Close() and Cancel()

parent f032925c
......@@ -667,6 +667,7 @@ OSXOutput::Disable() noexcept
void
OSXOutput::Close() noexcept
{
if (started)
AudioOutputUnitStop(au);
AudioUnitUninitialize(au);
delete ring_buffer;
......@@ -821,7 +822,11 @@ bool OSXOutput::Pause()
void
OSXOutput::Cancel() noexcept
{
if (started) {
AudioOutputUnitStop(au);
started = false;
}
ring_buffer->reset();
#ifdef ENABLE_DSD
pcm_export->Reset();
......
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