Enlightenment CVS committal

Author  : tsauerbeck
Project : misc
Module  : eplayer

Dir     : misc/eplayer/src/output/alsa


Modified Files:
        alsa.c 


Log Message:
Fix alsa mixer levels being reset on startup. D'oh!
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/output/alsa/alsa.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- alsa.c      24 Oct 2003 11:38:49 -0000      1.4
+++ alsa.c      30 Nov 2003 11:46:10 -0000      1.5
@@ -153,16 +153,14 @@
 }
 
 static void init_master() {
-       long min, max;
+       long min = 0, max = 0;
        int vol[2] = {0};
        
        snd_mixer_selem_get_playback_volume_range(master_ctrl, &min, &max);
        snd_mixer_selem_set_playback_volume_range(master_ctrl, 0, 100);
 
-       if (!alsa_volume_get(vol, &vol[1]))
-               return;
-
-       alsa_volume_set(vol[0] / max * 100, vol[1] / max * 100);
+       if (alsa_volume_get(vol, &vol[1]))
+               alsa_volume_set(vol[0] * 100 / max, vol[1] * 100 / max);
 }
 
 static snd_mixer_t *open_mixer() {




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to