Struct vst2::plugin::HostCallback [] [src]

pub struct HostCallback { /* fields omitted */ }

A reference to the host which allows the plugin to call back and access information.

Panics

All methods in this struct will panic if the plugin has not yet been initialized. In practice, this can only occur if the plugin queries the host for information when Default::default() is called.

struct ExamplePlugin;

impl Default for ExamplePlugin {
    fn default() -> ExamplePlugin {
        // Will panic, don't do this. If needed, you can query
        // the host during initialization via Vst::new()
        let host: HostCallback = Default::default();
        let version = host.vst_version();

        // ...
    }
}

Methods

impl HostCallback
[src]

Get the VST API version supported by the host e.g. 2400 = VST 2.4.

Trait Implementations

impl Default for HostCallback
[src]

HostCallback implements Default so that the plugin can implement Default and have a HostCallback field.

Returns the "default value" for a type. Read more

impl Host for HostCallback
[src]

Automate a parameter; the value has been changed.

Get the plugin ID of the currently loading plugin. Read more

An idle call. Read more

Get vendor and product information. Read more

Send events to the host.

This should only be called within process or process_f64. Calling process_events anywhere else is undefined behaviour and may crash some hosts.