Eliot Blennerhassett <bigblen@icqmail.com>: fixed negative ranges

This commit is contained in:
Jaroslav Kysela 2003-05-28 09:04:52 +00:00
parent 04020b86d1
commit ee36a832c1

View file

@ -493,6 +493,9 @@ mixer_calc_volume(snd_mixer_elem_t *elem,
vol1 = max; vol1 = max;
else else
vol1 = mixer_conv(vol1, 0, 100, min, max); 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) if (vol1 <= 0)
vol1 = 1; vol1 = 1;
if (vol < 0) if (vol < 0)