summaryrefslogtreecommitdiff
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to 'src/output')
-rw-r--r--src/output/Init.cxx3
-rw-r--r--src/output/Internal.hxx1
-rw-r--r--src/output/OutputThread.cxx11
3 files changed, 4 insertions, 11 deletions
diff --git a/src/output/Init.cxx b/src/output/Init.cxx
index 453200dc9..34b53d916 100644
--- a/src/output/Init.cxx
+++ b/src/output/Init.cxx
@@ -51,7 +51,8 @@
AudioOutput::AudioOutput(const AudioOutputPlugin &_plugin,
const ConfigBlock &block)
- :plugin(_plugin)
+ :plugin(_plugin),
+ thread(BIND_THIS_METHOD(Task))
{
assert(plugin.finish != nullptr);
assert(plugin.open != nullptr);
diff --git a/src/output/Internal.hxx b/src/output/Internal.hxx
index 75355e8b9..4d23b8232 100644
--- a/src/output/Internal.hxx
+++ b/src/output/Internal.hxx
@@ -515,7 +515,6 @@ private:
* The OutputThread.
*/
void Task();
- static void Task(void *arg);
};
/**
diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx
index d3f9c2bb8..91d61f576 100644
--- a/src/output/OutputThread.cxx
+++ b/src/output/OutputThread.cxx
@@ -396,7 +396,7 @@ AudioOutput::Pause()
pause = false;
}
-inline void
+void
AudioOutput::Task()
{
FormatThreadName("output:%s", name);
@@ -513,16 +513,9 @@ AudioOutput::Task()
}
void
-AudioOutput::Task(void *arg)
-{
- AudioOutput *ao = (AudioOutput *)arg;
- ao->Task();
-}
-
-void
AudioOutput::StartThread()
{
assert(command == Command::NONE);
- thread.Start(Task, this);
+ thread.Start();
}