diff options
author | Chris Robinson <[email protected]> | 2022-12-20 01:36:21 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-12-20 01:43:03 -0800 |
commit | 860fa9ccaf8039de9edd314a3fdf4d037f332b9e (patch) | |
tree | 5d5ce0546bc079605dc6224d136585cfc9257461 | |
parent | e87623c06d4840a870c9dd70c7b68bb507ba217e (diff) |
Make sure to update the input filters with partial updates
-rw-r--r-- | alc/effects/reverb.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index 5c71551c..3010f678 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -1173,6 +1173,17 @@ void ReverbState::update(const ContextBase *Context, const EffectSlot *Slot, if(!fullUpdate) { + /* Calculate the master filters */ + float hf0norm{minf(mParams.HFReference/frequency, 0.49f)}; + pipeline.mFilter[0].Lp.setParamsFromSlope(BiquadType::HighShelf, hf0norm, props->Reverb.GainHF, 1.0f); + float lf0norm{minf(mParams.LFReference/frequency, 0.49f)}; + pipeline.mFilter[0].Hp.setParamsFromSlope(BiquadType::LowShelf, lf0norm, props->Reverb.GainLF, 1.0f); + for(size_t i{1u};i < NUM_LINES;i++) + { + pipeline.mFilter[i].Lp.copyParamsFrom(pipeline.mFilter[0].Lp); + pipeline.mFilter[i].Hp.copyParamsFrom(pipeline.mFilter[0].Hp); + } + /* The density-based room size (delay length) multiplier. */ const float density_mult{CalcDelayLengthMult(mParams.Density)}; @@ -1182,7 +1193,6 @@ void ReverbState::update(const ContextBase *Context, const EffectSlot *Slot, } else { - /* Calculate the master filters */ float hf0norm{minf(props->Reverb.HFReference/frequency, 0.49f)}; pipeline.mFilter[0].Lp.setParamsFromSlope(BiquadType::HighShelf, hf0norm, props->Reverb.GainHF, 1.0f); float lf0norm{minf(props->Reverb.LFReference/frequency, 0.49f)}; |