Fix a bug in volume calculation, this sometimes gives a USB audio device an

unexpected value (when the volume is high).

Submitted by:	Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>
This commit is contained in:
Alexander Leidinger 2005-09-11 09:15:42 +00:00
parent 908b3deb2b
commit caad740808

View File

@ -4170,10 +4170,10 @@ uaudio_mixer_set(device_t dev, unsigned type, unsigned left, unsigned right)
if (mc->ctl == type) {
if (mc->nchan == 2) {
/* set Right */
uaudio_ctl_set(sc, SET_CUR, mc, 1, (int)(right*256)/100);
uaudio_ctl_set(sc, SET_CUR, mc, 1, (int)(right*255)/100);
}
/* set Left or Mono */
uaudio_ctl_set(sc, SET_CUR, mc, 0, (int)(left*256)/100);
uaudio_ctl_set(sc, SET_CUR, mc, 0, (int)(left*255)/100);
}
}
return;