Struct Effect Bridge
pub struct EffectBridge<P> { /* private fields */ }Expand description
A prepared portable effect plus bounded audio/event scratch storage.
Implementations§
§impl<P: Processor> EffectBridge<P>
impl<P: Processor> EffectBridge<P>
pub fn prepare(processor: P, config: ProcessConfig) -> Result<Self, BridgeError>
pub fn with_clap_note_input_port(
self,
port: Option<u16>,
) -> Result<Self, BridgeError>
pub fn with_clap_note_input_port( self, port: Option<u16>, ) -> Result<Self, BridgeError>
Select native CLAP note/expression input for a processor that explicitly supports it. Port must be below 256; None restores default filtering. This effect adapter has no generated-event output. Metadata stays exporter-owned.
pub fn with_scoped_parameter_input_port(
self,
port: Option<u16>,
) -> Result<Self, BridgeError>
pub fn with_scoped_parameter_input_port( self, port: Option<u16>, ) -> Result<Self, BridgeError>
Select scoped parameter values/modulation on a note input endpoint below 256. No metadata, voice precedence, range or saved-state policy is inferred.
pub fn with_parameter_gesture_input(self, enabled: bool) -> Self
pub fn with_parameter_gesture_input(self, enabled: bool) -> Self
Enable raw parameter begin/end input; no automatic pairing/state edits.
pub fn with_global_parameter_modulation(self, enabled: bool) -> Self
pub fn with_global_parameter_modulation(self, enabled: bool) -> Self
Opt in to global parameter modulation input without changing metadata or saved values. The processor must explicitly implement modulation semantics; scoped events require their separate selector. Default is disabled, including flush.
pub fn processor(&self) -> &P
pub fn reset(&mut self)
pub fn try_reset(&mut self) -> Result<(), ProcessError>
pub fn try_reset(&mut self) -> Result<(), ProcessError>
Preserve refused history reset and stop subsequent DSP dispatch.
pub fn reset_error(&self) -> Option<ProcessError>
pub fn reset_error(&self) -> Option<ProcessError>
Original refused reset, until a complete successful reset.
pub fn deactivate(&mut self)
pub fn flush(&mut self, input: &InputEvents<'_>) -> Result<(), BridgeError>
pub fn flush(&mut self, input: &InputEvents<'_>) -> Result<(), BridgeError>
Apply parameter changes without advancing audio time.
pub fn process( &mut self, audio: &mut Audio<'_>, input: &InputEvents<'_>, ) -> Result<ProcessStatus, BridgeError>
pub fn process_with_transport(
&mut self,
audio: &mut Audio<'_>,
input: &InputEvents<'_>,
transport: Option<&TransportEvent>,
) -> Result<ProcessStatus, BridgeError>
pub fn process_with_transport( &mut self, audio: &mut Audio<'_>, input: &InputEvents<'_>, transport: Option<&TransportEvent>, ) -> Result<ProcessStatus, BridgeError>
Forward validated block-start CLAP transport. Mid-block transport events remain ignored; processors receive the context at sample zero only. Consecutive known sample positions detect seeks/loops with one-sample conversion tolerance. Missing context/reset breaks continuity tracking. Rejected blocks silence outputs and do not advance tracking or DSP state.