DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::plugin::DryDelay Class Reference

The dry signal of the wrappers' soft bypass, delayed by the plugin's latency. More...

#include <DSParkPlugin.h>

Public Member Functions

void prepare (int maxLatency, int maxBlock)
 
void reset () noexcept
 
int capacity (int n) const noexcept
 
void process (float *const *dry, int numChannels, int n, int latency) noexcept
 

Detailed Description

The dry signal of the wrappers' soft bypass, delayed by the plugin's latency.

Hosts keep compensating a bypassed plugin's reported latency (delaying every other track by it), so the bypassed output must arrive exactly as late as the processed one: blending the raw input instead would shift the track early by the latency and comb the crossfade. Every input sample is written into a per-channel ring whether or not the bypass is engaged, so the delayed history is already in place when it is. Allocated in prepare() (host setup thread); process() is allocation-free.

Definition at line 780 of file DSParkPlugin.h.

Member Function Documentation

◆ capacity()

int dspark::plugin::DryDelay::capacity ( int  n) const
inlinenoexcept

Largest latency the ring can reproduce for an n-frame block.

Definition at line 802 of file DSParkPlugin.h.

◆ prepare()

void dspark::plugin::DryDelay::prepare ( int  maxLatency,
int  maxBlock 
)
inline

Allocates for latencies up to maxLatency with blocks up to maxBlock frames (both clamped to sane bounds).

Definition at line 785 of file DSParkPlugin.h.

◆ process()

void dspark::plugin::DryDelay::process ( float *const *  dry,
int  numChannels,
int  n,
int  latency 
)
inlinenoexcept

Replaces the n frames of each dry channel by the input of latency frames earlier (clamped to the capacity: a latency that grew past what prepare() sized for stays as aligned as the ring allows).

Definition at line 809 of file DSParkPlugin.h.

◆ reset()

void dspark::plugin::DryDelay::reset ( )
inlinenoexcept

Clears the history (transport jumps).

Definition at line 795 of file DSParkPlugin.h.


The documentation for this class was generated from the following file: