aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-22 18:01:51 -0800
committerChris Robinson <[email protected]>2022-12-22 18:01:51 -0800
commit17f725d41837acbf6cc617b3032e4a064b685833 (patch)
treed3e19f0ad12d0066bde34814e8e450b5a6b69779 /alc/effects
parent465df3e3ef9dca52077247ca451880bc1c294e3a (diff)
Avoid duplicate code to update the reverb delay lines
Diffstat (limited to 'alc/effects')
-rw-r--r--alc/effects/reverb.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index 1173108e..b5c178e9 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -1182,22 +1182,15 @@ void ReverbState::update(const ContextBase *Context, const EffectSlot *Slot,
pipeline.mFilter[i].Hp.copyParamsFrom(pipeline.mFilter[0].Hp);
}
- if(!fullUpdate)
- {
- /* The density-based room size (delay length) multiplier. */
- const float density_mult{CalcDelayLengthMult(mParams.Density)};
+ /* The density-based room size (delay length) multiplier. */
+ const float density_mult{CalcDelayLengthMult(props->Reverb.Density)};
- /* Update the main effect delay and associated taps. */
- pipeline.updateDelayLine(props->Reverb.ReflectionsDelay, props->Reverb.LateReverbDelay,
- density_mult, mParams.DecayTime, frequency);
- }
- else
- {
- const float density_mult{CalcDelayLengthMult(props->Reverb.Density)};
-
- pipeline.updateDelayLine(props->Reverb.ReflectionsDelay, props->Reverb.LateReverbDelay,
- density_mult, props->Reverb.DecayTime, frequency);
+ /* Update the main effect delay and associated taps. */
+ pipeline.updateDelayLine(props->Reverb.ReflectionsDelay, props->Reverb.LateReverbDelay,
+ density_mult, props->Reverb.DecayTime, frequency);
+ if(fullUpdate)
+ {
/* Update the early lines. */
pipeline.mEarly.updateLines(density_mult, props->Reverb.Diffusion, props->Reverb.DecayTime,
frequency);