From a9f882e5b194c55157742e36864c863858a58966 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Sat, 25 Mar 2023 21:22:40 +0100 Subject: [PATCH] Fixed halfed volume with HPF on --- core/src/dsp/taps/band_pass.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/dsp/taps/band_pass.h b/core/src/dsp/taps/band_pass.h index 56ac1ac7..b296c36a 100644 --- a/core/src/dsp/taps/band_pass.h +++ b/core/src/dsp/taps/band_pass.h @@ -15,7 +15,7 @@ namespace dsp::taps { if (oddTapCount && !(count % 2)) { count++; } return windowedSinc(count, (bandStop - bandStart) / 2.0, sampleRate, [=](double n, double N) { if constexpr (std::is_same_v) { - return cosf(offsetOmega * (float)n) * window::nuttall(n, N); + return 2.0f * cosf(offsetOmega * (float)n) * window::nuttall(n, N); } if constexpr (std::is_same_v) { // The offset is negative to flip the taps. Complex bandpass are asymetric