#[repr(C)]pub struct AudioFrame {
pub sample_rate: u32,
pub channels: u16,
pub samples: F32Vec,
}Expand description
A chunk of audio - interleaved f32 samples in [-1.0, 1.0]. For stereo
the layout is L, R, L, R, .... This is the unit the mic backend delivers,
playback consumes, and (P8) azul-meet sends over UDP.
Fields§
§sample_rate: u32Samples per second per channel.
channels: u16Channel count (1 = mono, 2 = stereo).
samples: F32VecInterleaved f32 samples.
Implementations§
Source§impl AudioFrame
impl AudioFrame
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Number of sample frames (samples per channel) in this chunk.
Trait Implementations§
Source§impl Clone for AudioFrame
impl Clone for AudioFrame
Source§fn clone(&self) -> AudioFrame
fn clone(&self) -> AudioFrame
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 AudioFrame
impl Debug for AudioFrame
Source§impl PartialEq for AudioFrame
impl PartialEq for AudioFrame
Source§fn eq(&self, other: &AudioFrame) -> bool
fn eq(&self, other: &AudioFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AudioFrame
Auto Trait Implementations§
impl Freeze for AudioFrame
impl RefUnwindSafe for AudioFrame
impl Send for AudioFrame
impl Sync for AudioFrame
impl Unpin for AudioFrame
impl UnsafeUnpin for AudioFrame
impl UnwindSafe for AudioFrame
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