Struct vst2::host::PluginLoader [] [src]

pub struct PluginLoader<T: Host> { /* fields omitted */ }

Wrapper for an externally loaded VST plugin.

The only functionality this struct provides is loading plugins, which can be done via the load method.

Methods

impl<T: Host> PluginLoader<T>
[src]

Load a plugin at the given path with the given host.

Because of the possibility of multi-threading problems that can occur when using plugins, the host must be passed in via an Arc<Mutex<T>> object. This makes sure that even if the plugins are multi-threaded no data race issues can occur.

Upon success, this method returns a PluginLoader object which you can use to call instance to create a new instance of the plugin.

Example

// ...
let host = Arc::new(Mutex::new(MyHost::new()));

let mut plugin = PluginLoader::load(path, host.clone()).unwrap();

let instance = plugin.instance().unwrap();
// ...

Linux/Windows

  • This should be a path to the library, typically ending in .so/.dll.
  • Possible full path: /home/overdrivenpotato/.vst/u-he/Zebra2.64.so
  • Possible full path: C:\Program Files (x86)\VSTPlugins\iZotope Ozone 5.dll

OS X

  • This should point to the mach-o file within the .vst bundle.
  • Plugin: /Library/Audio/Plug-Ins/VST/iZotope Ozone 5.vst
  • Possible full path: /Library/Audio/Plug-Ins/VST/iZotope Ozone 5.vst/Contents/MacOS/PluginHooksVST

Try to create an instance of this VST plugin.

If the instance is successfully created, a PluginInstance is returned. This struct implements the Plugin trait.