| 219 | } |
| 220 | |
| 221 | void FilterControl::timerCallback() |
| 222 | { |
| 223 | // The core of the optimization |
| 224 | // If no LFO is modulating the filter, this function does nothing. |
| 225 | if (! isAnimationActive) |
| 226 | return; |
| 227 | |
| 228 | ModulatedFilterValues modulatedValues; |
| 229 | |
| 230 | // Safely pull the latest data packet from the FIFO queue. |
| 231 | if (processor.getLatestModulatedFilterValues(modulatedValues)) |
| 232 | { |
| 233 | // If we got new data, update the LFO chain and its response curve. |
| 234 | updateLfoChain(modulatedValues); |
| 235 | updateLfoResponseCurve(); |
| 236 | |
| 237 | // Trigger a repaint to show the changes on screen. |
| 238 | repaint(); |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | // This callback responds to preset loads or other global changes |
| 243 | void FilterControl::changeListenerCallback(juce::ChangeBroadcaster* source) |
nothing calls this directly
no test coverage detected