[][src]Trait timbre::prelude::AudioSource

pub trait AudioSource {
    fn read(&mut self, buffer: &mut AudioBuffer<'_>) -> ReadResult;
}

Trait implemented to provide audio data to consumers.

This is the center of this entire library. Almost everything is either an AudioSource or consumes an AudioSource.

Required methods

fn read(&mut self, buffer: &mut AudioBuffer<'_>) -> ReadResult

Consume audio data and attempt to fill the given buffer.

Returns

A ReadResult indicating how much data was put in the buffer and the state of the source.

Panics

May panic if the format of the buffer is incompatible with this source or its upstream sources.

Loading content...

Implementors

impl AudioSource for WavDecoder[src]

impl AudioSource for BasicMixer[src]

impl AudioSource for Echo[src]

impl AudioSource for HighPass[src]

impl AudioSource for LowPass[src]

impl AudioSource for SineWave[src]

Loading content...