#include <audio_bridge.hpp>
|
| bool | update (float new_peak, float new_rms, float dt, float attack=0.001f, float release=0.3f, float hold_time=1.5f) |
| | Update with new audio data.
|
◆ update()
| bool pulp::dataplane::MeterBallistics::update |
( |
float | new_peak, |
|
|
float | new_rms, |
|
|
float | dt, |
|
|
float | attack = 0.001f, |
|
|
float | release = 0.3f, |
|
|
float | hold_time = 1.5f ) |
|
inlinenodiscard |
Update with new audio data.
Call once per UI frame. attack/release in seconds, hold_time in seconds, dt = frame time.
RETURNS TRUE ONLY WHEN A DISPLAYED VALUE MOVED, and a meter must repaint only when it does. A UI thread polls this every frame for as long as it is bound — through silence, when the ballistics have already settled and the next frame would be pixel-identical. Repainting anyway costs a composite per meter per frame forever, and on the plug-in-view-host path (a DAW) each of those is a FULL-SURFACE repaint of the whole editor: an idle window then renders at the display's refresh rate for as long as it is open. Any real level change fails the compare on the very next frame, so the gate never swallows motion — only the still frames after it.
MultiChannelBallistics::update reports movement the same way. If you are only advancing the ballistics and will never paint, say so with (void).
◆ display_peak
| float pulp::dataplane::MeterBallistics::display_peak = 0 |
◆ display_rms
| float pulp::dataplane::MeterBallistics::display_rms = 0 |
◆ held_peak
| float pulp::dataplane::MeterBallistics::held_peak = 0 |
◆ hold_counter
| float pulp::dataplane::MeterBallistics::hold_counter = 0 |
The documentation for this struct was generated from the following file:
- /home/runner/work/pulp/pulp/core/dataplane/include/pulp/dataplane/audio_bridge.hpp