diff options
author | Max Kellermann <max@duempel.org> | 2009-10-21 09:48:41 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-10-21 09:48:41 +0200 |
commit | ac32f36e4e1489664e7c202319978b6a9a15ed40 (patch) | |
tree | c57ac0a4cc582bbf66727b1e1f2059373923a4da /src/output_init.c | |
parent | b8ccc885c883a24265cd49de385b61d368a1b66f (diff) | |
download | mpd-ac32f36e4e1489664e7c202319978b6a9a15ed40.tar.gz mpd-ac32f36e4e1489664e7c202319978b6a9a15ed40.tar.xz mpd-ac32f36e4e1489664e7c202319978b6a9a15ed40.zip |
mixer_plugin: pass audio_output pointer to mixer_plugin.init()
This allows the mixer object to access its associated audio output
object.
Diffstat (limited to '')
-rw-r--r-- | src/output_init.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/output_init.c b/src/output_init.c index a628a2499..f394066ef 100644 --- a/src/output_init.c +++ b/src/output_init.c @@ -89,7 +89,7 @@ audio_output_mixer_type(const struct config_param *param) } static struct mixer * -audio_output_load_mixer(const struct config_param *param, +audio_output_load_mixer(void *ao, const struct config_param *param, const struct mixer_plugin *plugin, struct filter *filter_chain, GError **error_r) @@ -105,10 +105,10 @@ audio_output_load_mixer(const struct config_param *param, if (plugin == NULL) return NULL; - return mixer_new(plugin, param, error_r); + return mixer_new(plugin, ao, param, error_r); case MIXER_TYPE_SOFTWARE: - mixer = mixer_new(&software_mixer_plugin, NULL, NULL); + mixer = mixer_new(&software_mixer_plugin, NULL, NULL, NULL); assert(mixer != NULL); filter_chain_append(filter_chain, @@ -200,7 +200,8 @@ audio_output_init(struct audio_output *ao, const struct config_param *param, if (ao->data == NULL) return false; - ao->mixer = audio_output_load_mixer(param, plugin->mixer_plugin, + ao->mixer = audio_output_load_mixer(ao->data, param, + plugin->mixer_plugin, ao->filter, &error); if (ao->mixer == NULL && error != NULL) { g_warning("Failed to initialize hardware mixer for '%s': %s", |