audioreactive: workaround for ArduinoFFT bug 93

This fix works around a problem that was solved in upstream ArduinoFFT 2.0.2
This commit is contained in:
Frank
2024-04-18 12:57:29 +02:00
committed by GitHub
parent 0f79e9b7ff
commit 0e0728b15d

View File

@@ -601,6 +601,7 @@ void FFTcode(void * parameter)
FFT.windowing(FFTWindow::Blackman_Harris, FFTDirection::Forward); // Weigh data using "Blackman- Harris" window - sharp peaks due to excellent sideband rejection
#endif
FFT.compute( FFTDirection::Forward ); // Compute FFT
vReal[0] = 0; // The remaining DC offset on the signal produces a strong spike on position 0 that should be eliminated to avoid issues.
FFT.complexToMagnitude(); // Compute magnitudes
#else
FFT.DCRemoval(); // let FFT lib remove DC component, so we don't need to care about this in getSamples()