| 85 | } |
| 86 | |
| 87 | void Processor::updateFromContext(shared_ptr<Context> externalContext) { |
| 88 | // Use externally-provided context (FFT already cached, signal already conditioned). |
| 89 | // This avoids recomputing FFT when Reactive has already done it. |
| 90 | for (auto& d : mActiveDetectors) { |
| 91 | d->update(externalContext); |
| 92 | } |
| 93 | for (auto& d : mActiveDetectors) { |
| 94 | d->fireCallbacks(); |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | void Processor::onBeat(function<void()> callback) { |
| 99 | auto detector = getBeatDetector(); |
no test coverage detected