Mercurial > emacs
comparison src/sound.c @ 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 | 107ccd98fa12 |
children | 8971ddf55736 |
comparison
equal
deleted
inserted
replaced
92703:0905c6be13b6 | 92704:22bce4d93530 |
---|---|
1103 e; | 1103 e; |
1104 e = snd_mixer_elem_next (e)) | 1104 e = snd_mixer_elem_next (e)) |
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); |
1114 } | 1114 } |
1115 } | 1115 } |