pub struct StaticShell<P: Params, L: PluginLogic> {
pub params: Arc<P>,
/* private fields */
}Expand description
A static plugin shell that embeds PluginLogic directly.
Same bridging as HotShell but without NativeLoader, Mutex,
file watching, or any dynamic loading overhead. Use via export_static!.
Fields§
§params: Arc<P>Implementations§
Source§impl<P: Params + Default + 'static, L: PluginLogic + 'static> StaticShell<P, L>
impl<P: Params + Default + 'static, L: PluginLogic + 'static> StaticShell<P, L>
pub fn new(params: P) -> Self
Sourcepub fn logic_ref_mut(&mut self) -> &mut L
pub fn logic_ref_mut(&mut self) -> &mut L
Mutable access to the plugin logic (for testing).
Sourcepub fn try_custom_editor(&self) -> Option<Box<dyn Editor>>
pub fn try_custom_editor(&self) -> Option<Box<dyn Editor>>
Try to get a custom editor from the plugin logic.
Sourcepub fn try_builtin_editor(&self) -> Option<BuiltinEditor<P>>
pub fn try_builtin_editor(&self) -> Option<BuiltinEditor<P>>
Try to create a BuiltinEditor from the plugin’s layout.
Returns None if the layout has zero size.
Trait Implementations§
Source§impl<P: Params + Default + 'static, L: PluginLogic + 'static> Plugin for StaticShell<P, L>
impl<P: Params + Default + 'static, L: PluginLogic + 'static> Plugin for StaticShell<P, L>
Source§fn bus_layouts() -> Vec<BusLayout>where
Self: Sized,
fn bus_layouts() -> Vec<BusLayout>where
Self: Sized,
Supported bus layouts. The host picks one.
Source§fn reset(&mut self, sample_rate: f64, max_block_size: usize)
fn reset(&mut self, sample_rate: f64, max_block_size: usize)
Called when sample rate or max block size changes.
Reset filters, delay lines, etc. Not real-time safe.
Source§fn process(
&mut self,
buffer: &mut AudioBuffer<'_>,
events: &EventList,
context: &mut ProcessContext<'_>,
) -> ProcessStatus
fn process( &mut self, buffer: &mut AudioBuffer<'_>, events: &EventList, context: &mut ProcessContext<'_>, ) -> ProcessStatus
Real-time audio processing.
Source§fn load_state(&mut self, data: &[u8])
fn load_state(&mut self, data: &[u8])
Restore extra state.
Source§fn latency(&self) -> u32
fn latency(&self) -> u32
Processing latency in samples. Host uses this for delay compensation.
Return 0 if the plugin adds no latency (default).
impl<P: Params, L: PluginLogic> Send for StaticShell<P, L>
Auto Trait Implementations§
impl<P, L> Freeze for StaticShell<P, L>where
L: Freeze,
impl<P, L> RefUnwindSafe for StaticShell<P, L>where
L: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, L> Sync for StaticShell<P, L>where
L: Sync,
impl<P, L> Unpin for StaticShell<P, L>where
L: Unpin,
impl<P, L> UnsafeUnpin for StaticShell<P, L>where
L: UnsafeUnpin,
impl<P, L> UnwindSafe for StaticShell<P, L>where
L: UnwindSafe,
P: RefUnwindSafe,
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