pub enum DecodedAudioType {
U8(Vec<Vec<u8>>),
U16(Vec<Vec<u16>>),
U24(Vec<Vec<[u8; 3]>>),
S8(Vec<Vec<i8>>),
S16(Vec<Vec<i16>>),
F32(Vec<Vec<f32>>),
F64(Vec<Vec<f64>>),
}Expand description
The format of the raw audio samples stored in deinterleaved format.
Note that there is no option for U32/I32. This is because in processing
we ultimately use f32 for everything anyway. We only store the other
types to save memory.
Also note there is no option for I24 (signed 24 bit). This is because
converting two’s compliment numbers from 32 bit to 24 bit and vice-versa
is tricky and less performant. Instead, just convert the data into u24
format.
Variants§
U8(Vec<Vec<u8>>)
U16(Vec<Vec<u16>>)
U24(Vec<Vec<[u8; 3]>>)
The endianness of the samples must be the native endianness of the target platform.
S8(Vec<Vec<i8>>)
S16(Vec<Vec<i16>>)
F32(Vec<Vec<f32>>)
F64(Vec<Vec<f64>>)
Trait Implementations§
Source§impl Clone for DecodedAudioType
impl Clone for DecodedAudioType
Source§fn clone(&self) -> DecodedAudioType
fn clone(&self) -> DecodedAudioType
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 Freeze for DecodedAudioType
impl RefUnwindSafe for DecodedAudioType
impl Send for DecodedAudioType
impl Sync for DecodedAudioType
impl Unpin for DecodedAudioType
impl UnwindSafe for DecodedAudioType
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