diff options
-rw-r--r-- | core/uhjfilter.cpp | 4 |
1 files 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<N>::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()); |