aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-02-01 22:24:19 +0100
committerMax Kellermann <max@duempel.org>2015-02-01 22:24:19 +0100
commite660229c405cd0b6bebe52439c98c97869b01c9b (patch)
treef7073a68edd0b9af12ec5fcb93e99568878fcf6f /src/output
parentee6e0e16cbcc7b2f169dca3ef88cb04b9c07467a (diff)
downloadmpd-e660229c405cd0b6bebe52439c98c97869b01c9b.tar.gz
mpd-e660229c405cd0b6bebe52439c98c97869b01c9b.tar.xz
mpd-e660229c405cd0b6bebe52439c98c97869b01c9b.zip
output/sles: use AudioOutputWrapper::Create()
Diffstat (limited to 'src/output')
-rw-r--r--src/output/plugins/sles/SlesOutputPlugin.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/output/plugins/sles/SlesOutputPlugin.cxx b/src/output/plugins/sles/SlesOutputPlugin.cxx
index 94084e1b8..1e23cd2cc 100644
--- a/src/output/plugins/sles/SlesOutputPlugin.cxx
+++ b/src/output/plugins/sles/SlesOutputPlugin.cxx
@@ -97,6 +97,8 @@ public:
bool Configure(const ConfigBlock &block, Error &error);
+ static SlesOutput *Create(const ConfigBlock &block, Error &error);
+
bool Open(AudioFormat &audio_format, Error &error);
void Close();
@@ -444,8 +446,8 @@ sles_test_default_device()
return true;
}
-static AudioOutput *
-sles_output_init(const ConfigBlock &block, Error &error)
+inline SlesOutput *
+SlesOutput::Create(const ConfigBlock &block, Error &error)
{
SlesOutput *sles = new SlesOutput();
@@ -455,7 +457,7 @@ sles_output_init(const ConfigBlock &block, Error &error)
return nullptr;
}
- return *sles;
+ return sles;
}
typedef AudioOutputWrapper<SlesOutput> Wrapper;
@@ -463,7 +465,7 @@ typedef AudioOutputWrapper<SlesOutput> Wrapper;
const struct AudioOutputPlugin sles_output_plugin = {
"sles",
sles_test_default_device,
- sles_output_init,
+ &Wrapper::Init,
&Wrapper::Finish,
nullptr,
nullptr,