pub trait AudioOut: Send {
// Required methods
fn configure(&mut self, rate: u32, channels: u32);
fn push_le_f32(&mut self, bytes: &[u8]);
// Provided method
fn media_bus(&self) -> Option<Arc<MediaBus>> { ... }
}Expand description
Where the host sends audio_push samples. Send: the host lives in the
wasmtime store, which async (gasm_run) calls require to be Send.
Required Methods§
Sourcefn configure(&mut self, rate: u32, channels: u32)
fn configure(&mut self, rate: u32, channels: u32)
Source format of the following pushes (validated by the host).
Sourcefn push_le_f32(&mut self, bytes: &[u8])
fn push_le_f32(&mut self, bytes: &[u8])
Interleaved little-endian f32 samples in the configured format.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".