#[non_exhaustive]pub enum Format {
Show 48 variants
Unknown = -1,
S8 = 0,
U8 = 1,
S16LE = 2,
S16BE = 3,
U16LE = 4,
U16BE = 5,
S24LE = 6,
S24BE = 7,
U24LE = 8,
U24BE = 9,
S32LE = 10,
S32BE = 11,
U32LE = 12,
U32BE = 13,
FloatLE = 14,
FloatBE = 15,
Float64LE = 16,
Float64BE = 17,
IEC958SubframeLE = 18,
IEC958SubframeBE = 19,
MuLaw = 20,
ALaw = 21,
ImaAdPCM = 22,
MPEG = 23,
GSM = 24,
Special = 31,
S243LE = 32,
S243BE = 33,
U243LE = 34,
U243BE = 35,
S203LE = 36,
S203BE = 37,
U203LE = 38,
U203BE = 39,
S183LE = 40,
S183BE = 41,
U183LE = 42,
U183BE = 43,
G72324 = 44,
G723241B = 45,
G72340 = 46,
G723401B = 47,
DSDU8 = 48,
DSDU16LE = 49,
DSDU32LE = 50,
DSDU16BE = 51,
DSDU32BE = 52,
}
Expand description
SND_PCM_FORMAT_xxx constants
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown = -1
S8 = 0
U8 = 1
S16LE = 2
S16BE = 3
U16LE = 4
U16BE = 5
S24LE = 6
S24BE = 7
U24LE = 8
U24BE = 9
S32LE = 10
S32BE = 11
U32LE = 12
U32BE = 13
FloatLE = 14
FloatBE = 15
Float64LE = 16
Float64BE = 17
IEC958SubframeLE = 18
IEC958SubframeBE = 19
MuLaw = 20
ALaw = 21
ImaAdPCM = 22
MPEG = 23
GSM = 24
Special = 31
S243LE = 32
S243BE = 33
U243LE = 34
U243BE = 35
S203LE = 36
S203BE = 37
U203LE = 38
U203BE = 39
S183LE = 40
S183BE = 41
U183LE = 42
U183BE = 43
G72324 = 44
G723241B = 45
G72340 = 46
G723401B = 47
DSDU8 = 48
DSDU16LE = 49
DSDU32LE = 50
DSDU16BE = 51
DSDU32BE = 52
Implementations§
source§impl Format
impl Format
pub const fn s16() -> Format
pub const fn u16() -> Format
pub const fn s32() -> Format
pub const fn u32() -> Format
pub const fn float() -> Format
pub const fn float64() -> Format
pub const fn s24() -> Format
pub const fn s24_3() -> Format
pub const fn u24() -> Format
pub const fn u24_3() -> Format
pub const fn s20_3() -> Format
pub const fn u20_3() -> Format
pub const fn s18_3() -> Format
pub const fn u18_3() -> Format
pub const fn dsd_u16() -> Format
pub const fn dsd_u32() -> Format
pub const fn iec958_subframe() -> Format
pub fn physical_width(&self) -> Result<i32>
pub fn width(&self) -> Result<i32>
pub fn silence_16(&self) -> u16
pub fn little_endian(&self) -> Result<bool>
Trait Implementations§
source§impl Ord for Format
impl Ord for Format
source§impl PartialEq for Format
impl PartialEq for Format
source§impl PartialOrd for Format
impl PartialOrd for Format
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Format
impl Eq for Format
impl StructuralEq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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