pub struct AlgorithmicLatencyDto {
pub processor_name: String,
pub latency_samples: u32,
pub latency_ms: f64,
}Expand description
Algorithmic latency contributed by one processor in the DSP signal chain.
Algorithmic latency is the design-inherent sample delay an effect introduces —
for example, a look-ahead limiter that must buffer N input samples before it can
emit the first output sample adds N samples of algorithmic latency, independent
of CPU speed.
For sample-by-sample processors such as GainProcessor and ToneStackProcessor
this value is always zero because no sample is ever buffered or delayed.
Fields§
§processor_name: StringName of the DSP processor (e.g. "Gain", "Tone Stack", "Master Volume").
latency_samples: u32Number of audio samples of algorithmic delay introduced by this processor.
Zero for all current processors.
latency_ms: f64Algorithmic delay converted to milliseconds at the current output sample rate.
Computed as (latency_samples / sample_rate_hz) × 1000. Zero when
latency_samples is zero or sample_rate_hz is zero.
Implementations§
Source§impl AlgorithmicLatencyDto
impl AlgorithmicLatencyDto
Sourcepub fn new(
processor_name: impl Into<String>,
latency_samples: u32,
sample_rate_hz: u32,
) -> Self
pub fn new( processor_name: impl Into<String>, latency_samples: u32, sample_rate_hz: u32, ) -> Self
Creates a new entry for the named processor, converting samples to ms automatically.
§Arguments
processor_name— Human-readable processor identifier.latency_samples— Number of samples of algorithmic delay.sample_rate_hz— Output sample rate used for the ms conversion. If0,latency_msis set to0.0to avoid a division-by-zero.
Trait Implementations§
Source§impl Clone for AlgorithmicLatencyDto
impl Clone for AlgorithmicLatencyDto
Source§fn clone(&self) -> AlgorithmicLatencyDto
fn clone(&self) -> AlgorithmicLatencyDto
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more