diff --git a/code/client/snd_mem.c b/code/client/snd_mem.c index 655ae420..0ef3bd6b 100644 --- a/code/client/snd_mem.c +++ b/code/client/snd_mem.c @@ -126,13 +126,15 @@ static int ResampleSfx( sfx_t *sfx, int channels, int inrate, int inwidth, int s outcount = samples / stepscale; + srcsample = 0; samplefrac = 0; fracstep = stepscale * 256 * channels; chunk = sfx->soundData; for (i=0 ; i> 8; + srcsample += samplefrac >> 8; + samplefrac &= 255; samplefrac += fracstep; for (j=0 ; j> 8; + srcsample += samplefrac >> 8; + samplefrac &= 255; samplefrac += fracstep; for (j=0 ; j