AUDIO
Source snapshot · 12 October 2026

API reference / ravet_graph::ConvolutionTransition

Struct ConvolutionTransition 

pub struct ConvolutionTransition<E: TransitionEngine> { /* private fields */ }
Expand description

Audio-owned transition. Between construction and drop, process and reset perform no allocation, deallocation, locking, I/O or panic: every engine handed back first has queue capacity reserved (or the one deferred slot), and a completed fade whose engine has nowhere to go keeps that engine as a silent, unprocessed outgoing owner until a later block boundary can return it.

Drop behaviour (construct and drop this endpoint outside the audio callback): dropping it frees its current, outgoing, priming, waiting and deferred engines on the dropping thread. The three queues, including any engines still queued in the handoff or returned queue, are freed by whichever endpoint is dropped last. If the control endpoint is dropped first, process continues: retirements still move into the (now unread) returned queue and, once it is full, the deferred slot; nothing is freed until this endpoint is dropped.

Implementations§

§

impl<E: TransitionEngine> ConvolutionTransition<E>

pub fn process( &mut self, input: &[&[E::Sample]], output: &mut [&mut [E::Sample]], frames: usize, ) -> Result<TransitionStatus, ConvolutionProcessError>

Process the first frames frames of every channel. Channel count, the maximum and every prefix are admitted before any state changes; a refused call takes no proposal and leaves histories, fade position and output unchanged. An admitted call (including frames == 0) first handles at most one proposal at this block boundary, then renders, blending while a fade is in progress. Per-frame fade gains are computed once per block.

pub fn reset(&mut self)

Clear the histories of the current and (if fading) outgoing engines. The fade position, waiting proposal and handoff are unchanged.

With continuity policies, reset also forgets the recorded input history, forgets both delay lines in constant time (alignment delays and output latency unchanged; during a fade the delayed path, old or new, reads zeros for its delay after the reset) and resets a proposal being primed with zero remaining lag, so its fade starts at the next block boundary from empty history.

pub fn latency_samples(&self) -> usize

Current engine latency in frames.

pub fn outgoing_latency_samples(&self) -> Option<usize>

Outgoing engine latency while a fade is in progress.

pub fn tail_samples(&self) -> usize

Largest tail of the current and outgoing engines.

pub fn current_sequence(&self) -> u64

Sequence of the current engine (0 for the initial engine).

pub fn fade_position(&self) -> Option<usize>

Frames into the running fade, if any.

pub fn waiting_sequence(&self) -> Option<u64>

Sequence waiting under MidFadePolicy::LatestWins.

pub fn frames_processed(&self) -> u64

Absolute frames accepted so far (saturating).

pub fn current(&self) -> &E

Borrow the current engine for observations.

pub fn channels(&self) -> usize

Channel count.

pub fn maximum_frames(&self) -> usize

Maximum frames per call.

pub fn options(&self) -> TransitionOptions

Fixed configuration.

pub fn continuity(&self) -> TransitionContinuity

Fixed continuity policies.

pub fn output_latency_samples(&self) -> Option<usize>

Aligned output latency in frames under AlignmentPolicy::DelayLower (the delay from input to output of the audible signal after the last processed frame), or None without alignment.

pub fn priming_sequence(&self) -> Option<u64>

Sequence being primed under PrimingPolicy::History (delayed fade).

pub fn priming_lag(&self) -> Option<usize>

Remaining history frames the priming engine lags behind the live input.

Trait Implementations§

§

impl<E: TransitionEngine> Debug for ConvolutionTransition<E>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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