From f86e15953621901c468bfc2a1140c854a91b5a16 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 5 Feb 2014 17:22:34 +0100 Subject: [PATCH] Mixer: rename struct mixer_plugin to MixerPlugin --- src/mixer/MixerControl.cxx | 2 +- src/mixer/MixerControl.hxx | 4 ++-- src/mixer/MixerInternal.hxx | 6 +++--- src/mixer/MixerList.hxx | 14 ++++++++------ src/mixer/MixerPlugin.hxx | 2 +- src/mixer/plugins/AlsaMixerPlugin.cxx | 2 +- src/mixer/plugins/OssMixerPlugin.cxx | 2 +- src/mixer/plugins/PulseMixerPlugin.cxx | 2 +- src/mixer/plugins/RoarMixerPlugin.cxx | 2 +- src/mixer/plugins/SoftwareMixerPlugin.cxx | 2 +- src/mixer/plugins/WinmmMixerPlugin.cxx | 2 +- src/output/Init.cxx | 2 +- src/output/OutputPlugin.hxx | 3 ++- 13 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/mixer/MixerControl.cxx b/src/mixer/MixerControl.cxx index d64ff2c8e..2e4b5093a 100644 --- a/src/mixer/MixerControl.cxx +++ b/src/mixer/MixerControl.cxx @@ -26,7 +26,7 @@ Mixer * mixer_new(EventLoop &event_loop, - const mixer_plugin *plugin, void *ao, + const MixerPlugin *plugin, void *ao, const config_param ¶m, Error &error) { diff --git a/src/mixer/MixerControl.hxx b/src/mixer/MixerControl.hxx index 8ffc683f4..8be4e9f63 100644 --- a/src/mixer/MixerControl.hxx +++ b/src/mixer/MixerControl.hxx @@ -28,11 +28,11 @@ class Error; class Mixer; class EventLoop; -struct mixer_plugin; +struct MixerPlugin; struct config_param; Mixer * -mixer_new(EventLoop &event_loop, const mixer_plugin *plugin, void *ao, +mixer_new(EventLoop &event_loop, const MixerPlugin *plugin, void *ao, const config_param ¶m, Error &error); diff --git a/src/mixer/MixerInternal.hxx b/src/mixer/MixerInternal.hxx index 1732b4f3b..108293740 100644 --- a/src/mixer/MixerInternal.hxx +++ b/src/mixer/MixerInternal.hxx @@ -26,7 +26,7 @@ class Mixer { public: - const struct mixer_plugin *plugin; + const MixerPlugin *plugin; /** * This mutex protects all of the mixer struct, including its @@ -46,12 +46,12 @@ public: bool failed; public: - Mixer(const mixer_plugin &_plugin) + Mixer(const MixerPlugin &_plugin) :plugin(&_plugin), open(false), failed(false) {} - bool IsPlugin(const mixer_plugin &other) const { + bool IsPlugin(const MixerPlugin &other) const { return plugin == &other; } }; diff --git a/src/mixer/MixerList.hxx b/src/mixer/MixerList.hxx index eb3dba938..e75b2e6ff 100644 --- a/src/mixer/MixerList.hxx +++ b/src/mixer/MixerList.hxx @@ -25,11 +25,13 @@ #ifndef MPD_MIXER_LIST_HXX #define MPD_MIXER_LIST_HXX -extern const struct mixer_plugin software_mixer_plugin; -extern const struct mixer_plugin alsa_mixer_plugin; -extern const struct mixer_plugin oss_mixer_plugin; -extern const struct mixer_plugin roar_mixer_plugin; -extern const struct mixer_plugin pulse_mixer_plugin; -extern const struct mixer_plugin winmm_mixer_plugin; +struct MixerPlugin; + +extern const MixerPlugin software_mixer_plugin; +extern const MixerPlugin alsa_mixer_plugin; +extern const MixerPlugin oss_mixer_plugin; +extern const MixerPlugin roar_mixer_plugin; +extern const MixerPlugin pulse_mixer_plugin; +extern const MixerPlugin winmm_mixer_plugin; #endif diff --git a/src/mixer/MixerPlugin.hxx b/src/mixer/MixerPlugin.hxx index 79ba378a0..d342ba1a7 100644 --- a/src/mixer/MixerPlugin.hxx +++ b/src/mixer/MixerPlugin.hxx @@ -32,7 +32,7 @@ class Mixer; class EventLoop; class Error; -struct mixer_plugin { +struct MixerPlugin { /** * Alocates and configures a mixer device. * diff --git a/src/mixer/plugins/AlsaMixerPlugin.cxx b/src/mixer/plugins/AlsaMixerPlugin.cxx index 6e99cfa3e..6fb669c54 100644 --- a/src/mixer/plugins/AlsaMixerPlugin.cxx +++ b/src/mixer/plugins/AlsaMixerPlugin.cxx @@ -374,7 +374,7 @@ alsa_mixer_set_volume(Mixer *mixer, unsigned volume, Error &error) return am->SetVolume(volume, error); } -const struct mixer_plugin alsa_mixer_plugin = { +const MixerPlugin alsa_mixer_plugin = { alsa_mixer_init, alsa_mixer_finish, alsa_mixer_open, diff --git a/src/mixer/plugins/OssMixerPlugin.cxx b/src/mixer/plugins/OssMixerPlugin.cxx index 96dade06e..7e8d96ca8 100644 --- a/src/mixer/plugins/OssMixerPlugin.cxx +++ b/src/mixer/plugins/OssMixerPlugin.cxx @@ -231,7 +231,7 @@ oss_mixer_set_volume(Mixer *mixer, unsigned volume, Error &error) return om->SetVolume(volume, error); } -const struct mixer_plugin oss_mixer_plugin = { +const MixerPlugin oss_mixer_plugin = { oss_mixer_init, oss_mixer_finish, oss_mixer_open, diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx index 636656081..7c6076bb2 100644 --- a/src/mixer/plugins/PulseMixerPlugin.cxx +++ b/src/mixer/plugins/PulseMixerPlugin.cxx @@ -215,7 +215,7 @@ pulse_mixer_set_volume(Mixer *mixer, unsigned volume, Error &error) return success; } -const struct mixer_plugin pulse_mixer_plugin = { +const MixerPlugin pulse_mixer_plugin = { pulse_mixer_init, pulse_mixer_finish, nullptr, diff --git a/src/mixer/plugins/RoarMixerPlugin.cxx b/src/mixer/plugins/RoarMixerPlugin.cxx index ce0462520..f03c82c04 100644 --- a/src/mixer/plugins/RoarMixerPlugin.cxx +++ b/src/mixer/plugins/RoarMixerPlugin.cxx @@ -64,7 +64,7 @@ roar_mixer_set_volume(Mixer *mixer, unsigned volume, return roar_output_set_volume(self->self, volume); } -const struct mixer_plugin roar_mixer_plugin = { +const MixerPlugin roar_mixer_plugin = { roar_mixer_init, roar_mixer_finish, nullptr, diff --git a/src/mixer/plugins/SoftwareMixerPlugin.cxx b/src/mixer/plugins/SoftwareMixerPlugin.cxx index e5d4ba5ca..14b214c7f 100644 --- a/src/mixer/plugins/SoftwareMixerPlugin.cxx +++ b/src/mixer/plugins/SoftwareMixerPlugin.cxx @@ -110,7 +110,7 @@ software_mixer_set_volume(Mixer *mixer, unsigned volume, return true; } -const struct mixer_plugin software_mixer_plugin = { +const MixerPlugin software_mixer_plugin = { software_mixer_init, software_mixer_finish, nullptr, diff --git a/src/mixer/plugins/WinmmMixerPlugin.cxx b/src/mixer/plugins/WinmmMixerPlugin.cxx index c040b19fd..5e5a84637 100644 --- a/src/mixer/plugins/WinmmMixerPlugin.cxx +++ b/src/mixer/plugins/WinmmMixerPlugin.cxx @@ -104,7 +104,7 @@ winmm_mixer_set_volume(Mixer *mixer, unsigned volume, Error &error) return true; } -const struct mixer_plugin winmm_mixer_plugin = { +const MixerPlugin winmm_mixer_plugin = { winmm_mixer_init, winmm_mixer_finish, nullptr, diff --git a/src/output/Init.cxx b/src/output/Init.cxx index a983ff7c8..ff1a8f837 100644 --- a/src/output/Init.cxx +++ b/src/output/Init.cxx @@ -114,7 +114,7 @@ audio_output_mixer_type(const config_param ¶m) static Mixer * audio_output_load_mixer(EventLoop &event_loop, AudioOutput *ao, const config_param ¶m, - const struct mixer_plugin *plugin, + const MixerPlugin *plugin, Filter &filter_chain, Error &error) { diff --git a/src/output/OutputPlugin.hxx b/src/output/OutputPlugin.hxx index 3ae35ea3d..00fa36bc0 100644 --- a/src/output/OutputPlugin.hxx +++ b/src/output/OutputPlugin.hxx @@ -28,6 +28,7 @@ struct config_param; struct AudioFormat; struct Tag; struct AudioOutput; +struct MixerPlugin; class Error; /** @@ -147,7 +148,7 @@ struct AudioOutputPlugin { * created, this mixer plugin gets the same #config_param as * this audio output device. */ - const struct mixer_plugin *mixer_plugin; + const MixerPlugin *mixer_plugin; }; static inline bool