AUDIO
Source snapshot · 11 November 2026

API reference / ravet_clap::EffectBridge

Struct EffectBridge 

pub struct EffectBridge<P> { /* private fields */ }
Expand description

A prepared portable effect plus bounded audio/event scratch storage.

Implementations§

§

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>

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>

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

Enable raw parameter begin/end input; no automatic pairing/state edits.

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>

Preserve refused history reset and stop subsequent DSP dispatch.

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>

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>

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.

Auto Trait Implementations§

§

impl<P> Freeze for EffectBridge<P>
where P: Freeze,

§

impl<P> RefUnwindSafe for EffectBridge<P>
where P: RefUnwindSafe,

§

impl<P> Send for EffectBridge<P>
where P: Send,

§

impl<P> Sync for EffectBridge<P>
where P: Sync,

§

impl<P> Unpin for EffectBridge<P>
where P: Unpin,

§

impl<P> UnsafeUnpin for EffectBridge<P>
where P: UnsafeUnpin,

§

impl<P> UnwindSafe for EffectBridge<P>
where P: UnwindSafe,

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.