From 1541ff24b87a3baee834fa8d8782d10eadb18c8e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 6 Sep 2016 07:02:17 -0700 Subject: Do reverb modulation before band-pass filtering Ideally the band-pass should probably happen closer to output, like gain is. However, doing that would require 16 filters (4 early + 4 late channels, each with a low-pass and high-pass filter), compared to the two needed to do it on input. --- Alc/effects/reverb.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Alc/effects') diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index 3bdf9b91..c10cd8f0 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -1378,15 +1378,14 @@ static inline ALvoid EAXVerbPass(ALreverbState *State, ALuint todo, const ALfloa { ALuint i; - // Band-pass and modulate the incoming samples (use the early buffer as temp storage). - ALfilterState_process(&State->LpFilter, &early[0][0], input, todo); - ALfilterState_process(&State->HpFilter, + /* Perform any modulation on the input (use the early buffer as temp storage). */ + EAXModulation(State, State->Offset, &early[0][0], input, todo); + /* Band-pass the incoming samples */ + ALfilterState_process(&State->LpFilter, &early[MAX_UPDATE_SAMPLES/4][0], &early[0][0], todo ); - // Perform any modulation on the input. - EAXModulation(State, State->Offset, - &early[MAX_UPDATE_SAMPLES*2/4][0], &early[MAX_UPDATE_SAMPLES/4][0], - todo + ALfilterState_process(&State->HpFilter, + &early[MAX_UPDATE_SAMPLES*2/4][0], &early[MAX_UPDATE_SAMPLES/4][0], todo ); // Feed the initial delay line. -- cgit v1.2.3