From 880fa66efe70892706cc2377ba730a7de68bf34a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 25 Oct 2022 08:03:09 -0700 Subject: Fix some value ordering --- core/uhjfilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/uhjfilter.cpp b/core/uhjfilter.cpp index 82e23da4..3cbbc798 100644 --- a/core/uhjfilter.cpp +++ b/core/uhjfilter.cpp @@ -147,9 +147,9 @@ void UhjEncoder::encode(float *LeftOut, float *RightOut, { return -0.3420201f*w + 0.5098604f*x; }); PShift.process({mD.data(), SamplesToDo}, mWX.data()); - /* D = 0.6554516*Y + j(-0.3420201*W + 0.5098604*X) */ + /* D = j(-0.3420201*W + 0.5098604*X) + 0.6554516*Y */ for(size_t i{0};i < SamplesToDo;++i) - mD[i] = 0.6554516f*mY[i] + mD[i]; + mD[i] = mD[i] + 0.6554516f*mY[i]; /* Copy the future samples to the front for next time. */ std::copy(mW.cbegin()+SamplesToDo, mW.cbegin()+SamplesToDo+sFilterDelay, mW.begin()); -- cgit v1.2.3