Eina_List *l;
app->card = e_mod_mixer_card_default_get();
- app->cards = e_mod_mixer_cards_get();
+ app->cards = e_mod_mixer_card_names_get();
if (eina_list_count(app->cards) < 2)
return;
eina_stringshare_del(app->card);
eina_stringshare_del(app->channel_name);
if (app->cards)
- e_mod_mixer_cards_free(app->cards);
+ e_mod_mixer_card_names_free(app->cards);
if (app->channels_infos)
e_mod_mixer_channels_info_free(app->channels_infos);
e_mod_mixer_del(app->sys);
int i = 0;
cfdata->card_num = -1;
- cfdata->cards = e_mod_mixer_cards_get();
+ cfdata->cards = e_mod_mixer_card_names_get();
cfdata->cards_names = NULL;
EINA_LIST_FOREACH(cfdata->cards, l, card)
{
if (cfdata->channels_names)
e_mod_mixer_channels_names_free(cfdata->channels_names);
if (cfdata->cards)
- e_mod_mixer_cards_free(cfdata->cards);
+ e_mod_mixer_card_names_free(cfdata->cards);
eina_stringshare_del(cfdata->card);
eina_stringshare_del(cfdata->channel_name);
E_Mixer_Cb e_mod_mixer_channels_get;
E_Mixer_Cb e_mod_mixer_channels_names_get;
E_Mixer_Cb e_mod_mixer_card_name_get;
-E_Mixer_Cb e_mod_mixer_cards_get;
-E_Mixer_Cb e_mod_mixer_cards_free;
+E_Mixer_Cb e_mod_mixer_card_names_get;
E_Mixer_Cb e_mod_mixer_card_default_get;
void
e_mod_mixer_channels_get = (void *)e_mixer_alsa_get_channels;
e_mod_mixer_channels_names_get = (void *)e_mixer_alsa_get_channels_names;
e_mod_mixer_card_name_get = (void *)e_mixer_alsa_get_card_name;
- e_mod_mixer_cards_get = (void *)e_mixer_alsa_get_cards;
- e_mod_mixer_cards_free = (void *)e_mixer_alsa_free_cards;
+ e_mod_mixer_card_names_get = (void *)e_mixer_alsa_get_cards;
e_mod_mixer_card_default_get = (void *)e_mixer_alsa_get_default_card;
_mixer_using_default = EINA_TRUE;
}
e_mod_mixer_channels_get = (void *)e_mixer_pulse_get_channels;
e_mod_mixer_channels_names_get = (void *)e_mixer_pulse_get_channels_names;
e_mod_mixer_card_name_get = (void *)e_mixer_pulse_get_card_name;
- e_mod_mixer_cards_get = (void *)e_mixer_pulse_get_cards;
- e_mod_mixer_cards_free = (void *)e_mixer_pulse_free_cards;
+ e_mod_mixer_card_names_get = (void *)e_mixer_pulse_get_cards;
e_mod_mixer_card_default_get = (void *)e_mixer_pulse_get_default_card;
_mixer_using_default = EINA_FALSE;
}
eina_stringshare_del(str);
}
+void
+e_mod_mixer_card_names_free(Eina_List *list)
+{
+ const char *str;
+ EINA_LIST_FREE(list, str)
+ eina_stringshare_del(str);
+}
+
extern E_Mixer_Cb e_mod_mixer_channel_free;
extern E_Mixer_Cb e_mod_mixer_channels_names_get;
extern E_Mixer_Cb e_mod_mixer_card_name_get;
-extern E_Mixer_Cb e_mod_mixer_cards_get;
-extern E_Mixer_Cb e_mod_mixer_cards_free;
+extern E_Mixer_Cb e_mod_mixer_card_names_get;
extern E_Mixer_Cb e_mod_mixer_card_default_get;
Eina_List *e_mod_mixer_channels_info_get(E_Mixer_System *sys);
void e_mod_mixer_channels_info_free(Eina_List*);
void e_mod_mixer_channels_names_free(Eina_List*);
+void e_mod_mixer_card_names_free(Eina_List*);
void e_mixer_default_setup(void);
void e_mixer_pulse_setup();
void e_mixer_alsa_del(E_Mixer_System *self);
Eina_List *e_mixer_alsa_get_cards(void);
-void e_mixer_alsa_free_cards(Eina_List *cards);
const char *e_mixer_alsa_get_default_card(void);
const char *e_mixer_alsa_get_card_name(const char *card);
const char *e_mixer_alsa_get_channel_name(E_Mixer_System *self, E_Mixer_Channel *channel);
void e_mixer_pulse_del(E_Mixer_System *self);
Eina_List *e_mixer_pulse_get_cards(void);
-void e_mixer_pulse_free_cards(Eina_List *cards);
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(E_Mixer_System *self, E_Mixer_Channel *channel);
return cards;
}
-void
-e_mixer_alsa_free_cards(Eina_List *cards)
-{
- const char *card;
-
- EINA_LIST_FREE(cards, card)
- eina_stringshare_del(card);
-}
-
const char *
e_mixer_alsa_get_default_card(void)
{
{
_e_mixer_dummy_set();
- return eina_list_append(NULL, _name);
-}
-
-void
-e_mixer_system_free_cards(Eina_List *cards)
-{
- eina_list_free(cards);
+ return eina_list_append(NULL, eina_stringshare_ref(_name));
}
const char *
return ret;
}
-void
-e_mixer_pulse_free_cards(Eina_List *cards)
-{
- E_FREE_LIST(cards, eina_stringshare_del);
-}
-
const char *
e_mixer_pulse_get_default_card(void)
{