FastLED 3.10.8
Loading...
Searching...
No Matches

◆ calculateAWeightingGains()

void fl::audio::SpectralEqualizer::calculateAWeightingGains ( )
private

Calculate A-weighting gains.

Definition at line 76 of file spectral_equalizer.cpp.hpp.

76 {
77 // Use appropriate A-weighting curve based on number of bands
78 const float* curve = nullptr;
79 size curveSize = 0;
80
81 if (mConfig.numBands == 16) {
82 curve = A_WEIGHTING_16BAND;
83 curveSize = 16;
84 } else if (mConfig.numBands == 32) {
85 curve = A_WEIGHTING_32BAND;
86 curveSize = 32;
87 } else {
88 // Unsupported band count - use flat gains
89 FL_WARN("SpectralEqualizer: A-weighting not defined for " << mConfig.numBands << " bands, using flat gains");
91 return;
92 }
93
94 // Copy A-weighting coefficients to gains
95 for (size i = 0; i < mConfig.numBands && i < curveSize; ++i) {
96 mGains[i] = curve[i];
97 }
98}
static constexpr float A_WEIGHTING_16BAND[16]
A-weighting coefficients for 16-band frequency analysis These approximate the A-weighting curve acros...
void calculateFlatGains() FL_NO_EXCEPT
Calculate flat gains (all 1.0)
static constexpr float A_WEIGHTING_32BAND[32]
A-weighting coefficients for 32-band frequency analysis.
SpectralEqualizerConfig mConfig
vector< float > mGains
Per-band gain multipliers.
#define FL_WARN(...)
Definition log.h:437

References A_WEIGHTING_16BAND, A_WEIGHTING_32BAND, calculateFlatGains(), fl::FL_NO_EXCEPT, FL_WARN, mConfig, and mGains.

Referenced by calculateGains().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: