Skip to main content

SynthSourceGenerator

Trait SynthSourceGenerator 

Source
pub trait SynthSourceGenerator {
    // Required methods
    fn is_exhausted(&self) -> bool;
    fn channel_count(&self) -> usize;
    fn generate(&mut self, output: &mut [f32]) -> usize;
}
Expand description

A generic sample generator for SynthSourceImpl.

Required Methods§

Source

fn is_exhausted(&self) -> bool

Returns true when output is silent oan no more generate calls are required.

Source

fn channel_count(&self) -> usize

The generator produces sample frames with this number of channels.

Source

fn generate(&mut self, output: &mut [f32]) -> usize

Fill passed output with generated samples and return samples generated.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§