diff options
author | Chris Robinson <[email protected]> | 2023-11-22 07:28:50 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-11-22 07:28:50 -0800 |
commit | 403aaa4fdd0ddca725cb06560dda99f8766e0750 (patch) | |
tree | b0b2e01351664be73f706738178ee25cf725c688 /alc | |
parent | 62c5b38c811ac1552a1cadb00604477ebb39c646 (diff) |
Compensate the late delay tap by the early delay buffer
Diffstat (limited to 'alc')
-rw-r--r-- | alc/effects/reverb.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index 5068c8d7..1af50559 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -1018,8 +1018,12 @@ void ReverbPipeline::updateDelayLine(const float earlyDelay, const float lateDel mEarlyDelayTap[i][1] = float2uint((earlyDelay+length) * frequency); mEarlyDelayCoeff[i] = CalcDecayCoeff(length, decayTime); + /* Reduce the late delay tap by the shortest early delay line length to + * compensate for the late line input being fed by the delayed early + * output. + */ length = (LATE_LINE_LENGTHS[i] - LATE_LINE_LENGTHS.front())/float{NUM_LINES}*density_mult + - lateDelay; + std::max(lateDelay - EARLY_LINE_LENGTHS[0]*density_mult, 0.0f); mLateDelayTap[i][1] = float2uint(length * frequency); } } |