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]
fn vst_version(&self) -> i32
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.
fn default() -> HostCallback
Returns the "default value" for a type. Read more
impl Host for HostCallback
[src]
fn automate(&mut self, index: i32, value: f32)
Automate a parameter; the value has been changed.
fn get_plugin_id(&self) -> i32
Get the plugin ID of the currently loading plugin. Read more
fn idle(&self)
An idle call. Read more
fn get_info(&self) -> (isize, String, String)
Get vendor and product information. Read more
fn process_events(&mut self, events: Vec<Event>)
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.