#[non_exhaustive]pub struct AudioChunk {
pub data: Vec<f32>,
pub sample_rate: u32,
pub channels: u16,
}Expand description
A chunk of captured audio data.
#[non_exhaustive]: produced by the capture path and read field by field by
consumers. Sealing it keeps future metadata additions backward compatible.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data: Vec<f32>Interleaved f32 samples, normally in the range [-1.0, 1.0]. The conditioning chain sanitizes non-finite input, so a conditioned capture always delivers finite samples. The range is guaranteed when the limiter is enabled, which bounds the output to its ceiling; automatic gain control without the limiter can drive loud passages above full scale, so enable the limiter to keep every sample within range.
sample_rate: u32Sample rate of this chunk.
channels: u16Number of channels.
Trait Implementations§
Source§impl Clone for AudioChunk
impl Clone for AudioChunk
Source§fn clone(&self) -> AudioChunk
fn clone(&self) -> AudioChunk
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 moreAuto Trait Implementations§
impl Freeze for AudioChunk
impl RefUnwindSafe for AudioChunk
impl Send for AudioChunk
impl Sync for AudioChunk
impl Unpin for AudioChunk
impl UnsafeUnpin for AudioChunk
impl UnwindSafe for AudioChunk
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