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§impl<SampleType: PartialOrd> PartialOrd for AudioBuffer<SampleType>
impl<SampleType: PartialOrd> PartialOrd for AudioBuffer<SampleType>
impl<SampleType: Eq> Eq for AudioBuffer<SampleType>
impl<SampleType> StructuralPartialEq for AudioBuffer<SampleType>
Auto Trait Implementations§
impl<SampleType> Freeze for AudioBuffer<SampleType>
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