Enum cpal::SampleFormat
[−]
[src]
pub enum SampleFormat { I16, U16, F32, }
Format that each sample has.
Variants
I16
The value 0 corresponds to 0.
U16
The value 0 corresponds to 32768.
F32
The boundaries are (-1.0, 1.0).
Methods
impl SampleFormat
[src]
pub fn sample_size(&self) -> usize
[src]
Returns the size in bytes of a sample of this format.
pub fn get_sample_size(&self) -> usize
[src]
Deprecated
Deprecated. Use sample_size
instead.
Trait Implementations
impl Clone for SampleFormat
[src]
fn clone(&self) -> SampleFormat
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for SampleFormat
[src]
impl Debug for SampleFormat
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for SampleFormat
[src]
fn eq(&self, __arg_0: &SampleFormat) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.