summaryrefslogtreecommitdiff
path: root/src/sound.c
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2008-03-10 08:10:51 +0000
committerJan Djärv <jan.h.d@swipnet.se>2008-03-10 08:10:51 +0000
commit646d0d127fc141cdf6d317d3bf05286fa296b656 (patch)
treec98ff4ef5495bad485170d43be7ca21446e75b15 /src/sound.c
parent2f9a87f57b20806aee27458b412fac2d7216c752 (diff)
downloademacs-646d0d127fc141cdf6d317d3bf05286fa296b656.tar.gz
(alsa_configure): Declare vol at beginning of block.
Diffstat (limited to 'src/sound.c')
-rw-r--r--src/sound.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sound.c b/src/sound.c
index 0b153991c18..8aaef9d746a 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -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);