pub struct ProcessInput<'a> { /* private fields */ }Expand description
Per-buffer input handed to ProcessingObject::process.
Borrows an interleaved float32 sample buffer from the host and
carries the BufferFlags the host stamped on it. Both
fields are accessed through const fns so the wrapper is
allocation-free and realtime-safe.
Implementations§
Source§impl<'a> ProcessInput<'a>
impl<'a> ProcessInput<'a>
Sourcepub const fn new(samples: &'a [f32], flags: BufferFlags) -> Self
pub const fn new(samples: &'a [f32], flags: BufferFlags) -> Self
Wrap a sample slice and the host’s flag word.
The framework’s COM harness will construct one of these per
APOProcess invocation; tests construct them directly.
Sourcepub const fn samples(&self) -> &'a [f32]
pub const fn samples(&self) -> &'a [f32]
Interleaved float32 samples — frame_count * channel_count
elements long.
Sourcepub const fn flags(&self) -> BufferFlags
pub const fn flags(&self) -> BufferFlags
Flags the host stamped on this buffer.
Sourcepub const fn is_silent(&self) -> bool
pub const fn is_silent(&self) -> bool
Convenience: true iff Self::flags is
BufferFlags::SILENT.
Trait Implementations§
Source§impl<'a> Clone for ProcessInput<'a>
impl<'a> Clone for ProcessInput<'a>
Source§fn clone(&self) -> ProcessInput<'a>
fn clone(&self) -> ProcessInput<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ProcessInput<'a>
impl<'a> Debug for ProcessInput<'a>
impl<'a> Copy for ProcessInput<'a>
Auto Trait Implementations§
impl<'a> Freeze for ProcessInput<'a>
impl<'a> RefUnwindSafe for ProcessInput<'a>
impl<'a> Send for ProcessInput<'a>
impl<'a> Sync for ProcessInput<'a>
impl<'a> Unpin for ProcessInput<'a>
impl<'a> UnsafeUnpin for ProcessInput<'a>
impl<'a> UnwindSafe for ProcessInput<'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