summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-16 18:14:04 +0200
committerMax Kellermann <max@musicpd.org>2018-07-16 18:14:04 +0200
commitc457d8e4425b8024f144ec37fb7d844d9fce1642 (patch)
tree10f2fbdceab54cd0873e920f20ac60a17b0cd0c3 /src
parentba41690063d1ccdf5b39844e1bba3bca468ff954 (diff)
parentc58dffa685310028c6c4d5b9aa09507e9f0e2b44 (diff)
Merge branch 'can' of git://github.com/Wang-Yue/MPD
Diffstat (limited to 'src')
-rw-r--r--src/output/plugins/OSXOutputPlugin.cxx14
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)
{