[−][src]Struct vst::host::PluginLoader
Wrapper for an externally loaded VST plugin.
The only functionality this struct provides is loading plugins, which can be done via the
load
method.
Implementations
impl<T: Host> PluginLoader<T>
[src]
pub fn load(
path: &Path,
host: Arc<Mutex<T>>
) -> Result<PluginLoader<T>, PluginLoadError>
[src]
path: &Path,
host: Arc<Mutex<T>>
) -> Result<PluginLoader<T>, PluginLoadError>
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
pub fn instance(&mut self) -> Result<PluginInstance, PluginLoadError>
[src]
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.
Auto Trait Implementations
impl<T> RefUnwindSafe for PluginLoader<T>
impl<T> Send for PluginLoader<T> where
T: Send,
T: Send,
impl<T> Sync for PluginLoader<T> where
T: Send,
T: Send,
impl<T> Unpin for PluginLoader<T>
impl<T> UnwindSafe for PluginLoader<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,