Skip to main content

StaticShell

Struct StaticShell 

Source
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>

Source

pub fn new(params: P) -> Self

Source

pub fn logic_ref(&self) -> &L

Access the plugin logic (for testing).

Source

pub fn logic_ref_mut(&mut self) -> &mut L

Mutable access to the plugin logic (for testing).

Source

pub fn try_custom_editor(&self) -> Option<Box<dyn Editor>>

Try to get a custom editor from the plugin logic.

Source

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>

Source§

fn info() -> PluginInfo
where Self: Sized,

Static metadata about the plugin. Read more
Source§

fn bus_layouts() -> Vec<BusLayout>
where Self: Sized,

Supported bus layouts. The host picks one.
Source§

fn init(&mut self)

Called once after construction. Not real-time safe.
Source§

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

Real-time audio processing.
Source§

fn save_state(&self) -> Option<Vec<u8>>

Save extra state beyond parameter values.
Source§

fn load_state(&mut self, data: &[u8])

Restore extra state.
Source§

fn editor(&mut self) -> Option<Box<dyn Editor>>

GUI editor. Return None for headless plugins.
Source§

fn latency(&self) -> u32

Processing latency in samples. Host uses this for delay compensation. Return 0 if the plugin adds no latency (default).
Source§

fn tail(&self) -> u32

Tail time in samples. Return u32::MAX for infinite tail. Return 0 for no tail (default).
Source§

fn get_meter(&self, meter_id: u32) -> f32

Read a meter value by ID (0.0–1.0). Called by the GUI at ~60fps. Override to expose level meters, gain reduction, etc.
Source§

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>

§

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>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.