From 01e98a4534820dd7b6bbe582bb1d7603268b7757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 1 Mar 2013 08:43:05 +0100 Subject: [PATCH] mixer: remove unused mixer functions remove e_mod_mixer_channel_name_get, e_mixer_xxxx_get_channel_name e_mixer_xxxx_set_state --- src/modules/mixer/e_mod_mixer.c | 3 --- src/modules/mixer/e_mod_mixer.h | 5 ----- src/modules/mixer/sys_alsa.c | 32 -------------------------------- src/modules/mixer/sys_dummy.c | 22 ---------------------- src/modules/mixer/sys_pulse.c | 17 ----------------- 5 files changed, 79 deletions(-) diff --git a/src/modules/mixer/e_mod_mixer.c b/src/modules/mixer/e_mod_mixer.c index 4c2d6ff26..a03da17a7 100644 --- a/src/modules/mixer/e_mod_mixer.c +++ b/src/modules/mixer/e_mod_mixer.c @@ -10,7 +10,6 @@ E_Mixer_Cb e_mod_mixer_new; E_Mixer_Cb e_mod_mixer_del; E_Mixer_Cb e_mod_mixer_channel_default_name_get; E_Mixer_Cb e_mod_mixer_channel_info_get_by_name; -E_Mixer_Cb e_mod_mixer_channel_name_get; E_Mixer_Cb e_mod_mixer_channels_get; E_Mixer_Cb e_mod_mixer_channel_names_get; E_Mixer_Cb e_mod_mixer_card_name_get; @@ -29,7 +28,6 @@ e_mixer_default_setup(void) e_mod_mixer_del = (void *)e_mixer_system_del; e_mod_mixer_channel_default_name_get = (void *)e_mixer_system_get_default_channel_name; e_mod_mixer_channel_info_get_by_name = (void *)e_mixer_system_get_channel_by_name; - e_mod_mixer_channel_name_get = (void *)e_mixer_system_get_channel_name; e_mod_mixer_channels_get = (void *)e_mixer_system_get_channels; e_mod_mixer_channel_names_get = (void *)e_mixer_system_get_channel_names; e_mod_mixer_card_name_get = (void *)e_mixer_system_get_card_name; @@ -50,7 +48,6 @@ e_mixer_pulse_setup() e_mod_mixer_del = (void *)e_mixer_pulse_del; e_mod_mixer_channel_default_name_get = (void *)e_mixer_pulse_get_default_channel_name; e_mod_mixer_channel_info_get_by_name = (void *)e_mixer_pulse_get_channel_by_name; - e_mod_mixer_channel_name_get = (void *)e_mixer_pulse_get_channel_name; e_mod_mixer_channels_get = (void *)e_mixer_pulse_get_channels; e_mod_mixer_channel_names_get = (void *)e_mixer_pulse_get_channel_names; e_mod_mixer_card_name_get = (void *)e_mixer_pulse_get_card_name; diff --git a/src/modules/mixer/e_mod_mixer.h b/src/modules/mixer/e_mod_mixer.h index c7d1b38b5..f9800cede 100644 --- a/src/modules/mixer/e_mod_mixer.h +++ b/src/modules/mixer/e_mod_mixer.h @@ -66,7 +66,6 @@ extern E_Mixer_Cb e_mod_mixer_new; extern E_Mixer_Cb e_mod_mixer_del; extern E_Mixer_Cb e_mod_mixer_channel_default_name_get; extern E_Mixer_Cb e_mod_mixer_channel_info_get_by_name; -extern E_Mixer_Cb e_mod_mixer_channel_name_get; extern E_Mixer_Cb e_mod_mixer_channel_names_get; extern E_Mixer_Cb e_mod_mixer_card_name_get; extern E_Mixer_Cb e_mod_mixer_card_names_get; @@ -90,7 +89,6 @@ void e_mixer_system_del(E_Mixer_System *self); Eina_List *e_mixer_system_get_cards(void); const char *e_mixer_system_get_default_card(void); const char *e_mixer_system_get_card_name(const char *card); -const char *e_mixer_system_get_channel_name(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel); Eina_List *e_mixer_system_get_channels(const E_Mixer_System *self); Eina_List *e_mixer_system_get_channel_names(const E_Mixer_System *self); @@ -103,7 +101,6 @@ int e_mixer_system_set_volume(const E_Mixer_System *self, const E_Mixer_Channel_ int e_mixer_system_get_mute(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, int *mute); int e_mixer_system_set_mute(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, int mute); int e_mixer_system_get_state(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, E_Mixer_Channel_State *state); -int e_mixer_system_set_state(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, const E_Mixer_Channel_State *state); /* PULSE */ int pulse_init(void); @@ -117,7 +114,6 @@ void e_mixer_pulse_del(E_Mixer_System *self); Eina_List *e_mixer_pulse_get_cards(void); const char *e_mixer_pulse_get_default_card(void); const char *e_mixer_pulse_get_card_name(const char *card); -const char *e_mixer_pulse_get_channel_name(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel); Eina_List *e_mixer_pulse_get_channels(const E_Mixer_System *self); Eina_List *e_mixer_pulse_get_channel_names(const E_Mixer_System *self); @@ -130,7 +126,6 @@ int e_mixer_pulse_set_volume(const E_Mixer_System *self, const E_Mixer_Channel_I int e_mixer_pulse_get_mute(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, int *mute); int e_mixer_pulse_set_mute(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, int mute); int e_mixer_pulse_get_state(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, E_Mixer_Channel_State *state); -int e_mixer_pulse_set_state(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, const E_Mixer_Channel_State *state); /** * @addtogroup Optional_Devices diff --git a/src/modules/mixer/sys_alsa.c b/src/modules/mixer/sys_alsa.c index 208a45205..fdd1eaf4e 100644 --- a/src/modules/mixer/sys_alsa.c +++ b/src/modules/mixer/sys_alsa.c @@ -461,23 +461,6 @@ e_mixer_system_get_channel_by_name(const E_Mixer_System *self, return NULL; } -const char * -e_mixer_system_get_channel_name(const E_Mixer_System *self, - const E_Mixer_Channel_Info *channel) -{ - snd_mixer_selem_id_t *sid; - const char *name; - - if ((!self) || (!channel) || (!channel->id) ) - return NULL; - - snd_mixer_selem_id_alloca(&sid); - snd_mixer_selem_get_id(channel->id, sid); - name = eina_stringshare_add(snd_mixer_selem_id_get_name(sid)); - - return name; -} - int e_mixer_system_get_volume(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, @@ -640,18 +623,3 @@ e_mixer_system_get_state(const E_Mixer_System *self, r &= e_mixer_system_get_volume(self, channel, &state->left, &state->right); return r; } - -int -e_mixer_system_set_state(const E_Mixer_System *self, - const E_Mixer_Channel_Info *channel, - const E_Mixer_Channel_State *state) -{ - int r; - - if (!state) - return 0; - - r = e_mixer_system_set_mute(self, channel, state->mute); - r &= e_mixer_system_set_volume(self, channel, state->left, state->right); - return r; -} diff --git a/src/modules/mixer/sys_dummy.c b/src/modules/mixer/sys_dummy.c index 0fb6441b7..79a26e051 100644 --- a/src/modules/mixer/sys_dummy.c +++ b/src/modules/mixer/sys_dummy.c @@ -110,20 +110,6 @@ e_mixer_system_get_channel_by_name(const E_Mixer_System *self __UNUSED__, const return NULL; } -const char * -e_mixer_system_get_channel_name(const E_Mixer_System *self __UNUSED__, - const E_Mixer_Channel_Info *channel) -{ - _e_mixer_dummy_set(); - - if (!channel) - return NULL; - if (channel->id == (E_Mixer_Channel *)-2) - return eina_stringshare_ref(_name); - else - return NULL; -} - int e_mixer_system_get_volume(const E_Mixer_System *self __UNUSED__, const E_Mixer_Channel_Info *channel __UNUSED__, @@ -176,11 +162,3 @@ e_mixer_system_get_state(const E_Mixer_System *self __UNUSED__, return 1; } - -int -e_mixer_system_set_state(const E_Mixer_System *self __UNUSED__, - const E_Mixer_Channel_Info *channel __UNUSED__, - const E_Mixer_Channel_State *state __UNUSED__) -{ - return 0; -} diff --git a/src/modules/mixer/sys_pulse.c b/src/modules/mixer/sys_pulse.c index 96973319d..d21c0ed19 100644 --- a/src/modules/mixer/sys_pulse.c +++ b/src/modules/mixer/sys_pulse.c @@ -511,14 +511,6 @@ e_mixer_pulse_get_channel_by_name(const E_Mixer_System *self EINA_UNUSED, return ch_info; } -const char * -e_mixer_pulse_get_channel_name(const E_Mixer_System *self EINA_UNUSED, - const E_Mixer_Channel_Info *channel) -{ - if (!channel) return NULL; - return eina_stringshare_ref(_name); -} - int e_mixer_pulse_get_volume(const E_Mixer_System *self, const E_Mixer_Channel_Info *channel, int *left, int *right) @@ -622,12 +614,3 @@ e_mixer_pulse_get_state(const E_Mixer_System *self, return 1; } -int -e_mixer_pulse_set_state(const E_Mixer_System *self, - const E_Mixer_Channel_Info *channel, - const E_Mixer_Channel_State *state) -{ - e_mixer_pulse_set_volume(self, channel, state->left, state->right); - e_mixer_pulse_set_mute(self, channel, state->mute); - return 1; -}