diff options
author | Max Kellermann <max@duempel.org> | 2013-04-16 21:33:25 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-04-16 21:33:25 +0200 |
commit | cb8449a66dfa7503951d3c9a27a957918849ac57 (patch) | |
tree | 33d1af378739fb46d12569b03022697226f5b40f /src/mixer/PulseMixerPlugin.cxx | |
parent | 621467717d93221a63c9234d4273d9629635c30f (diff) | |
download | mpd-cb8449a66dfa7503951d3c9a27a957918849ac57.tar.gz mpd-cb8449a66dfa7503951d3c9a27a957918849ac57.tar.xz mpd-cb8449a66dfa7503951d3c9a27a957918849ac57.zip |
MixerInternal: convert to class
Diffstat (limited to '')
-rw-r--r-- | src/mixer/PulseMixerPlugin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mixer/PulseMixerPlugin.cxx b/src/mixer/PulseMixerPlugin.cxx index 99e381952..389f077f3 100644 --- a/src/mixer/PulseMixerPlugin.cxx +++ b/src/mixer/PulseMixerPlugin.cxx @@ -39,16 +39,16 @@ #undef G_LOG_DOMAIN #define G_LOG_DOMAIN "pulse_mixer" -struct PulseMixer : mixer { +struct PulseMixer final : public Mixer { PulseOutput *output; bool online; struct pa_cvolume volume; PulseMixer(PulseOutput *_output) - :output(_output), online(false) + :Mixer(pulse_mixer_plugin), + output(_output), online(false) { - mixer_init(this, &pulse_mixer_plugin); } }; @@ -152,7 +152,7 @@ pulse_mixer_on_change(PulseMixer *pm, pulse_mixer_update(pm, context, stream); } -static struct mixer * +static Mixer * pulse_mixer_init(void *ao, G_GNUC_UNUSED const struct config_param *param, GError **error_r) { @@ -172,7 +172,7 @@ pulse_mixer_init(void *ao, G_GNUC_UNUSED const struct config_param *param, } static void -pulse_mixer_finish(struct mixer *data) +pulse_mixer_finish(Mixer *data) { PulseMixer *pm = (PulseMixer *) data; @@ -182,7 +182,7 @@ pulse_mixer_finish(struct mixer *data) } static int -pulse_mixer_get_volume(struct mixer *mixer, G_GNUC_UNUSED GError **error_r) +pulse_mixer_get_volume(Mixer *mixer, G_GNUC_UNUSED GError **error_r) { PulseMixer *pm = (PulseMixer *) mixer; int ret; @@ -199,7 +199,7 @@ pulse_mixer_get_volume(struct mixer *mixer, G_GNUC_UNUSED GError **error_r) } static bool -pulse_mixer_set_volume(struct mixer *mixer, unsigned volume, GError **error_r) +pulse_mixer_set_volume(Mixer *mixer, unsigned volume, GError **error_r) { PulseMixer *pm = (PulseMixer *) mixer; struct pa_cvolume cvolume; |