From a9ac165c39601dfe298752f6ca0c731eba7ceeb4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 6 Jan 2021 17:19:10 -0800 Subject: Properly trace the new HRTF delay for the B-Format decoder --- alc/hrtf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alc') diff --git a/alc/hrtf.cpp b/alc/hrtf.cpp index c790b415..717f467c 100644 --- a/alc/hrtf.cpp +++ b/alc/hrtf.cpp @@ -367,8 +367,8 @@ void DirectHrtfState::build(const HrtfStore *Hrtf, const uint irSize, } tmpres.clear(); - max_delay = hrir_delay_round(max_delay - min_delay); - const uint max_length{minu(max_delay + irSize, HrirLength)}; + max_delay -= min_delay; + const uint max_length{minu(hrir_delay_round(max_delay) + irSize, HrirLength)}; TRACE("Skipped delay: %.2f, new max delay: %.2f, FIR length: %u\n", min_delay/double{HrirDelayFracOne}, max_delay/double{HrirDelayFracOne}, -- cgit v1.2.3