From a5017a2d7c03506f55cf7eb465ca7d254dfc14a9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 14 Mar 2009 11:36:50 +0100 Subject: mixer_api: moved functions to mixer_control.c mixer_control.h should provide the functions needed to manipulate a mixer, without exposing the internal mixer API (which is provided by mixer_api.h). --- src/mixer_api.c | 55 ------------------------------------------------------- 1 file changed, 55 deletions(-) (limited to 'src/mixer_api.c') diff --git a/src/mixer_api.c b/src/mixer_api.c index 8ec4f41bc..3c9f54e14 100644 --- a/src/mixer_api.c +++ b/src/mixer_api.c @@ -26,58 +26,3 @@ #undef G_LOG_DOMAIN #define G_LOG_DOMAIN "mixer" - -static bool mixers_enabled = true; - -void mixer_disable_all(void) -{ - g_debug("mixer api is disabled\n"); - mixers_enabled = false; -} - -struct mixer * -mixer_new(const struct mixer_plugin *plugin, const struct config_param *param) -{ - struct mixer *mixer; - - //mixers are disabled (by using software volume) - if (!mixers_enabled) { - return NULL; - } - assert(plugin != NULL); - - mixer = plugin->init(param); - - assert(mixer == NULL || mixer->plugin == plugin); - - return mixer; -} - -void -mixer_free(struct mixer *mixer) -{ - if (!mixer) { - return; - } - assert(mixer->plugin != NULL); - - mixer->plugin->finish(mixer); -} - -bool mixer_open(struct mixer *mixer) -{ - if (!mixer) { - return false; - } - assert(mixer->plugin != NULL); - return mixer->plugin->open(mixer); -} - -void mixer_close(struct mixer *mixer) -{ - if (!mixer) { - return; - } - assert(mixer->plugin != NULL); - mixer->plugin->close(mixer); -} -- cgit v1.2.3