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/MixerAll.cxx | |
parent | 621467717d93221a63c9234d4273d9629635c30f (diff) | |
download | mpd-cb8449a66dfa7503951d3c9a27a957918849ac57.tar.gz mpd-cb8449a66dfa7503951d3c9a27a957918849ac57.tar.xz mpd-cb8449a66dfa7503951d3c9a27a957918849ac57.zip |
MixerInternal: convert to class
Diffstat (limited to 'src/MixerAll.cxx')
-rw-r--r-- | src/MixerAll.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/MixerAll.cxx b/src/MixerAll.cxx index 36c83abf8..3069f60d7 100644 --- a/src/MixerAll.cxx +++ b/src/MixerAll.cxx @@ -40,7 +40,6 @@ static int output_mixer_get_volume(unsigned i) { struct audio_output *output; - struct mixer *mixer; int volume; GError *error = NULL; @@ -50,7 +49,7 @@ output_mixer_get_volume(unsigned i) if (!output->enabled) return -1; - mixer = output->mixer; + Mixer *mixer = output->mixer; if (mixer == NULL) return -1; @@ -88,7 +87,6 @@ static bool output_mixer_set_volume(unsigned i, unsigned volume) { struct audio_output *output; - struct mixer *mixer; bool success; GError *error = NULL; @@ -99,7 +97,7 @@ output_mixer_set_volume(unsigned i, unsigned volume) if (!output->enabled) return false; - mixer = output->mixer; + Mixer *mixer = output->mixer; if (mixer == NULL) return false; @@ -132,7 +130,6 @@ static int output_mixer_get_software_volume(unsigned i) { struct audio_output *output; - struct mixer *mixer; assert(i < audio_output_count()); @@ -140,8 +137,8 @@ output_mixer_get_software_volume(unsigned i) if (!output->enabled) return -1; - mixer = output->mixer; - if (mixer == NULL || mixer->plugin != &software_mixer_plugin) + Mixer *mixer = output->mixer; + if (mixer == NULL || !mixer->IsPlugin(software_mixer_plugin)) return -1; return mixer_get_volume(mixer, NULL); |