X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ba69b876ac836a88877dab99e6fc2352dd36c855..5371d722ecd94db9d5b3b21f4b91d073a38bd73b:/src/sound.c diff --git a/src/sound.c b/src/sound.c index 0873fe8b82..8aaef9d746 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1,6 +1,6 @@ /* sound.c -- sound support. Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, - 2005, 2006, 2007 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -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);