pub trait SampleBuiltin<T: Transcendental>: Send + Sync {
// Required methods
fn process_sample(&mut self, inputs: &[T]) -> T;
fn reset(&mut self);
// Provided methods
fn init(&mut self, _sample_rate: f32) { ... }
fn set_param(&mut self, _index: usize, _value: &ParamValue) { ... }
}Expand description
A stateful per-sample built-in: signal_ins inputs → 1 output.
Required Methods§
Sourcefn process_sample(&mut self, inputs: &[T]) -> T
fn process_sample(&mut self, inputs: &[T]) -> T
Process one sample. inputs.len() == signal_ins.
Provided Methods§
Sourcefn set_param(&mut self, _index: usize, _value: &ParamValue)
fn set_param(&mut self, _index: usize, _value: &ParamValue)
Set a parameter by index.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".