Struct vst::plugin::HostCallback

source ·
pub struct HostCallback { /* private fields */ }
Expand description

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 HostCallback was constructed using Default::default() rather than being set to the value passed to Plugin::new.

Implementations§

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

Get the callback for calling host-specific extensions

Get the effect pointer for calling host-specific extensions

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

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

Returns the “default value” for a type. Read more

Signal the host that the value for the parameter has changed.

Make sure to also call begin_edit and end_edit when a parameter has been touched. This is important for the host to determine if a user interaction is happening and the automation should be recorded.

Signal the host the start of a parameter change a gesture (mouse down on knob dragging).

Signal the host the end of a parameter change gesture (mouse up after knob dragging).

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.

Request time information from Host.

The mask parameter is composed of the same flags which will be found in the flags field of TimeInfo when returned. That is, if you want the host’s tempo, the parameter passed to get_time_info() should have the TEMPO_VALID flag set. This request and delivery system is important, as a request like this may cause significant calculations at the application’s end, which may take a lot of our precious time. This obviously means you should only set those flags that are required to get the information you need.

Also please be aware that requesting information does not necessarily mean that that information is provided in return. Check the flags field in the TimeInfo structure to see if your request was actually met.

Get block size.

Refresh UI after the plugin’s parameters changed.

Get the plugin ID of the currently loading plugin. Read more
An idle call. Read more
Get vendor and product information. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.