Skip to main content

BufferDspPlugin

Trait BufferDspPlugin 

Source
pub trait BufferDspPlugin: PluginBase {
    // Required method
    fn on_get_song_buffer(&mut self, song_pos: i32, nb: i32) -> Option<&[i16]>;

    // 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(&self) -> i32 { ... }
    fn song_pos_beats(&self) -> f64 { ... }
}
Expand description

Buffer DSP plugin trait for buffer manipulation

Required Methods§

Source

fn on_get_song_buffer(&mut self, song_pos: i32, nb: i32) -> Option<&[i16]>

Get song buffer at the specified position

Provided Methods§

Source

fn on_start(&mut self) -> Result<()>

Called when the plugin starts

Source

fn on_stop(&mut self) -> Result<()>

Called when the plugin stops

Source

fn sample_rate(&self) -> i32

Get the sample rate

Source

fn song_bpm(&self) -> i32

Get the song BPM

Source

fn song_pos(&self) -> i32

Get the song position in samples

Source

fn song_pos_beats(&self) -> f64

Get the song position in beats

Implementors§