pub struct VecAudioBuffer<SampleType> { /* private fields */ }
Expand description
An owned version of the interleaved buffer implementation. Can be converted onto an
InterleavedAudioBuffer
.
Implementations
sourceimpl<SampleType: Clone> VecAudioBuffer<SampleType>
impl<SampleType: Clone> VecAudioBuffer<SampleType>
sourceimpl<SampleType> VecAudioBuffer<SampleType>
impl<SampleType> VecAudioBuffer<SampleType>
sourcepub fn interleaved(&mut self) -> InterleavedAudioBuffer<'_, SampleType>
pub fn interleaved(&mut self) -> InterleavedAudioBuffer<'_, SampleType>
Get an InterleavedAudioBuffer
reference type out this VecAudioBuffer
.
Trait Implementations
sourceimpl<SampleType> AudioBuffer for VecAudioBuffer<SampleType>
impl<SampleType> AudioBuffer for VecAudioBuffer<SampleType>
type SampleType = SampleType
type SampleType = SampleType
The type of samples within this buffer.
sourcefn num_channels(&self) -> usize
fn num_channels(&self) -> usize
The number of channels in this buffer
sourcefn num_samples(&self) -> usize
fn num_samples(&self) -> usize
The number of samples in this buffer
sourcefn slice(&self) -> &[Self::SampleType]
fn slice(&self) -> &[Self::SampleType]
Get a slice to the internal data. Will not work with VST adapter Read more
sourcefn slice_mut(&mut self) -> &mut [Self::SampleType]
fn slice_mut(&mut self) -> &mut [Self::SampleType]
Get a mutable slice to the internal data. Will not work with VST adapter Read more
sourcefn get(&self, channel: usize, sample: usize) -> &Self::SampleType
fn get(&self, channel: usize, sample: usize) -> &Self::SampleType
Get a ref to an INPUT sample in this buffer. Read more
sourcefn get_mut(&mut self, channel: usize, sample: usize) -> &mut Self::SampleType
fn get_mut(&mut self, channel: usize, sample: usize) -> &mut Self::SampleType
Get a mutable ref to an OUTPUT sample in this buffer Read more
sourcefn set(&mut self, channel: usize, sample: usize, value: Self::SampleType)
fn set(&mut self, channel: usize, sample: usize, value: Self::SampleType)
Set an OUTPUT sample in this buffer
sourceunsafe fn get_unchecked(
&self,
channel: usize,
sample: usize
) -> &Self::SampleType
unsafe fn get_unchecked(
&self,
channel: usize,
sample: usize
) -> &Self::SampleType
Unsafe, no bounds check - Get a ref to an INPUT sample in this buffer Read more
sourceunsafe fn get_unchecked_mut(
&mut self,
channel: usize,
sample: usize
) -> &mut Self::SampleType
unsafe fn get_unchecked_mut(
&mut self,
channel: usize,
sample: usize
) -> &mut Self::SampleType
Unsafe, no bounds check - Get a mutable ref to an OUTPUT sample in this buffer Read more
sourceunsafe fn set_unchecked(
&mut self,
channel: usize,
sample: usize,
value: Self::SampleType
)
unsafe fn set_unchecked(
&mut self,
channel: usize,
sample: usize,
value: Self::SampleType
)
Unsafe, no bounds check - Set an OUTPUT sample in this buffer Read more
sourcefn frames(&self) -> Chunks<'_, Self::SampleType>
fn frames(&self) -> Chunks<'_, Self::SampleType>
Shortcut for .slice().chunks(num_channels)
sourcefn frames_mut(&mut self) -> ChunksMut<'_, Self::SampleType>
fn frames_mut(&mut self) -> ChunksMut<'_, Self::SampleType>
Shortcut for .slice_mut().chunks_mut(num_channels)
Read more
sourceimpl<SampleType: Clone> Clone for VecAudioBuffer<SampleType>
impl<SampleType: Clone> Clone for VecAudioBuffer<SampleType>
sourcefn clone(&self) -> VecAudioBuffer<SampleType>
fn clone(&self) -> VecAudioBuffer<SampleType>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<SampleType: Debug> Debug for VecAudioBuffer<SampleType>
impl<SampleType: Debug> Debug for VecAudioBuffer<SampleType>
sourceimpl<SampleType: Clone> OwnedAudioBuffer for VecAudioBuffer<SampleType>
impl<SampleType: Clone> OwnedAudioBuffer for VecAudioBuffer<SampleType>
sourceimpl<SampleType: PartialEq> PartialEq<VecAudioBuffer<SampleType>> for VecAudioBuffer<SampleType>
impl<SampleType: PartialEq> PartialEq<VecAudioBuffer<SampleType>> for VecAudioBuffer<SampleType>
sourcefn eq(&self, other: &VecAudioBuffer<SampleType>) -> bool
fn eq(&self, other: &VecAudioBuffer<SampleType>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VecAudioBuffer<SampleType>) -> bool
fn ne(&self, other: &VecAudioBuffer<SampleType>) -> bool
This method tests for !=
.
impl<SampleType: Eq> Eq for VecAudioBuffer<SampleType>
impl<SampleType> StructuralEq for VecAudioBuffer<SampleType>
impl<SampleType> StructuralPartialEq for VecAudioBuffer<SampleType>
Auto Trait Implementations
impl<SampleType> RefUnwindSafe for VecAudioBuffer<SampleType> where
SampleType: RefUnwindSafe,
impl<SampleType> Send for VecAudioBuffer<SampleType> where
SampleType: Send,
impl<SampleType> Sync for VecAudioBuffer<SampleType> where
SampleType: Sync,
impl<SampleType> Unpin for VecAudioBuffer<SampleType> where
SampleType: Unpin,
impl<SampleType> UnwindSafe for VecAudioBuffer<SampleType> where
SampleType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more