[][src]Enum libpulse_binding::sample::Format

#[repr(C)]pub enum Format {
    U8,
    ALaw,
    ULaw,
    S16le,
    S16be,
    F32le,
    F32be,
    S32le,
    S32be,
    S24le,
    S24be,
    S24_32le,
    S24_32be,
    Invalid,
}

Sample format

Variants

U8

Unsigned 8 Bit PCM.

ALaw

8 Bit a-Law.

ULaw

8 Bit mu-Law.

S16le

Signed 16 Bit PCM, little endian (PC).

S16be

Signed 16 Bit PCM, big endian.

F32le

32 Bit IEEE floating point, little endian (PC), range -1.0 to 1.0.

F32be

32 Bit IEEE floating point, big endian, range -1.0 to 1.0.

S32le

Signed 32 Bit PCM, little endian (PC).

S32be

Signed 32 Bit PCM, big endian.

S24le

Signed 24 Bit PCM packed, little endian (PC).

S24be

Signed 24 Bit PCM packed, big endian.

S24_32le

Signed 24 Bit PCM in LSB of 32 Bit words, little endian (PC).

S24_32be

Signed 24 Bit PCM in LSB of 32 Bit words, big endian.

Invalid

An invalid value.

Implementations

impl Format[src]

pub fn size(&self) -> usize[src]

Similar to Spec::sample_size but take a sample format instead of full sample spec.

pub fn to_string(&self) -> Option<Cow<'static, str>>[src]

Gets a descriptive string for the specified sample format.

pub fn parse(format: &str) -> Self[src]

Parses a sample format text. Inverse of to_string.

pub fn is_le(&self) -> Option<bool>[src]

Checks if format is little endian.

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]

Checks if format is big endian.

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]

Checks if format is 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 endianness is unknown.

pub fn is_re(&self) -> Option<bool>[src]

Checks if format is 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 endianness is unknown.

Trait Implementations

impl Clone for Format[src]

impl Copy for Format[src]

impl Debug for Format[src]

impl Default for Format[src]

impl Eq for Format[src]

impl From<Format> for pa_sample_format_t[src]

impl From<pa_sample_format_t> for Format[src]

impl PartialEq<Format> for Format[src]

impl StructuralEq for Format[src]

impl StructuralPartialEq for Format[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.