pub struct BufferLatencyDto {
pub input_buffer_latency_ms: f64,
pub output_buffer_latency_ms: f64,
pub total_buffer_latency_ms: f64,
}Expand description
I/O buffer latency for the current audio configuration.
Buffer latency is the delay imposed by the hardware frame buffers: the driver accumulates a full block of samples before delivering them to (or accepting them from) the application. The formula is:
latency_ms = (buffer_frames / sample_rate_hz) × 1000When [cpal::BufferSize::Default] is in use the actual frame count is unknown at
runtime; a conservative fallback of 256 frames is substituted so the UI can
always display a practical estimate.
Fields§
§input_buffer_latency_ms: f64Input-side buffering delay in milliseconds.
Time the ADC driver holds samples in its internal buffer before delivering them to the application ring buffer.
output_buffer_latency_ms: f64Output-side buffering delay in milliseconds.
Time the application must fill the DAC driver buffer before the first sample is actually played.
total_buffer_latency_ms: f64Total I/O buffer delay: input_buffer_latency_ms + output_buffer_latency_ms.
This is the minimum hardware-buffer component of the full round-trip latency.
Implementations§
Trait Implementations§
Source§impl Clone for BufferLatencyDto
impl Clone for BufferLatencyDto
Source§fn clone(&self) -> BufferLatencyDto
fn clone(&self) -> BufferLatencyDto
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more