summaryrefslogtreecommitdiff
path: root/src/output/Thread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-08-08 14:27:19 +0200
committerMax Kellermann <max@musicpd.org>2017-08-08 14:27:19 +0200
commitb3eb8489f33e340ebc84b19e88721f95989e371d (patch)
tree860e507e01acee48b88ec1b49ade4b10603e8595 /src/output/Thread.cxx
parent5431fca99b5111e6d427177c829a5eab13af4c3c (diff)
output/Filtered: add a few OutputPlugin method wrappers
Diffstat (limited to 'src/output/Thread.cxx')
-rw-r--r--src/output/Thread.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/output/Thread.cxx b/src/output/Thread.cxx
index ba8440151..5acf0da0b 100644
--- a/src/output/Thread.cxx
+++ b/src/output/Thread.cxx
@@ -21,7 +21,6 @@
#include "Control.hxx"
#include "Filtered.hxx"
#include "Client.hxx"
-#include "OutputPlugin.hxx"
#include "Domain.hxx"
#include "notify.hxx"
#include "mixer/MixerInternal.hxx"
@@ -217,7 +216,7 @@ inline bool
AudioOutputControl::WaitForDelay() noexcept
{
while (true) {
- const auto delay = ao_plugin_delay(*output);
+ const auto delay = output->Delay();
if (delay <= std::chrono::steady_clock::duration::zero())
return true;
@@ -251,7 +250,7 @@ AudioOutputControl::PlayChunk() noexcept
if (tag != nullptr) {
const ScopeUnlock unlock(mutex);
try {
- ao_plugin_send_tag(*output, *tag);
+ output->SendTag(*tag);
} catch (const std::runtime_error &e) {
FormatError(e, "Failed to send tag to %s",
GetLogName());
@@ -273,7 +272,7 @@ AudioOutputControl::PlayChunk() noexcept
try {
const ScopeUnlock unlock(mutex);
- nbytes = ao_plugin_play(*output, data.data, data.size);
+ nbytes = output->Play(data.data, data.size);
assert(nbytes <= data.size);
} catch (const std::runtime_error &e) {
FormatError(e, "Failed to play on %s", GetLogName());
@@ -438,7 +437,7 @@ AudioOutputControl::Task()
case Command::DRAIN:
if (open) {
const ScopeUnlock unlock(mutex);
- ao_plugin_drain(*output);
+ output->Drain();
}
CommandFinished();
@@ -449,7 +448,7 @@ AudioOutputControl::Task()
if (open) {
const ScopeUnlock unlock(mutex);
- ao_plugin_cancel(*output);
+ output->Cancel();
}
CommandFinished();