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

Function downsampleMicResponse

src/fl/audio/mic_response_data.h:266–272  ·  view source on GitHub ↗

Downsample a high-resolution mic response curve to N output bins. @param curve The source mic response curve @param binCenters Array of bin center frequencies (Hz), length numBins @param numBins Number of output bins @param out Output array of gains, length numBins

Source from the content-addressed store, hash-verified

264/// @param numBins Number of output bins
265/// @param out Output array of gains, length numBins
266inline void downsampleMicResponse(const MicResponseCurve& curve,
267 const float* binCenters, int numBins,
268 float* out) {
269 for (int i = 0; i < numBins; ++i) {
270 out[i] = interpolateMicResponse(curve, binCenters[i]);
271 }
272}
273
274// ============================================================================
275// Pink noise compensation (derived from bin geometry)

Callers 2

setMicProfileMethod · 0.85

Calls 1

interpolateMicResponseFunction · 0.85

Tested by

no test coverage detected