| 602 | } |
| 603 | |
| 604 | void Reactive::applySpectralEqualization() { |
| 605 | if (!mConfig.enableSpectralEqualizer) { |
| 606 | return; |
| 607 | } |
| 608 | |
| 609 | // Apply spectral EQ in-place on the frequency bins |
| 610 | float equalizedBins[16]; |
| 611 | span<const float> inputSpan(mCurrentData.frequencyBins, 16); |
| 612 | span<float> outputSpan(equalizedBins, 16); |
| 613 | mSpectralEqualizer->apply(inputSpan, outputSpan); |
| 614 | |
| 615 | // Copy back |
| 616 | for (int i = 0; i < 16; ++i) { |
| 617 | mCurrentData.frequencyBins[i] = equalizedBins[i]; |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | void Reactive::updateSpectralFlux() { |
| 622 | // Compute spectral flux from Reactive's own previous magnitudes. |