From 555ea5c9b28a2e76bcbbea658404db1557c68323 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Thu, 27 Jul 2023 11:57:28 +0100 Subject: [PATCH] Fix compile errors for soundAgc and limitSoundDynamics - but not ideal, should only be on the sender --- usermods/audioreactive/audio_reactive.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index 247630d4..f1d64668 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -87,6 +87,12 @@ static bool udpSamplePeak = false; // Boolean flag for peak. Set at the same t static unsigned long timeOfPeak = 0; // time of last sample peak detection. static uint8_t fftResult[NUM_GEQ_CHANNELS]= {0};// Our calculated freq. channel result table to be used by effects +static uint8_t soundAgc = 1; // Automagic gain control: 0 - none, 1 - normal, 2 - vivid, 3 - lazy (config value) + +// user settable parameters for limitSoundDynamics() +static bool limiterOn = true; // bool: enable / disable dynamics limiter +static uint16_t attackTime = 50; // int: attack time in milliseconds. Default 0.08sec +static uint16_t decayTime = 300; // int: decay time in milliseconds. New default 300ms. Old default was 1.40sec #ifdef ARDUINO_ARCH_ESP32 @@ -107,12 +113,7 @@ static uint8_t inputLevel = 128; // UI slider value #else uint8_t sampleGain = SR_GAIN; // sample gain (config value) #endif -static uint8_t soundAgc = 1; // Automagic gain control: 0 - none, 1 - normal, 2 - vivid, 3 - lazy (config value) -// user settable parameters for limitSoundDynamics() -static bool limiterOn = true; // bool: enable / disable dynamics limiter -static uint16_t attackTime = 50; // int: attack time in milliseconds. Default 0.08sec -static uint16_t decayTime = 300; // int: decay time in milliseconds. New default 300ms. Old default was 1.40sec // user settable options for FFTResult scaling static uint8_t FFTScalingMode = 3; // 0 none; 1 optimized logarithmic; 2 optimized linear; 3 optimized sqare root #ifndef SR_FREQ_PROF