pub trait DspPlugin: PluginBase {
// Required method
fn on_process_samples(&mut self, buffer: &mut [f32]) -> Result<()>;
// Provided methods
fn on_start(&mut self) -> Result<()> { ... }
fn on_stop(&mut self) -> Result<()> { ... }
fn sample_rate(&self) -> i32 { ... }
fn song_bpm(&self) -> i32 { ... }
fn song_pos_beats(&self) -> f64 { ... }
}Expand description
DSP plugin trait for audio effect plugins
Required Methods§
Sourcefn on_process_samples(&mut self, buffer: &mut [f32]) -> Result<()>
fn on_process_samples(&mut self, buffer: &mut [f32]) -> Result<()>
Process audio samples (stereo, so buffer is 2*nb samples)
Provided Methods§
Sourcefn sample_rate(&self) -> i32
fn sample_rate(&self) -> i32
Get the sample rate
Sourcefn song_pos_beats(&self) -> f64
fn song_pos_beats(&self) -> f64
Get the song position in beats