mirror of
https://github.com/alsa-project/alsa-utils
synced 2025-01-03 10:19:46 +01:00
Eliot Blennerhassett <bigblen@icqmail.com>: fixed negative ranges
This commit is contained in:
parent
04020b86d1
commit
ee36a832c1
1 changed files with 3 additions and 0 deletions
|
@ -493,6 +493,9 @@ mixer_calc_volume(snd_mixer_elem_t *elem,
|
|||
vol1 = max;
|
||||
else
|
||||
vol1 = mixer_conv(vol1, 0, 100, min, max);
|
||||
/* Note: we have delta in vol1 and we need to map our */
|
||||
/* delta value to hardware range */
|
||||
vol1 -= min;
|
||||
if (vol1 <= 0)
|
||||
vol1 = 1;
|
||||
if (vol < 0)
|
||||
|
|
Loading…
Reference in a new issue