add a comment

This commit is contained in:
Eric Wasylishen 2011-12-28 20:56:27 -07:00
parent 34079f1ae1
commit ecaa3007b2

View file

@ -92,6 +92,11 @@ static void ResampleSfx (sfx_t *sfx, int inrate, int inwidth, byte *data)
if (stepscale < 1)
{
// upsampling
// linearly interpolate between the two closest source samples.
// this alone sounds much better than id's method, but still produces
// high-frequency junk.
for (i = 0, samplefrac = 0; i < outcount; i++, samplefrac += stepscale)
{
int srcsample1 = CLAMP(0, floor(samplefrac), incount - 1);