Struct audio_processor_traits::audio_buffer::AudioBuffer
source · pub struct AudioBuffer<SampleType> { /* private fields */ }
Implementations§
source§impl<SampleType: Clone + Default> AudioBuffer<SampleType>
impl<SampleType: Clone + Default> AudioBuffer<SampleType>
pub fn from_interleaved(channels: usize, samples: &[SampleType]) -> Self
pub fn copy_from_interleaved(&mut self, source: &[SampleType])
pub fn copy_into_interleaved(&self, target: &mut [SampleType])
source§impl<SampleType: Copy + Zero> AudioBuffer<SampleType>
impl<SampleType: Copy + Zero> AudioBuffer<SampleType>
source§impl<SampleType: Clone> AudioBuffer<SampleType>
impl<SampleType: Clone> AudioBuffer<SampleType>
pub fn resize_with( &mut self, channels: usize, samples: usize, value: impl FnMut() -> SampleType )
source§impl<SampleType: Zero + Clone> AudioBuffer<SampleType>
impl<SampleType: Zero + Clone> AudioBuffer<SampleType>
source§impl<SampleType> AudioBuffer<SampleType>
impl<SampleType> AudioBuffer<SampleType>
pub fn new(channels: Vec<Vec<SampleType>>) -> Self
pub fn empty() -> Self
pub fn channel(&self, channel: usize) -> &[SampleType]
pub fn channel_mut(&mut self, channel: usize) -> &mut [SampleType]
pub fn channels(&self) -> &Vec<Vec<SampleType>>
pub fn channels_mut(&mut self) -> &mut Vec<Vec<SampleType>>
pub fn slice_mut(&mut self) -> impl Iterator<Item = &mut SampleType>
pub fn num_channels(&self) -> usize
pub fn num_samples(&self) -> usize
pub fn get(&self, channel: usize, sample: usize) -> &SampleType
pub fn get_mut(&mut self, channel: usize, sample: usize) -> &mut SampleType
pub fn set(&mut self, channel: usize, sample: usize, value: SampleType)
pub fn is_empty(&self) -> bool
Trait Implementations§
source§impl<SampleType: Clone> Clone for AudioBuffer<SampleType>
impl<SampleType: Clone> Clone for AudioBuffer<SampleType>
source§fn clone(&self) -> AudioBuffer<SampleType>
fn clone(&self) -> AudioBuffer<SampleType>
Returns a copy 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 moresource§impl<SampleType: Debug> Debug for AudioBuffer<SampleType>
impl<SampleType: Debug> Debug for AudioBuffer<SampleType>
source§impl<SampleType: Default> Default for AudioBuffer<SampleType>
impl<SampleType: Default> Default for AudioBuffer<SampleType>
source§fn default() -> AudioBuffer<SampleType>
fn default() -> AudioBuffer<SampleType>
Returns the “default value” for a type. Read more
source§impl<SampleType, I, J> From<I> for AudioBuffer<SampleType>
impl<SampleType, I, J> From<I> for AudioBuffer<SampleType>
source§impl<SampleType: Ord> Ord for AudioBuffer<SampleType>
impl<SampleType: Ord> Ord for AudioBuffer<SampleType>
source§fn cmp(&self, other: &AudioBuffer<SampleType>) -> Ordering
fn cmp(&self, other: &AudioBuffer<SampleType>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<SampleType: PartialEq> PartialEq for AudioBuffer<SampleType>
impl<SampleType: PartialEq> PartialEq for AudioBuffer<SampleType>
source§fn eq(&self, other: &AudioBuffer<SampleType>) -> bool
fn eq(&self, other: &AudioBuffer<SampleType>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<SampleType: PartialOrd> PartialOrd for AudioBuffer<SampleType>
impl<SampleType: PartialOrd> PartialOrd for AudioBuffer<SampleType>
source§fn partial_cmp(&self, other: &AudioBuffer<SampleType>) -> Option<Ordering>
fn partial_cmp(&self, other: &AudioBuffer<SampleType>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<SampleType: Eq> Eq for AudioBuffer<SampleType>
impl<SampleType> StructuralEq for AudioBuffer<SampleType>
impl<SampleType> StructuralPartialEq for AudioBuffer<SampleType>
Auto Trait Implementations§
impl<SampleType> RefUnwindSafe for AudioBuffer<SampleType>where
SampleType: RefUnwindSafe,
impl<SampleType> Send for AudioBuffer<SampleType>where
SampleType: Send,
impl<SampleType> Sync for AudioBuffer<SampleType>where
SampleType: Sync,
impl<SampleType> Unpin for AudioBuffer<SampleType>where
SampleType: Unpin,
impl<SampleType> UnwindSafe for AudioBuffer<SampleType>where
SampleType: 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