jeyzu pushed a commit to branch devs/jeyzu/mixer.

commit 1fd9a9c7a23caa98fc768bee4bf61df241f46e15
Author: Jérémy Zurcher <[email protected]>
Date:   Fri Mar 1 08:43:05 2013 +0100

    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 4c2d6ff..a03da17 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 c7d1b38..f9800ce 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 208a452..fdd1eaf 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 0fb6441..79a26e0 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 9697331..d21c0ed 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;
-}

-- 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

Reply via email to