Trait audio_streams::BufferCommit
source · pub trait BufferCommit {
// Required method
fn commit(&mut self, nframes: usize);
// Provided method
fn latency_bytes(&self) -> u32 { ... }
}
Expand description
BufferCommit
is a cleanup funcion that must be called before dropping the buffer,
allowing arbitrary code to be run after the buffer is filled or read by the user.
Required Methods§
Provided Methods§
sourcefn latency_bytes(&self) -> u32
fn latency_bytes(&self) -> u32
latency_bytes
the current device latency.
For playback it means how many bytes need to be consumed
before the current playback buffer will be played.
For capture it means the latency in terms of bytes that the capture buffer was recorded.