aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)
1105 { 1105 {
1106 if (snd_mixer_selem_has_playback_volume (e)) 1106 if (snd_mixer_selem_has_playback_volume (e))
1107 { 1107 {
1108 long pmin, pmax; 1108 long pmin, pmax, vol;
1109 snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax); 1109 snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax);
1110 long vol = pmin + (sd->volume * (pmax - pmin)) / 100; 1110 vol = pmin + (sd->volume * (pmax - pmin)) / 100;
1111 1111
1112 for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++) 1112 for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++)
1113 snd_mixer_selem_set_playback_volume (e, chn, vol); 1113 snd_mixer_selem_set_playback_volume (e, chn, vol);