pub struct AudioPipeline { /* private fields */ }Expand description
Audio output pipeline
Coordinates the mixer with the output device, managing buffering, underrun detection, and output timing.
Implementations§
Source§impl AudioPipeline
impl AudioPipeline
Sourcepub fn new(config: AudioConfig) -> Self
pub fn new(config: AudioConfig) -> Self
Create a new audio pipeline with the given output configuration
Sourcepub fn process_frame(&mut self) -> &[i16]
pub fn process_frame(&mut self) -> &[i16]
Process one frame period: mix all active channels into the output buffer
Calls the mixer to fill the output buffer with mixed audio. Returns a reference to the buffer containing the mixed samples.
Sourcepub fn stats(&self) -> PipelineStats
pub fn stats(&self) -> PipelineStats
Get pipeline statistics
Sourcepub fn state(&self) -> PipelineState
pub fn state(&self) -> PipelineState
Get the current pipeline state
Sourcepub fn config(&self) -> &AudioConfig
pub fn config(&self) -> &AudioConfig
Get the output configuration