diff options
Diffstat (limited to 'src/output/plugins')
-rw-r--r-- | src/output/plugins/OSXOutputPlugin.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index 67fd9ddfe..9894eff25 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -101,6 +101,7 @@ private: std::chrono::steady_clock::duration Delay() const noexcept override; size_t Play(const void *chunk, size_t size) override; bool Pause() override; + void Cancel() noexcept override; }; static constexpr Domain osx_output_domain("osx_output"); @@ -909,7 +910,18 @@ bool OSXOutput::Pause() { } return true; } - + +void +OSXOutput::Cancel() noexcept +{ + AudioOutputUnitStop(au); + ring_buffer->reset(); +#ifdef ENABLE_DSD + pcm_export->Reset(); +#endif + AudioOutputUnitStart(au); +} + int osx_output_get_volume(OSXOutput &output) { |