aboutsummaryrefslogtreecommitdiffstats
path: root/src/MixerInternal.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-04-16 21:33:25 +0200
committerMax Kellermann <max@duempel.org>2013-04-16 21:33:25 +0200
commitcb8449a66dfa7503951d3c9a27a957918849ac57 (patch)
tree33d1af378739fb46d12569b03022697226f5b40f /src/MixerInternal.hxx
parent621467717d93221a63c9234d4273d9629635c30f (diff)
downloadmpd-cb8449a66dfa7503951d3c9a27a957918849ac57.tar.gz
mpd-cb8449a66dfa7503951d3c9a27a957918849ac57.tar.xz
mpd-cb8449a66dfa7503951d3c9a27a957918849ac57.zip
MixerInternal: convert to class
Diffstat (limited to 'src/MixerInternal.hxx')
-rw-r--r--src/MixerInternal.hxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/MixerInternal.hxx b/src/MixerInternal.hxx
index 9c39e3e35..f922a22bd 100644
--- a/src/MixerInternal.hxx
+++ b/src/MixerInternal.hxx
@@ -25,7 +25,8 @@
#include <glib.h>
-struct mixer {
+class Mixer {
+public:
const struct mixer_plugin *plugin;
/**
@@ -44,9 +45,17 @@ struct mixer {
* automatically?
*/
bool failed;
-};
-void
-mixer_init(struct mixer *mixer, const struct mixer_plugin *plugin);
+public:
+ Mixer(const mixer_plugin &_plugin)
+ :plugin(&_plugin),
+ mutex(g_mutex_new()),
+ open(false),
+ failed(false) {}
+
+ bool IsPlugin(const mixer_plugin &other) const {
+ return plugin == &other;
+ }
+};
#endif