master: sys/dev/sound/pcm/vchan.c cb8ff21ad49e7a92c572b31c6e26ad74d0feed5f
qhwt+dfly at les.ath.cx
Tue Dec 2 18:46:42 PST 2008
On Mon, Dec 01, 2008 at 03:59:30PM -0800, Simon Schubert wrote:
- scale = (volume << 16) / 100;
+ scale = log_mix_cvt[volume];
I don't see how it's guaranteed that (volume < countof(log_mix_cvt) - 1).
The comment above that says `volume is in range 0-100', which is only
satisfied when (ch->volume & 0xff) + ((ch->volume >> 8) & 0xff) <= 200,
but I see no such check in the code under /sys/dev/sound...
More information about the Commits