]> git.eshelyaron.com Git - emacs.git/commitdiff
(alsa_configure): Declare vol at beginning of block.
authorJan Djärv <jan.h.d@swipnet.se>
Mon, 10 Mar 2008 08:10:51 +0000 (08:10 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Mon, 10 Mar 2008 08:10:51 +0000 (08:10 +0000)
src/sound.c

index 0b153991c185588d9902bdcfdaadea88e422592b..8aaef9d746a6d3870e1539e6b8e61c0502d26b9e 100644 (file)
@@ -1105,9 +1105,9 @@ alsa_configure (sd)
               {
                 if (snd_mixer_selem_has_playback_volume (e))
                   {
-                    long pmin, pmax;
+                    long pmin, pmax, vol;
                     snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax);
-                    long vol = pmin + (sd->volume * (pmax - pmin)) / 100;
+                    vol = pmin + (sd->volume * (pmax - pmin)) / 100;
 
                     for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++)
                       snd_mixer_selem_set_playback_volume (e, chn, vol);