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: u32Number 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 EventSinkSink the processor pushes outgoing events into.
transport: TransportTransport state (playhead, tempo, play flag) for this block.
scratch: &'a mut BlockArenaPer-block scratch allocator for temporary buffers.
Implementations§
Source§impl ProcessBlock<'_>
impl ProcessBlock<'_>
Sourcepub fn validate_audio_lanes(&self) -> Result<()>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more