Corrected array size, save 16kByte

pull/16/merge
boblark 1 year ago
parent 0a5ad29e74
commit 5a9be45938
  1. 4
      analyze_fft4096_iq_F32.h
  2. 2
      examples/TestFFT4096iq/TestFFT4096iq.ino

@ -92,6 +92,7 @@
* no matter how it is scaled, but this factor needs to be considered * no matter how it is scaled, but this factor needs to be considered
* when building the INO. * when building the INO.
*/ */
// Corrected sumsq[] array size. RSL 31 Dec 2022
#ifndef analyze_fft4096iq_h_ #ifndef analyze_fft4096iq_h_
#define analyze_fft4096iq_h_ #define analyze_fft4096iq_h_
@ -237,7 +238,8 @@ private:
float window[4096]; float window[4096];
float *pWin = window; float *pWin = window;
float fft_buffer[8192]; float fft_buffer[8192];
float sumsq[8192]; // Avoid re-use of output[] // Was float sumsq[8192]; // Avoid re-use of output[]
float sumsq[4096]; // 31 Dec 2022
uint8_t state = 0; uint8_t state = 0;
bool outputflag = false; bool outputflag = false;
audio_block_f32_t *inputQueueArray[2]; audio_block_f32_t *inputQueueArray[2];

@ -31,7 +31,7 @@ void setup(void) {
// The 4096 complex FFT needs 32 F32 memory for real and 32 for imag. // The 4096 complex FFT needs 32 F32 memory for real and 32 for imag.
// Set memory to more than 64, depending on other useage. // Set memory to more than 64, depending on other useage.
AudioMemory_F32(100); AudioMemory_F32(100);
Serial.println("FFT4096IQ Test"); Serial.println("FFT4096IQ Test 2");
sine_cos1.amplitude(1.0f); // Initialize Waveform Generator sine_cos1.amplitude(1.0f); // Initialize Waveform Generator

Loading…
Cancel
Save