We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a8e19d commit 2e266ecCopy full SHA for 2e266ec
usermods/audioreactive/audio_reactive.h
@@ -1095,7 +1095,7 @@ class AudioReactive : public Usermod {
1095
#endif
1096
if ((packetSize > 5) && (packetSize <= UDPSOUND_MAX_PACKET)) {
1097
//DEBUGSR_PRINTLN("Received UDP Sync Packet");
1098
- static uint8_t fftBuff[UDPSOUND_MAX_PACKET+1] = { 0 }; // static buffer for receiving, to reuse the same memory and avoid heap fragmentation
+ uint8_t fftBuff[UDPSOUND_MAX_PACKET+1] = { 0 }; // fixed-size buffer for receiving (stack), to avoid heap fragmentation caused by variable sized arrays
1099
fftUdp.read(fftBuff, packetSize);
1100
1101
// VERIFY THAT THIS IS A COMPATIBLE PACKET
0 commit comments