aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-09-06 07:02:17 -0700
committerChris Robinson <[email protected]>2016-09-06 07:02:17 -0700
commit1541ff24b87a3baee834fa8d8782d10eadb18c8e (patch)
treec43d269f8b254931afefcb6f1958e4dff5947381 /Alc/effects
parentb1f70b5b786e7f00d104ba96bc9c4812c57f5793 (diff)
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.
Diffstat (limited to 'Alc/effects')
-rw-r--r--Alc/effects/reverb.c13
1 files changed, 6 insertions, 7 deletions
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.