pub struct PluginInstance {
pub component: ComPtr<IComponent>,
pub audio_processor: Option<ComPtr<IAudioProcessor>>,
pub edit_controller: Option<ComPtr<IEditController>>,
/* private fields */
}Expand description
Safe wrapper around a VST3 plugin instance
Fields§
§component: ComPtr<IComponent>§audio_processor: Option<ComPtr<IAudioProcessor>>§edit_controller: Option<ComPtr<IEditController>>Implementations§
Source§impl PluginInstance
impl PluginInstance
pub fn audio_bus_counts(&self) -> (usize, usize)
pub fn event_bus_counts(&self) -> (usize, usize)
pub fn main_audio_channel_counts(&self) -> (usize, usize)
Sourcepub fn initialize(&mut self, factory: &PluginFactory) -> Result<(), String>
pub fn initialize(&mut self, factory: &PluginFactory) -> Result<(), String>
Initialize the component
Sourcepub fn set_active(&mut self, active: bool) -> Result<(), String>
pub fn set_active(&mut self, active: bool) -> Result<(), String>
Set the component active/inactive
Sourcepub fn setup_processing(
&mut self,
sample_rate: f64,
max_samples: i32,
input_channels: i32,
output_channels: i32,
) -> Result<(), String>
pub fn setup_processing( &mut self, sample_rate: f64, max_samples: i32, input_channels: i32, output_channels: i32, ) -> Result<(), String>
Setup processing parameters
pub fn start_processing(&mut self) -> Result<(), String>
pub fn stop_processing(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginInstance
impl RefUnwindSafe for PluginInstance
impl Send for PluginInstance
impl Sync for PluginInstance
impl Unpin for PluginInstance
impl UnsafeUnpin for PluginInstance
impl UnwindSafe for PluginInstance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more