Skip to main content

ProcessBlock

Struct ProcessBlock 

Source
pub struct ProcessBlock<'a> {
    pub frames: u32,
    pub in_audio: &'a [&'a [f32]],
    pub out_audio: &'a mut [&'a mut [f32]],
    pub in_events: &'a [BlockEvent<'a>],
    pub out_events: &'a mut dyn EventSink,
    pub transport: Transport,
    pub scratch: &'a mut BlockArena,
}
Expand description

One processing block handed to a Processor: input and output audio lanes, event streams, transport state, and a scratch arena.

Fields§

§frames: u32

Number of valid frames in each audio lane for this block.

§in_audio: &'a [&'a [f32]]

Input audio lanes, one slice per input channel.

§out_audio: &'a mut [&'a mut [f32]]

Output audio lanes, one mutable slice per output channel.

§in_events: &'a [BlockEvent<'a>]

Input events delivered to the processor for this block.

§out_events: &'a mut dyn EventSink

Sink the processor pushes outgoing events into.

§transport: Transport

Transport state (playhead, tempo, play flag) for this block.

§scratch: &'a mut BlockArena

Per-block scratch allocator for temporary buffers.

Implementations§

Source§

impl ProcessBlock<'_>

Source

pub fn validate_audio_lanes(&self) -> Result<()>

Validates that every input and output audio lane holds at least frames samples.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for ProcessBlock<'a>

§

impl<'a> !Send for ProcessBlock<'a>

§

impl<'a> !Sync for ProcessBlock<'a>

§

impl<'a> !UnwindSafe for ProcessBlock<'a>

§

impl<'a> Freeze for ProcessBlock<'a>

§

impl<'a> Unpin for ProcessBlock<'a>

§

impl<'a> UnsafeUnpin for ProcessBlock<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.