aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/Init.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-28 12:24:48 +0100
committerMax Kellermann <max@duempel.org>2014-01-28 12:37:58 +0100
commitc4403c523f3b5514be499ff20887ec340f2272e9 (patch)
treecee7034796c386517f54ab2b61e762939c458f6f /src/output/Init.cxx
parent07b89b2bad7543fa07347ffdccc71d4899dd2b02 (diff)
downloadmpd-c4403c523f3b5514be499ff20887ec340f2272e9.tar.gz
mpd-c4403c523f3b5514be499ff20887ec340f2272e9.tar.xz
mpd-c4403c523f3b5514be499ff20887ec340f2272e9.zip
AudioOutput: add constructor and destructor
Diffstat (limited to '')
-rw-r--r--src/output/Init.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/output/Init.cxx b/src/output/Init.cxx
index 29c7137d9..52ff14b58 100644
--- a/src/output/Init.cxx
+++ b/src/output/Init.cxx
@@ -46,6 +46,20 @@
#define AUDIO_OUTPUT_FORMAT "format"
#define AUDIO_FILTERS "filters"
+AudioOutput::AudioOutput()
+ :enabled(true), really_enabled(false),
+ open(false),
+ pause(false),
+ allow_play(true),
+ in_playback_loop(false),
+ woken_for_play(false),
+ filter(nullptr),
+ replay_gain_filter(nullptr),
+ other_replay_gain_filter(nullptr),
+ command(AO_COMMAND_NONE)
+{
+}
+
static const AudioOutputPlugin *
audio_output_detect(Error &error)
{
@@ -166,12 +180,6 @@ ao_base_init(AudioOutput *ao,
ao->tags = param.GetBlockValue("tags", true);
ao->always_on = param.GetBlockValue("always_on", false);
ao->enabled = param.GetBlockValue("enabled", true);
- ao->really_enabled = false;
- ao->open = false;
- ao->pause = false;
- ao->allow_play = true;
- ao->in_playback_loop = false;
- ao->woken_for_play = false;
/* set up the filter chain */
@@ -202,12 +210,6 @@ ao_base_init(AudioOutput *ao,
"Failed to initialize filter chain for '%s'",
ao->name);
- ao->command = AO_COMMAND_NONE;
-
- ao->mixer = nullptr;
- ao->replay_gain_filter = nullptr;
- ao->other_replay_gain_filter = nullptr;
-
/* done */
return true;