Enlightenment CVS committal
Author : devilhorns
Project : e_modules
Module : echo
Dir : e_modules/echo/src
Modified Files:
e_mod_alsa.c
Log Message:
Don't keep the old code around. Doesn't work for 2 cards, no point in
keeping it :)
===================================================================
RCS file: /cvs/e/e_modules/echo/src/e_mod_alsa.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_mod_alsa.c 14 Jan 2008 09:31:29 -0000 1.3
+++ e_mod_alsa.c 14 Jan 2008 20:17:24 -0000 1.4
@@ -34,17 +34,16 @@
EAPI Evas_List *
e_mod_alsa_get_cards(void)
{
- Evas_List *cards = NULL;
-#if 1
int i, err;
char buf[256];
snd_ctl_t *control;
snd_ctl_card_info_t *hw_info;
+ Evas_List *cards = NULL;
snd_ctl_card_info_alloca(&hw_info);
for (i = 0; i < 32; i++)
{
- char *name;
+ char *name = NULL;
snprintf(buf, sizeof(buf), "hw:%d", i);
if ((err = snd_ctl_open(&control, buf, 0)) < 0) break;
@@ -60,25 +59,10 @@
if (name)
{
cards = evas_list_append(cards, evas_stringshare_add(name));
+ free(name);
}
}
-
-#else
- /* doesnt seem to work for 2 cards for me? */
- int i = -1, err = -1;
- err = snd_card_next(&i);
- while ((i >= 0) && (err >= 0))
- {
- char *name = NULL;
-
- err = snd_card_get_name(i, &name);
- if (err < 0) break;
- cards = evas_list_append(cards, name);
- i++;
- err = snd_card_next(&i);
- }
-#endif
return cards;
}
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs