#[repr(u8)]pub enum SampleFrequencyIndex {
Show 16 variants
Freq96000 = 0,
Freq88200 = 1,
Freq64000 = 2,
Freq48000 = 3,
Freq44100 = 4,
Freq32000 = 5,
Freq24000 = 6,
Freq22050 = 7,
Freq16000 = 8,
Freq12000 = 9,
Freq11025 = 10,
Freq8000 = 11,
Freq7350 = 12,
FreqReserved = 13,
FreqReserved2 = 14,
FreqEscape = 15,
}
Expand description
Sampling Frequency Index
The purpose of the FrequencyIndex is to encode commonly used frequencies in 4 bits to save space. These are the set of commonly used frequencies defined in the specification.
ISO/IEC 14496-3:2019(E) - 1.6.2.4 (Table 1.22)
Variants§
Freq96000 = 0
96000 Hz
Freq88200 = 1
88200 Hz
Freq64000 = 2
64000 Hz
Freq48000 = 3
48000 Hz
Freq44100 = 4
44100 Hz
Freq32000 = 5
32000 Hz
Freq24000 = 6
24000 Hz
Freq22050 = 7
22050 Hz
Freq16000 = 8
16000 Hz
Freq12000 = 9
12000 Hz
Freq11025 = 10
11025 Hz
Freq8000 = 11
8000 Hz
Freq7350 = 12
7350 Hz
FreqReserved = 13
Reserved
FreqReserved2 = 14
Reserved
FreqEscape = 15
Escape (Meaning the frequency is not in the table, and we need to read an additional 24 bits to get the frequency)
Implementations§
Trait Implementations§
Source§impl Clone for SampleFrequencyIndex
impl Clone for SampleFrequencyIndex
Source§fn clone(&self) -> SampleFrequencyIndex
fn clone(&self) -> SampleFrequencyIndex
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 Debug for SampleFrequencyIndex
impl Debug for SampleFrequencyIndex
Source§impl FromPrimitive for SampleFrequencyIndex
impl FromPrimitive for SampleFrequencyIndex
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§impl Ord for SampleFrequencyIndex
impl Ord for SampleFrequencyIndex
Source§fn cmp(&self, other: &SampleFrequencyIndex) -> Ordering
fn cmp(&self, other: &SampleFrequencyIndex) -> 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 PartialEq for SampleFrequencyIndex
impl PartialEq for SampleFrequencyIndex
Source§impl PartialOrd for SampleFrequencyIndex
impl PartialOrd for SampleFrequencyIndex
impl Copy for SampleFrequencyIndex
impl Eq for SampleFrequencyIndex
impl StructuralPartialEq for SampleFrequencyIndex
Auto Trait Implementations§
impl Freeze for SampleFrequencyIndex
impl RefUnwindSafe for SampleFrequencyIndex
impl Send for SampleFrequencyIndex
impl Sync for SampleFrequencyIndex
impl Unpin for SampleFrequencyIndex
impl UnwindSafe for SampleFrequencyIndex
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