Skip to main content

load_plugin_with_settings

Function load_plugin_with_settings 

Source
pub fn load_plugin_with_settings<P: AsRef<Path>>(
    path: P,
    sample_rate: f64,
    block_size: usize,
) -> Result<Plugin>
Expand description

Load a plugin with custom audio settings.

This provides a middle ground between the fully automatic load_plugin() and the full control of the host builder pattern.

§Arguments

  • path - Path to the VST3 plugin
  • sample_rate - Audio sample rate in Hz (typically 44100 or 48000)
  • block_size - Audio buffer size (typically 512 or 1024)

§Examples

use vst3_host::simple;

// Load with professional audio settings
let mut plugin = simple::load_plugin_with_settings(
    "/path/to/plugin.vst3",
    48000.0,  // 48kHz sample rate
    256       // Small buffer for low latency
)?;