MCPcopy Create free account
hub / github.com/FastLED/FastLED / setMicProfile

Method setMicProfile

src/fl/audio/detector/equalizer.cpp.hpp:99–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void EqualizerDetector::setMicProfile(MicProfile profile) {
100 mCurrentMicProfile = profile;
101 MicResponseCurve curve = getMicResponseCurve(profile);
102 mHasMicCorrection = (curve.count > 0);
103 if (mHasMicCorrection) {
104 float binCenters[kNumBins];
105 computeBinCenters(binCenters);
106 downsampleMicResponse(curve, binCenters, kNumBins, mMicGains);
107 } else {
108 for (int i = 0; i < kNumBins; ++i) {
109 mMicGains[i] = 1.0f;
110 }
111 }
112}
113
114void EqualizerDetector::computeBinCenters(float* out) const {
115 // Log-spaced bin centers matching Bins::binToFreq formula

Callers

nothing calls this directly

Calls 2

getMicResponseCurveFunction · 0.85
downsampleMicResponseFunction · 0.85

Tested by

no test coverage detected