[−][src]Trait timbre::prelude::AudioSource
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.