Skip to content

Commit

Permalink
skip call to logAudio when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
softhack007 committed Mar 9, 2022
1 parent b0a6c0a commit 858f03a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wled00/usermod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ void userLoop() {
getSample(); // Sample the microphone
agcAvg(); // Calculated the PI adjusted value as sampleAvg
myVals[millis()%32] = sampleAgc;
#if defined(MIC_LOGGER) || defined(MIC_SAMPLING_LOG) || defined(FFT_SAMPLING_LOG)
EVERY_N_MILLIS(20) {
logAudio();
}
#endif

}
if (audioSyncEnabled & (1 << 0)) { // Only run the transmit code IF we're in Transmit mode
//Serial.println("Transmitting UDP Mic Packet");
Expand Down

0 comments on commit 858f03a

Please sign in to comment.