Struct reaper_medium::VstPluginContext
source · [−]pub struct VstPluginContext<'a> { /* private fields */ }
Expand description
Additional data available in the context of VST plug-ins.
Implementations
sourceimpl<'a> VstPluginContext<'a>
impl<'a> VstPluginContext<'a>
sourcepub fn new(low: &'a VstPluginContext) -> Self
pub fn new(low: &'a VstPluginContext) -> Self
Creates a medium-level VST plug-in context from the given low-level VST plug-in context.
sourcepub unsafe fn host_callback(
self,
effect: *mut AEffect,
opcode: i32,
index: i32,
value: isize,
ptr: *mut c_void,
opt: f32
) -> isize
pub unsafe fn host_callback(
self,
effect: *mut AEffect,
opcode: i32,
index: i32,
value: isize,
ptr: *mut c_void,
opt: f32
) -> isize
Generic host callback function for communicating with REAPER from the VST plug-in.
This is just a pass-through to the VST host callback.
Safety
REAPER can crash if you pass an invalid pointer.
sourcepub unsafe fn request_containing_project(
self,
effect: NonNull<AEffect>
) -> ReaProject
pub unsafe fn request_containing_project(
self,
effect: NonNull<AEffect>
) -> ReaProject
Returns the REAPER project in which the given VST plug-in is running.
Safety
REAPER can crash if you pass an invalid pointer.
sourcepub unsafe fn request_containing_track(
self,
effect: NonNull<AEffect>
) -> Option<MediaTrack>
pub unsafe fn request_containing_track(
self,
effect: NonNull<AEffect>
) -> Option<MediaTrack>
Returns the REAPER track on which the given VST plug-in resides.
Returns None
if the given plug-in is not running as track FX.
Safety
REAPER can crash if you pass an invalid pointer.
sourcepub unsafe fn request_containing_take(
self,
effect: NonNull<AEffect>
) -> Option<MediaItemTake>
pub unsafe fn request_containing_take(
self,
effect: NonNull<AEffect>
) -> Option<MediaItemTake>
Returns the REAPER take in which the given VST plug-in resides.
Returns None
if the given plug-in is not running as take FX.
Safety
REAPER can crash if you pass an invalid pointer.
sourcepub unsafe fn request_containing_fx_location(
self,
effect: NonNull<AEffect>
) -> Option<TrackFxLocation>
pub unsafe fn request_containing_fx_location(
self,
effect: NonNull<AEffect>
) -> Option<TrackFxLocation>
Returns the location in the FX chain at which the given VST plug-in currently resides.
Supported since REAPER v6.11. Returns None
if not supported.
Don’t let the fact that this returns a TrackFxLocation
confuse you. It also works for
take and monitoring FX. If this is a take FX, it will return the index as variant
NormalFxChain
. If this is a monitoring FX, it will return the index as variant
InputFxChain
.
Safety
REAPER can crash if you pass an invalid pointer.
Trait Implementations
sourceimpl<'a> Clone for VstPluginContext<'a>
impl<'a> Clone for VstPluginContext<'a>
sourcefn clone(&self) -> VstPluginContext<'a>
fn clone(&self) -> VstPluginContext<'a>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for VstPluginContext<'a>
impl<'a> Debug for VstPluginContext<'a>
sourceimpl<'a> PartialEq<VstPluginContext<'a>> for VstPluginContext<'a>
impl<'a> PartialEq<VstPluginContext<'a>> for VstPluginContext<'a>
sourcefn eq(&self, other: &VstPluginContext<'a>) -> bool
fn eq(&self, other: &VstPluginContext<'a>) -> bool
impl<'a> Copy for VstPluginContext<'a>
impl<'a> Eq for VstPluginContext<'a>
impl<'a> StructuralEq for VstPluginContext<'a>
impl<'a> StructuralPartialEq for VstPluginContext<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for VstPluginContext<'a>
impl<'a> Send for VstPluginContext<'a>
impl<'a> Sync for VstPluginContext<'a>
impl<'a> Unpin for VstPluginContext<'a>
impl<'a> UnwindSafe for VstPluginContext<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more