Clamp volume of 16-bit channels at 255 as well

This commit is contained in:
Eric Wasylishen 2011-01-17 14:07:18 -07:00
parent 85d97fac9a
commit 4dab33292e
1 changed files with 6 additions and 1 deletions

View File

@ -289,7 +289,12 @@ void SND_PaintChannelFrom16 (channel_t *ch, sfxcache_t *sc, int count)
int leftvol, rightvol;
signed short *sfx;
int i;
if (ch->leftvol > 255)
ch->leftvol = 255;
if (ch->rightvol > 255)
ch->rightvol = 255;
leftvol = ch->leftvol * snd_vol;
rightvol = ch->rightvol * snd_vol;
sfx = (signed short *)sc->data + ch->pos;