pub struct AudioFormat {
pub sample_rate: u32,
pub channels: u8,
pub sample_format: SampleFormat,
}Expand description
Sample-rate + channels + sample-format triple. Describes the layout
of an AudioChunk’s sample buffer.
Fields§
§sample_rate: u32Samples per channel per second. 48 kHz is the recorder default; 44.1 kHz is common for music sources.
channels: u8Channel count. 1 = mono, 2 = stereo. Higher counts are valid (5.1, 7.1) but unused for V1.
sample_format: SampleFormatOn-disk / on-wire sample format. Normalized to F32 inside
AudioChunk::samples.
Implementations§
Source§impl AudioFormat
impl AudioFormat
Trait Implementations§
Source§impl Clone for AudioFormat
impl Clone for AudioFormat
Source§fn clone(&self) -> AudioFormat
fn clone(&self) -> AudioFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AudioFormat
impl Debug for AudioFormat
Source§impl Hash for AudioFormat
impl Hash for AudioFormat
Source§impl PartialEq for AudioFormat
impl PartialEq for AudioFormat
Source§fn eq(&self, other: &AudioFormat) -> bool
fn eq(&self, other: &AudioFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AudioFormat
impl Eq for AudioFormat
impl StructuralPartialEq for AudioFormat
Auto Trait Implementations§
impl Freeze for AudioFormat
impl RefUnwindSafe for AudioFormat
impl Send for AudioFormat
impl Sync for AudioFormat
impl Unpin for AudioFormat
impl UnsafeUnpin for AudioFormat
impl UnwindSafe for AudioFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more