Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::MeterBallistics Struct Reference

#include <audio_bridge.hpp>

Public Member Functions

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.

Public Attributes

float display_peak = 0
float display_rms = 0
float held_peak = 0
float hold_counter = 0

Member Function Documentation

◆ 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).

Member Data Documentation

◆ display_peak

◆ display_rms

◆ held_peak

◆ hold_counter


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/dataplane/include/pulp/dataplane/audio_bridge.hpp