Skip to content

Commit cec7241

Browse files
author
gaaat
committed
removed commented variables
1 parent 6de7729 commit cec7241

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

usermods/audioreactive/audio_reactive.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ static uint8_t inputLevel = 128; // UI slider value
119119
#else
120120
uint8_t sampleGain = SR_GAIN; // sample gain (config value)
121121
#endif
122-
//static uint8_t soundAgc = 1; // Automagic gain control: 0 - none, 1 - normal, 2 - vivid, 3 - lazy (config value)
123-
//static uint8_t audioSyncEnabled = 0; // bit field: bit 0 - send, bit 1 - receive (config value)
124-
//static bool udpSyncConnected = false; // UDP connection status -> true if connected to multicast group
125-
126122
// user settable options for FFTResult scaling
127123
static uint8_t FFTScalingMode = 3; // 0 none; 1 optimized logarithmic; 2 optimized linear; 3 optimized square root
128124

@@ -146,25 +142,8 @@ const float agcSampleSmooth[AGC_NUM_PRESETS] = { 1/12.f, 1/6.f, 1/16.f}; //
146142
// AGC presets end
147143

148144
static AudioSource *audioSource = nullptr;
149-
//static volatile bool disableSoundProcessing = false; // if true, sound processing (FFT, filters, AGC) will be suspended. "volatile" as its shared between tasks.
150145
static bool useBandPassFilter = false; // if true, enables a bandpass filter 80Hz-16Khz to remove noise. Applies before FFT.
151146

152-
// audioreactive variables shared with FFT task
153-
// static float micDataReal = 0.0f; // MicIn data with full 24bit resolution - lowest 8bit after decimal point
154-
// static float multAgc = 1.0f; // sample * multAgc = sampleAgc. Our AGC multiplier
155-
// static float sampleAvg = 0.0f; // Smoothed Average sample - sampleAvg < 1 means "quiet" (simple noise gate)
156-
// static float sampleAgc = 0.0f; // Smoothed AGC sample
157-
158-
// peak detection
159-
// static bool samplePeak = false; // Boolean flag for peak - used in effects. Responding routine may reset this flag. Auto-reset after strip.getMinShowDelay()
160-
// static uint8_t maxVol = 31; // Reasonable value for constant volume for 'peak detector', as it won't always trigger (deprecated)
161-
// static uint8_t binNum = 8; // Used to select the bin for FFT based beat detection (deprecated)
162-
// static bool udpSamplePeak = false; // Boolean flag for peak. Set at the same time as samplePeak, but reset by transmitAudioData
163-
// static unsigned long timeOfPeak = 0; // time of last sample peak detection.
164-
// static void detectSamplePeak(void); // peak detection function (needs scaled FFT results in vReal[])
165-
// static void autoResetPeak(void); // peak auto-reset function
166-
167-
168147
////////////////////
169148
// Begin FFT Code //
170149
////////////////////
@@ -176,17 +155,12 @@ void FFTcode(void * parameter); // audio processing task: read samples, run
176155
static void runMicFilter(uint16_t numSamples, float *sampleBuffer); // pre-filtering of raw samples (band-pass)
177156
static void postProcessFFTResults(bool noiseGateOpen, int numberOfChannels); // post-processing and post-amp of GEQ channels
178157

179-
//#define NUM_GEQ_CHANNELS 16 // number of frequency channels. Don't change !!
180-
181158
static TaskHandle_t FFT_Task = nullptr;
182159

183160
// Table of multiplication factors so that we can even out the frequency response.
184161
static float fftResultPink[NUM_GEQ_CHANNELS] = { 1.70f, 1.71f, 1.73f, 1.78f, 1.68f, 1.56f, 1.55f, 1.63f, 1.79f, 1.62f, 1.80f, 2.06f, 2.47f, 3.35f, 6.83f, 9.55f };
185162

186163
// globals and FFT Output variables shared with animations
187-
//static float FFT_MajorPeak = 1.0f; // FFT: strongest (peak) frequency
188-
//static float FFT_Magnitude = 0.0f; // FFT: volume (magnitude) of peak frequency
189-
//static uint8_t fftResult[NUM_GEQ_CHANNELS]= {0};// Our calculated freq. channel result table to be used by effects
190164
#if defined(WLED_DEBUG) || defined(SR_DEBUG)
191165
static uint64_t fftTime = 0;
192166
static uint64_t sampleTime = 0;

0 commit comments

Comments
 (0)