diff options
author | Chris Robinson <[email protected]> | 2022-12-22 18:01:51 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-12-22 18:01:51 -0800 |
commit | 17f725d41837acbf6cc617b3032e4a064b685833 (patch) | |
tree | d3e19f0ad12d0066bde34814e8e450b5a6b69779 /alc/effects | |
parent | 465df3e3ef9dca52077247ca451880bc1c294e3a (diff) |
Avoid duplicate code to update the reverb delay lines
Diffstat (limited to 'alc/effects')
-rw-r--r-- | alc/effects/reverb.cpp | 21 |
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); |