pub enum ChunkItem<'b, S: Sample, const N: usize> {
Full {
ch: usize,
sample: usize,
inp: &'b [S; N],
out: &'b mut [S; N],
},
Tail {
ch: usize,
sample: usize,
inp: &'b [S],
out: &'b mut [S],
},
}Expand description
One yielded chunk from AudioBuffer::chunks_mut.
Full is the SIMD-friendly path: inp and out are stack
arrays of exactly N elements, ready to feed truce-simd’s
block ops. Tail is the trailing fragment when num_samples()
isn’t a multiple of N; fall back to a scalar loop.
Variants§
Full
Full N-sample chunk. The &[S; N] / &mut [S; N] are the
shape truce-simd ops are written against - no slice
length check at the call site.
Fields
Tail
Trailing chunk when num_samples() isn’t a multiple of N.
Length is in (0, N). Fall back to scalar processing.
Auto Trait Implementations§
impl<'b, S, const N: usize> Freeze for ChunkItem<'b, S, N>
impl<'b, S, const N: usize> RefUnwindSafe for ChunkItem<'b, S, N>where
S: RefUnwindSafe,
impl<'b, S, const N: usize> Send for ChunkItem<'b, S, N>
impl<'b, S, const N: usize> Sync for ChunkItem<'b, S, N>
impl<'b, S, const N: usize> Unpin for ChunkItem<'b, S, N>
impl<'b, S, const N: usize> UnsafeUnpin for ChunkItem<'b, S, N>
impl<'b, S, const N: usize> !UnwindSafe for ChunkItem<'b, S, N>
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