Skip to main content

PositionDspPlugin

Trait PositionDspPlugin 

Source
pub trait PositionDspPlugin: PluginBase {
    // Required method
    fn on_transform_position(
        &mut self,
        song_pos: &mut f64,
        video_pos: &mut f64,
        volume: &mut f32,
        src_volume: &mut f32,
    ) -> Result<()>;

    // Provided methods
    fn on_start(&mut self) -> Result<()> { ... }
    fn on_stop(&mut self) -> Result<()> { ... }
    fn on_process_samples(&mut self, buffer: &mut [f32]) -> Result<()> { ... }
    fn sample_rate(&self) -> i32 { ... }
    fn song_bpm(&self) -> i32 { ... }
    fn song_pos(&self) -> i32 { ... }
    fn song_pos_beats(&self) -> f64 { ... }
}
Expand description

Position DSP plugin trait for position manipulation

Required Methods§

Source

fn on_transform_position( &mut self, song_pos: &mut f64, video_pos: &mut f64, volume: &mut f32, src_volume: &mut f32, ) -> Result<()>

Transform position (can modify songPos, videoPos, volume)

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 on_process_samples(&mut self, buffer: &mut [f32]) -> Result<()>

Process audio samples

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§