pub struct AudioFrame {
pub pcm: Vec<i16>,
pub sample_rate: u32,
pub num_channels: u16,
}Expand description
Mono 16-bit LE PCM with an explicit sample rate and channel count.
Mirrors today’s crate::types::AudioChunk (PROCESSOR-DESIGN §1.1) but adds
num_channels; Arc-wrapped in the Frame enum so the hot path never copies
PCM. Convertible from/to AudioChunk (mono) via From.
Fields§
§pcm: Vec<i16>§sample_rate: u32§num_channels: u16Implementations§
Trait Implementations§
Source§impl Clone for AudioFrame
impl Clone for AudioFrame
Source§impl Debug for AudioFrame
impl Debug for AudioFrame
impl Eq for AudioFrame
Source§impl From<&AudioChunk> for AudioFrame
impl From<&AudioChunk> for AudioFrame
Source§fn from(c: &AudioChunk) -> Self
fn from(c: &AudioChunk) -> Self
Converts to this type from the input type.
Source§impl From<&AudioFrame> for AudioChunk
Lossy conversion back to the mono crate::types::AudioChunk data shape
(drops num_channels; the live path is always mono).
impl From<&AudioFrame> for AudioChunk
Lossy conversion back to the mono crate::types::AudioChunk data shape
(drops num_channels; the live path is always mono).
Source§fn from(f: &AudioFrame) -> Self
fn from(f: &AudioFrame) -> Self
Converts to this type from the input type.
Source§impl From<AudioChunk> for AudioFrame
impl From<AudioChunk> for AudioFrame
Source§fn from(c: AudioChunk) -> Self
fn from(c: AudioChunk) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AudioFrame
impl PartialEq for AudioFrame
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.