pub struct AudioView<'a> {
pub bytes: &'a [u8],
pub frames: u32,
pub channels: u16,
pub sample_rate: u32,
pub frame_stride_bytes: u32,
pub format: SampleFormat,
}Expand description
Borrowed audio view — no ownership of samples.
Fields§
§bytes: &'a [u8]§frames: u32§channels: u16§sample_rate: u32§frame_stride_bytes: u32Bytes between frame starts (≥ channels × sample size).
format: SampleFormatImplementations§
Source§impl<'a> AudioView<'a>
impl<'a> AudioView<'a>
Sourcepub fn bytes_per_sample(self) -> u32
pub fn bytes_per_sample(self) -> u32
Bytes per sample.
Sourcepub fn is_well_formed(self) -> bool
pub fn is_well_formed(self) -> bool
true when well-formed.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for AudioView<'a>
impl<'a> RefUnwindSafe for AudioView<'a>
impl<'a> Send for AudioView<'a>
impl<'a> Sync for AudioView<'a>
impl<'a> Unpin for AudioView<'a>
impl<'a> UnsafeUnpin for AudioView<'a>
impl<'a> UnwindSafe for AudioView<'a>
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