changeset 92704:22bce4d93530

(alsa_configure): Declare vol at beginning of block.
author Jan Djärv <jan.h.d@swipnet.se>
date Mon, 10 Mar 2008 08:10:51 +0000
parents 0905c6be13b6
children e9a2a0f6094f
files src/sound.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/sound.c	Mon Mar 10 05:02:55 2008 +0000
+++ b/src/sound.c	Mon Mar 10 08:10:51 2008 +0000
@@ -1105,9 +1105,9 @@
               {
                 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);