From c4403c523f3b5514be499ff20887ec340f2272e9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 28 Jan 2014 12:24:48 +0100 Subject: AudioOutput: add constructor and destructor --- src/output/Init.cxx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/output/Init.cxx') 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; -- cgit v1.2.3