Trait OutputStream

Source
pub trait OutputStream: Stream {
    // Required methods
    fn write(&mut self, buffer: &[u8]) -> Result<usize>;
    fn space_available(&self) -> Result<usize>;
}
Expand description

Output stream interface for audio playback

This trait defines operations for audio output streams, such as speakers, DAC, or file writers.

Required Methods§

Source

fn write(&mut self, buffer: &[u8]) -> Result<usize>

Write audio data from the provided buffer Returns the number of bytes written

Source

fn space_available(&self) -> Result<usize>

Check if the stream can accept more data Returns the number of bytes that can be written

Implementors§