From 0979fb684458d708f58d039ab01c6436e96bc41d Mon Sep 17 00:00:00 2001 From: Enrique Condes Date: Thu, 21 Nov 2024 21:21:31 +0800 Subject: [PATCH] Fix Hann windowing coefficient --- src/arduinoFFT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arduinoFFT.cpp b/src/arduinoFFT.cpp index a9604a0..7df82fe 100644 --- a/src/arduinoFFT.cpp +++ b/src/arduinoFFT.cpp @@ -344,7 +344,7 @@ void ArduinoFFT::windowing(T *vData, uint_fast16_t samples, weighingFactor = 0.54 - (0.46 * cos(twoPi * ratio)); break; case FFTWindow::Hann: // hann - weighingFactor = 0.54 * (1.0 - cos(twoPi * ratio)); + weighingFactor = 0.50 * (1.0 - cos(twoPi * ratio)); break; case FFTWindow::Triangle: // triangle (Bartlett) #if defined(ESP8266) || defined(ESP32)