Enum symphonia_core::audio::AudioBufferRef
source · pub enum AudioBufferRef<'a> {
U8(Cow<'a, AudioBuffer<u8>>),
U16(Cow<'a, AudioBuffer<u16>>),
U24(Cow<'a, AudioBuffer<u24>>),
U32(Cow<'a, AudioBuffer<u32>>),
S8(Cow<'a, AudioBuffer<i8>>),
S16(Cow<'a, AudioBuffer<i16>>),
S24(Cow<'a, AudioBuffer<i24>>),
S32(Cow<'a, AudioBuffer<i32>>),
F32(Cow<'a, AudioBuffer<f32>>),
F64(Cow<'a, AudioBuffer<f64>>),
}
Expand description
AudioBufferRef
is a copy-on-write reference to an AudioBuffer
of any type.
Variants§
U8(Cow<'a, AudioBuffer<u8>>)
U16(Cow<'a, AudioBuffer<u16>>)
U24(Cow<'a, AudioBuffer<u24>>)
U32(Cow<'a, AudioBuffer<u32>>)
S8(Cow<'a, AudioBuffer<i8>>)
S16(Cow<'a, AudioBuffer<i16>>)
S24(Cow<'a, AudioBuffer<i24>>)
S32(Cow<'a, AudioBuffer<i32>>)
F32(Cow<'a, AudioBuffer<f32>>)
F64(Cow<'a, AudioBuffer<f64>>)
Implementations§
source§impl<'a> AudioBufferRef<'a>
impl<'a> AudioBufferRef<'a>
sourcepub fn spec(&self) -> &SignalSpec
pub fn spec(&self) -> &SignalSpec
Gets the signal specification for the buffer.
sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Gets the total capacity of the buffer. The capacity is the maximum number of audio frames a buffer can store.
pub fn convert<T>(&self, dest: &mut AudioBuffer<T>)where
T: Sample + FromSample<u8> + FromSample<u16> + FromSample<u24> + FromSample<u32> + FromSample<i8> + FromSample<i16> + FromSample<i24> + FromSample<i32> + FromSample<f32> + FromSample<f64>,
pub fn make_equivalent<E: Sample>(&self) -> AudioBuffer<E>
Trait Implementations§
source§impl<'a> Clone for AudioBufferRef<'a>
impl<'a> Clone for AudioBufferRef<'a>
source§fn clone(&self) -> AudioBufferRef<'a>
fn clone(&self) -> AudioBufferRef<'a>
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 moreAuto Trait Implementations§
impl<'a> RefUnwindSafe for AudioBufferRef<'a>
impl<'a> Send for AudioBufferRef<'a>
impl<'a> Sync for AudioBufferRef<'a>
impl<'a> Unpin for AudioBufferRef<'a>
impl<'a> UnwindSafe for AudioBufferRef<'a>
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