[−][src]Struct vst::plugin::HostCallback
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(); // ... } }
Implementations
impl HostCallback[src]
pub fn vst_version(&self) -> i32[src]
Get the VST API version supported by the host e.g. 2400 = VST 2.4.
pub fn raw_callback(&self) -> Option<HostCallbackProc>[src]
Get the callback for calling host-specific extensions
pub fn raw_effect(&self) -> *mut AEffect[src]
Get the effect pointer for calling host-specific extensions
Trait Implementations
impl Clone for HostCallback[src]
fn clone(&self) -> HostCallback[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for HostCallback[src]
impl Default for HostCallback[src]
HostCallback implements Default so that the plugin can implement Default and have a
HostCallback field.
fn default() -> HostCallback[src]
impl Host for HostCallback[src]
fn automate(&self, index: i32, value: f32)[src]
fn get_plugin_id(&self) -> i32[src]
fn idle(&self)[src]
fn get_info(&self) -> (isize, String, String)[src]
fn process_events(&self, events: &Events)[src]
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.
fn get_time_info(&self, mask: i32) -> Option<TimeInfo>[src]
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.
fn get_block_size(&self) -> isize[src]
Get block size.
fn update_display(&self)[src]
Refresh UI after the plugin's parameters changed.
impl Send for HostCallback[src]
impl Sync for HostCallback[src]
Auto Trait Implementations
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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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>,