Enum spectrusty_audio::host::cpal::SampleFormat
source · pub enum SampleFormat {
I16,
U16,
F32,
}
Expand description
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).
Implementations§
source§impl SampleFormat
impl SampleFormat
sourcepub fn sample_size(&self) -> usize
pub fn sample_size(&self) -> usize
Returns the size in bytes of a sample of this format.
Trait Implementations§
source§impl Clone for SampleFormat
impl Clone for SampleFormat
source§fn clone(&self) -> SampleFormat
fn clone(&self) -> SampleFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SampleFormat
impl Debug for SampleFormat
source§impl PartialEq<SampleFormat> for SampleFormat
impl PartialEq<SampleFormat> for SampleFormat
source§fn eq(&self, other: &SampleFormat) -> bool
fn eq(&self, other: &SampleFormat) -> bool
impl Copy for SampleFormat
impl Eq for SampleFormat
impl StructuralEq for SampleFormat
impl StructuralPartialEq for SampleFormat
Auto Trait Implementations§
impl RefUnwindSafe for SampleFormat
impl Send for SampleFormat
impl Sync for SampleFormat
impl Unpin for SampleFormat
impl UnwindSafe for SampleFormat
Blanket Implementations§
source§impl<S, T> IntoSample<S> for Twhere
S: FromSample<T>,
impl<S, T> IntoSample<S> for Twhere
S: FromSample<T>,
source§fn into_sample(self) -> S
fn into_sample(self) -> S
Convert to
S
a sample type from self
.