mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-07 04:10:27 -08:00
(alsa_configure): Declare vol at beginning of block.
This commit is contained in:
parent
2f9a87f57b
commit
646d0d127f
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue