| 278 | } |
| 279 | |
| 280 | void 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 | |
| 293 | void Reactive::mapFFTBinsToFrequencyChannels() { |
| 294 | // Sample::fft() returns CQ-kernel bins that are already |