Trait AudioSource

Source
pub trait AudioSource: Send {
    // Required methods
    fn duration(&self) -> f64;
    fn read_at(&mut self, t: f64, out: &mut [f32]);
}

Required Methods§

Source

fn duration(&self) -> f64

Source

fn read_at(&mut self, t: f64, out: &mut [f32])

Fill out (interleaved stereo f32 @ SAMPLE_RATE, frames = out.len()/2) starting at source time t. Zero-fill past the end. Must be cheap for sequential calls (t advancing by exactly the previous block).

Implementors§