Skip to main content

AudioSink

Trait AudioSink 

Source
pub trait AudioSink {
    // Required methods
    fn format(&self) -> PcmFormat;
    fn write(&mut self, block: PcmBlock<'_>) -> Result<()>;
}
Expand description

Consumes blocks of PCM.

Required Methods§

Source

fn format(&self) -> PcmFormat

The format this sink accepts.

Source

fn write(&mut self, block: PcmBlock<'_>) -> Result<()>

Take one block. Err(Busy) means “dropped, try the next one”.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§