pub trait DspNode: Send {
// Required methods
fn process(
&mut self,
inputs: &[Option<&[f32; 64]>; 8],
output: &mut [f32; 64],
params: &mut ParamBlock,
sample_rate: f32,
);
fn type_name(&self) -> &'static str;
// Provided methods
fn capture_state(&self) -> StateBlob { ... }
fn restore_state(&mut self, _state: StateBlob) { ... }
}Expand description
The core DSP processing trait. Implementations MUST be real-time safe:
- No allocation
- No locks
- No I/O
- Bounded execution time
Required Methods§
Sourcefn process(
&mut self,
inputs: &[Option<&[f32; 64]>; 8],
output: &mut [f32; 64],
params: &mut ParamBlock,
sample_rate: f32,
)
fn process( &mut self, inputs: &[Option<&[f32; 64]>; 8], output: &mut [f32; 64], params: &mut ParamBlock, sample_rate: f32, )
Process one buffer of audio.
inputs: resolved input buffer slices (None = silence).
output: the node’s output buffer to fill.
params: the node’s parameter block (pre-ticked by scheduler).
sample_rate: current sample rate in Hz.
Provided Methods§
Sourcefn capture_state(&self) -> StateBlob
fn capture_state(&self) -> StateBlob
Capture internal state for continuity transfer.
Sourcefn restore_state(&mut self, _state: StateBlob)
fn restore_state(&mut self, _state: StateBlob)
Restore internal state after a graph mutation.