Enlightenment CVS committal Author : devilhorns Project : e_modules Module : mixer
Dir : e_modules/mixer Modified Files: alsa_mixer.c Log Message: More diligent about closing alsa mixer handles. =================================================================== RCS file: /cvs/e/e_modules/mixer/alsa_mixer.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- alsa_mixer.c 11 Sep 2006 16:09:01 -0000 1.9 +++ alsa_mixer.c 11 Sep 2006 16:49:18 -0000 1.10 @@ -60,7 +60,7 @@ cards = evas_list_append(cards, card); } - + snd_mixer_close(handle); return cards; } @@ -127,16 +127,19 @@ if ((err = snd_ctl_open(&control, buf, 0)) < 0) { printf("Cannot control: %s: %s\n", buf, snd_strerror(err)); + snd_mixer_close(handle); continue; } if ((err = snd_ctl_card_info(control, hw_info)) < 0) { printf("Cannot get hardware info: %s: %s\n", buf, snd_strerror(err)); snd_ctl_close(control); + snd_mixer_close(handle); continue; } snd_ctl_close(control); + snd_mixer_close(handle); card = E_NEW(Mixer_Card, 1); if (!card) continue; @@ -145,10 +148,12 @@ card->id = _alsa_get_card_id(card->real); if (!_alsa_get_card_id(card->real) == id) continue; - - card->channels = alsa_card_get_channels(card); + + card->channels = alsa_card_get_channels(card); return card; } + snd_ctl_close(control); + snd_mixer_close(handle); return NULL; } @@ -238,6 +243,7 @@ } } } + snd_mixer_close(handle); return channels; } ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs