kopia lustrzana https://github.com/debsahu/ESP32_FFT_Audio_LEDs
Fix buffer overflow bug in peak array
The peak array is only 7 bytes long, but there are 8 bytes written to it. This overwrites the variable, that the compiler decides to put afterwards, most likely the sample buffer vReal[]. Maybe this is also the reason why you decided to omit the first sample when iterating through vReal[]?pull/1/head
rodzic
da88434ac8
commit
88b43f9cb3
|
@ -19,7 +19,7 @@ arduinoFFT FFT = arduinoFFT();
|
||||||
int amplitude = 200;
|
int amplitude = 200;
|
||||||
unsigned int sampling_period_us;
|
unsigned int sampling_period_us;
|
||||||
unsigned long microseconds;
|
unsigned long microseconds;
|
||||||
byte peak[] = {0, 0, 0, 0, 0, 0, 0};
|
byte peak[] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
double vReal[SAMPLES];
|
double vReal[SAMPLES];
|
||||||
double vImag[SAMPLES];
|
double vImag[SAMPLES];
|
||||||
unsigned long newTime, oldTime;
|
unsigned long newTime, oldTime;
|
||||||
|
|
Ładowanie…
Reference in New Issue