Enum libpulse_binding::sample::Format [−][src]
#[repr(C)]pub enum Format { U8, ALaw, ULaw, S16le, S16be, F32le, F32be, S32le, S32be, S24le, S24be, S24_32le, S24_32be, Invalid, }
Sample format
Variants
U8Unsigned 8 Bit PCM.
ALaw8 Bit a-Law.
ULaw8 Bit mu-Law.
S16leSigned 16 Bit PCM, little endian (PC).
S16beSigned 16 Bit PCM, big endian.
F32le32 Bit IEEE floating point, little endian (PC), range -1.0 to 1.0.
F32be32 Bit IEEE floating point, big endian, range -1.0 to 1.0.
S32leSigned 32 Bit PCM, little endian (PC).
S32beSigned 32 Bit PCM, big endian.
S24leSigned 24 Bit PCM packed, little endian (PC).
S24beSigned 24 Bit PCM packed, big endian.
S24_32leSigned 24 Bit PCM in LSB of 32 Bit words, little endian (PC).
S24_32beSigned 24 Bit PCM in LSB of 32 Bit words, big endian.
InvalidAn invalid value.
Methods
impl Format[src]
impl Formatpub fn size(&self) -> usize[src]
pub fn size(&self) -> usizeSimilar to Spec::sample_size but take a sample
format instead of full sample spec.
pub fn to_string(&self) -> Option<String>[src]
pub fn to_string(&self) -> Option<String>Returns a descriptive string for the specified sample format.
pub fn parse(format: &str) -> Self[src]
pub fn parse(format: &str) -> SelfParse a sample format text. Inverse of to_string.
pub fn is_le(&self) -> Option<bool>[src]
pub fn is_le(&self) -> Option<bool>Returns true when the specified format is little endian, false if big endian. Returns
None when endianness does not apply to this format, or if unknown.
pub fn is_be(&self) -> Option<bool>[src]
pub fn is_be(&self) -> Option<bool>Returns true when the specified format is big endian, false if little endian. Returns
None when endianness does not apply to this format, or if unknown.
pub fn is_ne(&self) -> Option<bool>[src]
pub fn is_ne(&self) -> Option<bool>Is format native endian?
Returns true when the specified format is native endian, false when not. Returns None
when endianness does not apply to the specified format, or endianess is unknown
pub fn is_re(&self) -> Option<bool>[src]
pub fn is_re(&self) -> Option<bool>Is format reverse of native endian?
Returns true when the specified format is reverse endian, false when not. Returns None
when endianness does not apply to the specified format, or endianess is unknown.
Trait Implementations
impl Debug for Format[src]
impl Debug for Formatfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Copy for Format[src]
impl Copy for Formatimpl Clone for Format[src]
impl Clone for Formatfn clone(&self) -> Format[src]
fn clone(&self) -> FormatReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for Format[src]
impl PartialEq for Formatfn eq(&self, other: &Format) -> bool[src]
fn eq(&self, other: &Format) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Format[src]
impl Eq for Formatimpl From<Format> for pa_sample_format_t[src]
impl From<Format> for pa_sample_format_timpl From<pa_sample_format_t> for Format[src]
impl From<pa_sample_format_t> for Formatfn from(f: pa_sample_format_t) -> Self[src]
fn from(f: pa_sample_format_t) -> SelfPerforms the conversion.
impl Default for Format[src]
impl Default for Format