Fixed halfed volume with HPF on

noise_reduction
AlexandreRouma 2023-03-25 21:22:40 +01:00
rodzic 3420808f3a
commit a9f882e5b1
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -15,7 +15,7 @@ namespace dsp::taps {
if (oddTapCount && !(count % 2)) { count++; }
return windowedSinc<T>(count, (bandStop - bandStart) / 2.0, sampleRate, [=](double n, double N) {
if constexpr (std::is_same_v<T, float>) {
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<T, complex_t>) {
// The offset is negative to flip the taps. Complex bandpass are asymetric