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>
Trait Implementations§
Source§impl<T: Clone + Clone + Copy + Default, const MAX_CHANNELS: usize> Clone for VarChannelBuffer<T, MAX_CHANNELS>
impl<T: Clone + Clone + Copy + Default, const MAX_CHANNELS: usize> Clone for VarChannelBuffer<T, MAX_CHANNELS>
Source§fn clone(&self) -> VarChannelBuffer<T, MAX_CHANNELS>
fn clone(&self) -> VarChannelBuffer<T, MAX_CHANNELS>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.