Struct vst2::host::PluginInstance
[−]
[src]
pub struct PluginInstance { /* fields omitted */ }
An instance of an externally loaded VST plugin.
Trait Implementations
impl Drop for PluginInstance
[src]
impl Plugin for PluginInstance
[src]
fn get_info(&self) -> Info
This method must return an Info
struct.
fn init(&mut self)
Called when plugin is fully initialized.
fn change_preset(&mut self, preset: i32)
Set the current preset to the index specified by preset
.
fn get_preset_num(&self) -> i32
Get the current preset index.
fn set_preset_name(&mut self, name: String)
Set the current preset name.
fn get_preset_name(&self, preset: i32) -> String
Get the name of the preset at the index specified by preset
.
fn get_parameter_label(&self, index: i32) -> String
Get parameter label for parameter at index
(e.g. "db", "sec", "ms", "%").
fn get_parameter_text(&self, index: i32) -> String
Get the parameter value for parameter at index
(e.g. "1.0", "150", "Plate", "Off").
fn get_parameter_name(&self, index: i32) -> String
Get the name of parameter at index
.
fn get_parameter(&self, index: i32) -> f32
Get the value of paramater at index
. Should be value between 0.0 and 1.0.
fn set_parameter(&mut self, index: i32, value: f32)
Set the value of parameter at index
. value
is between 0.0 and 1.0.
fn can_be_automated(&self, index: i32) -> bool
Return whether parameter at index
can be automated.
fn string_to_parameter(&mut self, index: i32, text: String) -> bool
Use String as input for parameter value. Used by host to provide an editable field to adjust a parameter value. E.g. "100" may be interpreted as 100hz for parameter. Returns if the input string was used. Read more
fn set_sample_rate(&mut self, rate: f32)
Called when sample rate is changed by host.
fn set_block_size(&mut self, size: i64)
Called when block size is changed by host.
fn resume(&mut self)
Called when plugin is turned on.
fn suspend(&mut self)
Called when plugin is turned off.
fn vendor_specific(
&mut self,
index: i32,
value: isize,
ptr: *mut c_void,
opt: f32
) -> isize
&mut self,
index: i32,
value: isize,
ptr: *mut c_void,
opt: f32
) -> isize
Vendor specific handling.
fn can_do(&self, can_do: CanDo) -> Supported
Return whether plugin supports specified action.
fn get_tail_size(&self) -> isize
Get the tail size of plugin when it is stopped. Used in offline processing as well.
fn process(&mut self, buffer: AudioBuffer<f32>)
Process an audio buffer containing f32
values. Read more
fn process_f64(&mut self, buffer: AudioBuffer<f64>)
Process an audio buffer containing f64
values. Read more
fn process_events(&mut self, events: Vec<Event>)
Handle incoming events sent from the host. Read more
fn get_preset_data(&mut self) -> Vec<u8>
If preset_chunks
is set to true in plugin info, this should return the raw chunk data for the current preset. Read more
fn get_bank_data(&mut self) -> Vec<u8>
If preset_chunks
is set to true in plugin info, this should return the raw chunk data for the current plugin bank. Read more
fn load_preset_data(&mut self, data: &[u8])
If preset_chunks
is set to true in plugin info, this should load a preset from the given chunk data. Read more
fn load_bank_data(&mut self, data: &[u8])
If preset_chunks
is set to true in plugin info, this should load a preset bank from the given chunk data. Read more
fn get_input_info(&self, input: i32) -> ChannelInfo
Get information about an input channel. Only used by some hosts.
fn get_output_info(&self, output: i32) -> ChannelInfo
Get information about an output channel. Only used by some hosts.
fn new(host: HostCallback) -> Self where
Self: Sized + Default,
Self: Sized + Default,
Called during initialization to pass a HostCallback
to the plugin. Read more
fn get_editor(&mut self) -> Option<&mut Editor>
Return handle to plugin editor if supported.