mirror of
https://github.com/wled/WLED.git
synced 2025-07-10 12:26:31 +00:00
AR: fix for arduinoFFT 2.x API
in contrast to previous 'dev' versions, the storage for windowWeighingFactors is now managed internally by the arduinoFFT object.
This commit is contained in:
parent
cd5494fdd2
commit
3f9a6cae53
@ -183,7 +183,6 @@ constexpr uint16_t samplesFFT_2 = 256; // meaningfull part of FFT resul
|
|||||||
// These are the input and output vectors. Input vectors receive computed results from FFT.
|
// These are the input and output vectors. Input vectors receive computed results from FFT.
|
||||||
static float vReal[samplesFFT] = {0.0f}; // FFT sample inputs / freq output - these are our raw result bins
|
static float vReal[samplesFFT] = {0.0f}; // FFT sample inputs / freq output - these are our raw result bins
|
||||||
static float vImag[samplesFFT] = {0.0f}; // imaginary parts
|
static float vImag[samplesFFT] = {0.0f}; // imaginary parts
|
||||||
static float windowWeighingFactors[samplesFFT] = {0.0f};
|
|
||||||
|
|
||||||
// Create FFT object
|
// Create FFT object
|
||||||
// lib_deps += https://github.com/kosme/arduinoFFT#develop @ 1.9.2
|
// lib_deps += https://github.com/kosme/arduinoFFT#develop @ 1.9.2
|
||||||
@ -196,7 +195,8 @@ static float windowWeighingFactors[samplesFFT] = {0.0f};
|
|||||||
|
|
||||||
#include <arduinoFFT.h>
|
#include <arduinoFFT.h>
|
||||||
|
|
||||||
static ArduinoFFT<float> FFT = ArduinoFFT<float>( vReal, vImag, samplesFFT, SAMPLE_RATE, windowWeighingFactors);
|
/* Create FFT object with weighing factor storage */
|
||||||
|
static ArduinoFFT<float> FFT = ArduinoFFT<float>( vReal, vImag, samplesFFT, SAMPLE_RATE, true);
|
||||||
|
|
||||||
// Helper functions
|
// Helper functions
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user