AUDIO
Source snapshot · 12 October 2026

API reference / ravet_foundation::ProcessBlock

Struct ProcessBlock 

pub struct ProcessBlock<'channels, 'samples, 'events, S: Sample = f32> {
    pub audio: AudioBuffer<'channels, 'samples, S>,
    pub auxiliary: Option<&'channels mut [AudioBuffer<'channels, 'samples, S>]>,
    pub output_events: Option<OutputEvents<'events>>,
    pub events: &'events [Event],
    pub transport: Transport,
}
Expand description

A callback’s borrowed storage and event slice; no allocation is required.

Fields§

§audio: AudioBuffer<'channels, 'samples, S>§auxiliary: Option<&'channels mut [AudioBuffer<'channels, 'samples, S>]>

Additional buses in preparation order; absent means no auxiliary buses.

§output_events: Option<OutputEvents<'events>>

Initially empty, bounded event output for this callback.

§events: &'events [Event]§transport: Transport

Implementations§

§

impl<'channels, 'samples, 'events, S: Sample> ProcessBlock<'channels, 'samples, 'events, S>

pub fn new( audio: AudioBuffer<'channels, 'samples, S>, events: &'events [Event], transport: Transport, ) -> Self

pub fn clear_outputs(&mut self)

Clear all active outputs and discard emitted events on a rejected block. Input-only auxiliary buses and backing tails remain untouched.

Trait Implementations§

§

impl<'channels, 'samples, 'events, S: Debug + Sample> Debug for ProcessBlock<'channels, 'samples, 'events, S>

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'channels, 'samples, 'events, S = f32> !UnwindSafe for ProcessBlock<'channels, 'samples, 'events, S>

§

impl<'channels, 'samples, 'events, S> Freeze for ProcessBlock<'channels, 'samples, 'events, S>

§

impl<'channels, 'samples, 'events, S> RefUnwindSafe for ProcessBlock<'channels, 'samples, 'events, S>
where S: RefUnwindSafe,

§

impl<'channels, 'samples, 'events, S> Send for ProcessBlock<'channels, 'samples, 'events, S>
where S: Send + Sync,

§

impl<'channels, 'samples, 'events, S> Sync for ProcessBlock<'channels, 'samples, 'events, S>
where S: Sync,

§

impl<'channels, 'samples, 'events, S> Unpin for ProcessBlock<'channels, 'samples, 'events, S>

§

impl<'channels, 'samples, 'events, S> UnsafeUnpin for ProcessBlock<'channels, 'samples, 'events, S>

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.