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

Method processFFT

src/fl/audio/audio_reactive.cpp.hpp:280–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void Reactive::processFFT(const Sample& sample) {
281 // Get PCM data from Sample
282 const auto& pcmData = sample.pcm();
283 if (pcmData.empty()) return;
284
285 // Use shared Context for cached FFT (avoids recomputation if Processor also needs it)
286 auto cachedBins = mContext->getFFT16();
287 mFFTBins = *cachedBins;
288
289 // Map fft::FFT bins to frequency channels using WLED-compatible mapping
290 mapFFTBinsToFrequencyChannels();
291}
292
293void Reactive::mapFFTBinsToFrequencyChannels() {
294 // Sample::fft() returns CQ-kernel bins that are already

Callers

nothing calls this directly

Calls 2

getFFT16Method · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected