From 06344aeb41f203ba1002a11bba0896fa6f9b6263 Mon Sep 17 00:00:00 2001 From: TroyHacks <5659019+troyhacks@users.noreply.github.com> Date: Wed, 7 Jun 2023 10:35:28 -0400 Subject: [PATCH] FFT UDP fush if not read. --- usermods/audioreactive/audio_reactive.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index ca37805b..434f3943 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -1775,6 +1775,8 @@ class AudioReactive : public Usermod { have_new_sample = receiveAudioData(); if (have_new_sample) last_UDPTime = millis(); lastTime = millis(); + } else { + fftUdp.flush(); // WLEDMM: Flush this if we haven't read it. } if (have_new_sample) syncVolumeSmth = volumeSmth; // remember received sample else volumeSmth = syncVolumeSmth; // restore originally received sample for next run of dynamics limiter