aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_plugin.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-26 18:23:23 +0100
committerMax Kellermann <max@duempel.org>2009-03-26 18:23:23 +0100
commit66a2c5669e1fcd709a00bd4de8ddfb0d3a0c2a58 (patch)
treec138f37dfc13af01df8606ed7a8f882964a32f27 /src/output_plugin.h
parent209c8a540c80faffb6b04ac6e7fed64a03c679ac (diff)
downloadmpd-66a2c5669e1fcd709a00bd4de8ddfb0d3a0c2a58.tar.gz
mpd-66a2c5669e1fcd709a00bd4de8ddfb0d3a0c2a58.tar.xz
mpd-66a2c5669e1fcd709a00bd4de8ddfb0d3a0c2a58.zip
output_plugin: replaced output_plugin.get_mixer() with mixer_plugin
The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
Diffstat (limited to '')
-rw-r--r--src/output_plugin.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/output_plugin.h b/src/output_plugin.h
index 83b5676a4..13dba0d0b 100644
--- a/src/output_plugin.h
+++ b/src/output_plugin.h
@@ -67,15 +67,6 @@ struct audio_output_plugin {
void (*finish)(void *data);
/**
- * Returns the mixer device associated with this audio output.
- * This does not actually open the mixer device yet.
- *
- * @return the mixer object, or NULL if there is no mixer
- * attached to this audio output
- */
- struct mixer *(*get_mixer)(void *data);
-
- /**
* Really open the device.
*
* @param audio_format the audio format in which data is going
@@ -125,6 +116,14 @@ struct audio_output_plugin {
* for continue to pause
*/
bool (*pause)(void *data);
+
+ /**
+ * The mixer plugin associated with this output plugin. This
+ * may be NULL if no mixer plugin is implemented. When
+ * created, this mixer plugin gets the same #config_param as
+ * this audio output device.
+ */
+ const struct mixer_plugin *mixer_plugin;
};
static inline bool
@@ -150,14 +149,6 @@ ao_plugin_finish(const struct audio_output_plugin *plugin, void *data)
plugin->finish(data);
}
-static inline struct mixer *
-ao_plugin_get_mixer(const struct audio_output_plugin *plugin, void *data)
-{
- return plugin->get_mixer != NULL
- ? plugin->get_mixer(data)
- : NULL;
-}
-
static inline bool
ao_plugin_open(const struct audio_output_plugin *plugin,
void *data, struct audio_format *audio_format,