Enum cpal::SampleFormat
source · #[non_exhaustive]pub enum SampleFormat {
I8,
I16,
I32,
I64,
U8,
U16,
U32,
U64,
F32,
F64,
}
Expand description
Format that each sample has.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
I8
i8
with a valid range of ‘u8::MIN..=u8::MAX’ with 0
being the origin
I16
i16
with a valid range of ‘u16::MIN..=u16::MAX’ with 0
being the origin
I32
i32
with a valid range of ‘u32::MIN..=u32::MAX’ with 0
being the origin
I64
i64
with a valid range of ‘u64::MIN..=u64::MAX’ with 0
being the origin
U8
u8
with a valid range of ‘u8::MIN..=u8::MAX’ with 1 << 7 == 128
being the origin
U16
u16
with a valid range of ‘u16::MIN..=u16::MAX’ with 1 << 15 == 32768
being the origin
U32
u32
with a valid range of ‘u32::MIN..=u32::MAX’ with 1 << 31
being the origin
U64
u64
with a valid range of ‘u64::MIN..=u64::MAX’ with 1 << 63
being the origin
F32
f32
with a valid range of -1.0..1.0
with 0.0
being the origin
F64
f64
with a valid range of -1.0..1.0 with 0.0 being the origin
Implementations§
Trait Implementations§
source§impl Clone for SampleFormat
impl Clone for SampleFormat
source§fn clone(&self) -> SampleFormat
fn clone(&self) -> SampleFormat
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SampleFormat
impl Debug for SampleFormat
source§impl Display for SampleFormat
impl Display for SampleFormat
source§impl PartialEq for SampleFormat
impl PartialEq for SampleFormat
source§fn eq(&self, other: &SampleFormat) -> bool
fn eq(&self, other: &SampleFormat) -> bool
self
and other
values to be equal, and is used
by ==
.