audioreactive: better do DC removal after FFT.complexToMagnitude();

This commit is contained in:
Frank
2024-04-18 13:36:00 +02:00
parent 0e0728b15d
commit 7dc6659e70

View File

@@ -601,8 +601,8 @@ 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
vReal[0] = 0; // The remaining DC offset on the signal produces a strong spike on position 0 that should be eliminated to avoid issues.
#else
FFT.DCRemoval(); // let FFT lib remove DC component, so we don't need to care about this in getSamples()