Skip to content

Commit

Permalink
small fixie for audioreactive (info page)
Browse files Browse the repository at this point in the history
info page was not showing "AGC gain" when local mic was in use during "receive or local" mode.
  • Loading branch information
softhack007 committed Dec 6, 2023
1 parent d2fc1f7 commit 6cd9d80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usermods/audioreactive/audio_reactive.h
Original file line number Diff line number Diff line change
Expand Up @@ -2371,13 +2371,13 @@ class AudioReactive : public Usermod {
}

// AGC or manual Gain
if ((soundAgc==0) && (disableSoundProcessing == false) && !(audioSyncEnabled & AUDIOSYNC_REC)) {
if ((soundAgc == 0) && (disableSoundProcessing == false) && !(audioSyncEnabled == AUDIOSYNC_REC)) {
infoArr = user.createNestedArray(F("Manual Gain"));
float myGain = ((float)sampleGain/40.0f * (float)inputLevel/128.0f) + 1.0f/16.0f; // non-AGC gain from presets
infoArr.add(roundf(myGain*100.0f) / 100.0f);
infoArr.add("x");
}
if (soundAgc && (disableSoundProcessing == false) && !(audioSyncEnabled & AUDIOSYNC_REC)) {
if ((soundAgc > 0) && (disableSoundProcessing == false) && !(audioSyncEnabled == AUDIOSYNC_REC)) {
infoArr = user.createNestedArray(F("AGC Gain"));
infoArr.add(roundf(multAgc*100.0f) / 100.0f);
infoArr.add("x");
Expand Down

0 comments on commit 6cd9d80

Please sign in to comment.