[−][src]Enum libpulse_binding::sample::Format
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.
Methods
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]
Returns a descriptive string for the specified sample format.
pub fn parse(format: &str) -> Self
[src]
Parse a sample format text. Inverse of to_string
.
pub fn is_le(&self) -> Option<bool>
[src]
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]
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]
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 endianness is unknown.
pub fn is_re(&self) -> Option<bool>
[src]
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 endianness is unknown.
Trait Implementations
impl Copy for Format
[src]
impl PartialEq<Format> for Format
[src]
fn eq(&self, other: &Format) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Default for Format
[src]
impl From<Format> for pa_sample_format_t
[src]
impl From<pa_sample_format_t> for Format
[src]
fn from(f: pa_sample_format_t) -> Self
[src]
impl Clone for Format
[src]
fn clone(&self) -> Format
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Format
[src]
impl Debug for Format
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,