pub struct VarChannelBuffer<T: Clone + Copy + Default, const MAX_CHANNELS: usize> { /* private fields */ }Expand description
A memory-efficient buffer of samples with up to MAX_CHANNELS channels. Each
channel has a length of frames.
Implementations§
Source§impl<T: Clone + Copy + Default, const MAX_CHANNELS: usize> VarChannelBuffer<T, MAX_CHANNELS>
impl<T: Clone + Copy + Default, const MAX_CHANNELS: usize> VarChannelBuffer<T, MAX_CHANNELS>
pub fn new(channels: NonZeroUsize, frames: usize) -> Self
pub fn frames(&self) -> usize
pub fn num_channels(&self) -> NonZeroUsize
pub fn channels( &self, num_channels: usize, frames: usize, ) -> ArrayVec<&[T], MAX_CHANNELS>
pub fn channels_mut( &mut self, num_channels: usize, frames: usize, ) -> ArrayVec<&mut [T], MAX_CHANNELS>
Auto Trait Implementations§
impl<T, const MAX_CHANNELS: usize> Freeze for VarChannelBuffer<T, MAX_CHANNELS>
impl<T, const MAX_CHANNELS: usize> RefUnwindSafe for VarChannelBuffer<T, MAX_CHANNELS>where
T: RefUnwindSafe,
impl<T, const MAX_CHANNELS: usize> Send for VarChannelBuffer<T, MAX_CHANNELS>where
T: Send,
impl<T, const MAX_CHANNELS: usize> Sync for VarChannelBuffer<T, MAX_CHANNELS>where
T: Sync,
impl<T, const MAX_CHANNELS: usize> Unpin for VarChannelBuffer<T, MAX_CHANNELS>where
T: Unpin,
impl<T, const MAX_CHANNELS: usize> UnwindSafe for VarChannelBuffer<T, MAX_CHANNELS>where
T: UnwindSafe,
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