Skip to content

Commit 0e0728b

Browse files
authored
audioreactive: workaround for ArduinoFFT bug 93
This fix works around a problem that was solved in upstream ArduinoFFT 2.0.2
1 parent 0f79e9b commit 0e0728b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

usermods/audioreactive/audio_reactive.h

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

0 commit comments

Comments
 (0)