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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.