pub trait AudioStream: Send + 'static {
// Required method
fn fill(&mut self, out: &mut [f32]);
}Expand description
A source of mono samples, produced on demand at its own sample rate.
Implemented for any FnMut(&mut [f32]) + Send + 'static, so a closure that owns a
synthesizer or an emulated sound chip can be played directly.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".