pub trait AudioSource {
// Required method
fn next_sample(&mut self) -> Option<i16>;
}Expand description
Pull-based mono PCM source for application-owned I²S streaming.
Samples are signed 16-bit PCM. Applications can duplicate samples to stereo frames or write mono frames depending on their HAL/I²S configuration.
Required Methods§
Sourcefn next_sample(&mut self) -> Option<i16>
fn next_sample(&mut self) -> Option<i16>
Return the next signed 16-bit mono sample, or None when a finite source is exhausted.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".