From 6f532fa0e5a42354d423db1f4d2e034769eacc0f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 14 Jan 2018 07:33:53 -0800 Subject: [PATCH] Don't check the modulation depth for changes multiple times --- Alc/effects/reverb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index 206362a2..a024a5ac 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -1341,18 +1341,19 @@ static ALvoid ALreverbState_update(ALreverbState *State, const ALCcontext *Conte /* Determine if delay-line cross-fading is required. */ for(i = 0;i < NUM_LINES;i++) { - if((State->EarlyDelayTap[i][1] != State->EarlyDelayTap[i][0]) || - (State->Early.VecAp.Offset[i][1] != State->Early.VecAp.Offset[i][0]) || - (State->Early.Offset[i][1] != State->Early.Offset[i][0]) || - (State->LateDelayTap[i][1] != State->LateDelayTap[i][0]) || - (State->Late.VecAp.Offset[i][1] != State->Late.VecAp.Offset[i][0]) || - (State->Late.Offset[i][1] != State->Late.Offset[i][0]) || - (State->Mod.Depth[1] != State->Mod.Depth[0])) + if(State->EarlyDelayTap[i][1] != State->EarlyDelayTap[i][0] || + State->Early.VecAp.Offset[i][1] != State->Early.VecAp.Offset[i][0] || + State->Early.Offset[i][1] != State->Early.Offset[i][0] || + State->LateDelayTap[i][1] != State->LateDelayTap[i][0] || + State->Late.VecAp.Offset[i][1] != State->Late.VecAp.Offset[i][0] || + State->Late.Offset[i][1] != State->Late.Offset[i][0]) { State->FadeCount = 0; break; } } + if(State->Mod.Depth[1] != State->Mod.Depth[0]) + State->FadeCount = 0; }