pub trait VideoFxPlugin: PluginBase {
// Required method
fn on_draw(&mut self) -> Result<()>;
// Provided methods
fn on_start(&mut self) -> Result<()> { ... }
fn on_stop(&mut self) -> Result<()> { ... }
fn on_device_init(&mut self) -> Result<()> { ... }
fn on_device_close(&mut self) -> Result<()> { ... }
fn on_audio_samples(&mut self, buffer: &[f32]) -> Result<()> { ... }
fn width(&self) -> i32 { ... }
fn height(&self) -> i32 { ... }
fn sample_rate(&self) -> i32 { ... }
fn song_bpm(&self) -> i32 { ... }
fn song_pos_beats(&self) -> f64 { ... }
}Expand description
Video FX plugin trait
Required Methods§
Provided Methods§
Sourcefn on_device_init(&mut self) -> Result<()>
fn on_device_init(&mut self) -> Result<()>
Called when graphics device is initialized
Sourcefn on_device_close(&mut self) -> Result<()>
fn on_device_close(&mut self) -> Result<()>
Called when graphics device is closed
Sourcefn on_audio_samples(&mut self, buffer: &[f32]) -> Result<()>
fn on_audio_samples(&mut self, buffer: &[f32]) -> Result<()>
Process audio samples for visualization
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