output/osx: check started
in Close() and Cancel()
This commit is contained in:
parent
f032925c2d
commit
fe5b81e180
@ -667,7 +667,8 @@ OSXOutput::Disable() noexcept
|
|||||||
void
|
void
|
||||||
OSXOutput::Close() noexcept
|
OSXOutput::Close() noexcept
|
||||||
{
|
{
|
||||||
AudioOutputUnitStop(au);
|
if (started)
|
||||||
|
AudioOutputUnitStop(au);
|
||||||
AudioUnitUninitialize(au);
|
AudioUnitUninitialize(au);
|
||||||
delete ring_buffer;
|
delete ring_buffer;
|
||||||
}
|
}
|
||||||
@ -821,7 +822,11 @@ bool OSXOutput::Pause()
|
|||||||
void
|
void
|
||||||
OSXOutput::Cancel() noexcept
|
OSXOutput::Cancel() noexcept
|
||||||
{
|
{
|
||||||
AudioOutputUnitStop(au);
|
if (started) {
|
||||||
|
AudioOutputUnitStop(au);
|
||||||
|
started = false;
|
||||||
|
}
|
||||||
|
|
||||||
ring_buffer->reset();
|
ring_buffer->reset();
|
||||||
#ifdef ENABLE_DSD
|
#ifdef ENABLE_DSD
|
||||||
pcm_export->Reset();
|
pcm_export->Reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user