From 62f1df77d71853f6793db6fe7e4b5dfa20209779 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 29 Oct 2015 01:40:23 -0700 Subject: Do up to 256 samples per reverb inner loop iteration --- Alc/effects/reverb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Alc/effects/reverb.c') diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index ea958f74..a0f800bb 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -34,7 +34,7 @@ /* This is the maximum number of samples processed for each inner loop * iteration. */ -#define MAX_UPDATE_SAMPLES 64 +#define MAX_UPDATE_SAMPLES 256 typedef struct DelayLine { @@ -648,7 +648,8 @@ static ALuint CalcLineLength(ALfloat length, ptrdiff_t offset, ALuint frequency, // All line lengths are powers of 2, calculated from their lengths, with // an additional sample in case of rounding errors. - samples = NextPowerOf2(fastf2u(length * frequency)+extra + 1); + samples = fastf2u(length*frequency) + extra; + samples = NextPowerOf2(samples + 1); // All lines share a single sample buffer. Delay->Mask = samples - 1; Delay->Line = (ALfloat*)offset; -- cgit v1.2.3