Skip to main content

AudioSource

Trait AudioSource 

Source
pub trait AudioSource: Sync + Send {
    type Format: SampleFormat;

    // Required method
    fn audio_read(&mut self) -> Option<Self::Format>;
}

Required Associated Types§

Required Methods§

Source

fn audio_read(&mut self) -> Option<Self::Format>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> AudioSource for Receiver<T>
where T: SampleFormat,

Source§

type Format = T

Source§

fn audio_read(&mut self) -> Option<Self::Format>

Implementors§