Skip to main content

PluginLogicCore

Trait PluginLogicCore 

Source
pub trait PluginLogicCore<S: Sample = f32>: Send + 'static {
Show 14 methods // Required methods fn supports_in_place() -> bool where Self: Sized; fn bus_layouts() -> Vec<BusLayout> where Self: Sized; fn reset(&mut self, sample_rate: f64, max_block_size: usize); fn process( &mut self, buffer: &mut AudioBuffer<'_, S>, events: &EventList, context: &mut ProcessContext<'_>, ) -> ProcessStatus; fn save_state(&self) -> Vec<u8> ; fn load_state(&mut self, data: &[u8]) -> Result<(), StateLoadError>; fn state_changed(&mut self); fn latency(&self) -> u32; fn tail(&self) -> u32; fn layout(&self) -> GridLayout; fn render(&self, backend: &mut dyn RenderBackend); fn uses_custom_render(&self) -> bool; fn hit_test( &self, widgets: &[WidgetRegion], x: f32, y: f32, ) -> Option<usize>; fn custom_editor(&self) -> Option<Box<dyn Editor>>;
}
Expand description

Wrapper-facing plugin trait, generic over the audio sample type.

Format wrappers (StaticShell, HotShell, CLAP / VST3 / etc.) bind on PluginLogicCore<S>. Plugin authors don’t implement this directly - they implement PluginLogic (f32) or PluginLogic64 (f64), and the blanket impls below route them into PluginLogicCore.

Method docs live on the leaf traits (PluginLogic / PluginLogic64); the shape mirrors them exactly.

Required Methods§

Source

fn supports_in_place() -> bool
where Self: Sized,

Source

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

Source

fn reset(&mut self, sample_rate: f64, max_block_size: usize)

Source

fn process( &mut self, buffer: &mut AudioBuffer<'_, S>, events: &EventList, context: &mut ProcessContext<'_>, ) -> ProcessStatus

Source

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

Source

fn load_state(&mut self, data: &[u8]) -> Result<(), StateLoadError>

Restore plugin-specific state. See PluginLogic::load_state.

§Errors

Forwards whatever the user impl returns - typically a malformed blob error decoded by bincode / serde / similar.

Source

fn state_changed(&mut self)

Source

fn latency(&self) -> u32

Source

fn tail(&self) -> u32

Source

fn layout(&self) -> GridLayout

Source

fn render(&self, backend: &mut dyn RenderBackend)

Source

fn uses_custom_render(&self) -> bool

Source

fn hit_test(&self, widgets: &[WidgetRegion], x: f32, y: f32) -> Option<usize>

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§