From 4dab33292e7589454d8f20eb269accba47a61dce Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 17 Jan 2011 14:07:18 -0700 Subject: [PATCH] Clamp volume of 16-bit channels at 255 as well --- Quake/snd_mix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Quake/snd_mix.c b/Quake/snd_mix.c index 53732762..7de32810 100644 --- a/Quake/snd_mix.c +++ b/Quake/snd_mix.c @@ -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;