|
| void | prepare (int latency_samples) |
| | Size the per-channel delay to latency_samples (the processor's reported latency, i.e.
|
| void | reset () |
| | Clear the delay history without resizing (e.g. on a transport reset).
|
| bool | is_latency_compensated () const noexcept |
| | True when a non-zero reported latency is being compensated.
|
| int | delay_samples () const noexcept |
| | The compensation delay in samples (0 when uncompensated).
|
| float | process_sample (float in, std::size_t ch) |
| | Push one dry sample through channel ch's delay and return the compensated output (in[n - delay] in steady state).
|
| void | process_channel (float *out, const float *in, std::uint32_t count, std::size_t ch) |
| | Emit in[n - delay] into out for channel ch (steady state), or a straight copy of in when uncompensated.
|
template<std::size_t MaxChannels = kBoundaryMaxChannels>
class pulp::format::boundary::LatencyCompensatedBypassT< MaxChannels >
Per-channel dry-signal delay used by an adapter's bypass path.
A latent processor is compensated by the host: the host delays every other track by the plugin's reported latency so the plugin path stays aligned. When the plugin is bypassed the adapter emits the dry input directly, but that input is now early relative to the host's compensation by exactly the reported latency — so a correct bypass delays the dry signal by the same amount. CLAP and VST3 both drive this class; AU/AAX/LV2 still memcpy the input straight through and are a latency samples early while bypassed.
prepare() (off the audio thread) sizes the lines. process_channel() is RT-safe. A reported latency of <= 0 means no compensation, and process_channel() degrades to a plain copy so callers use one code path.