pub struct DecodedFrame {
pub pcm: Vec<i16>,
pub channels: usize,
pub sample_rate: u32,
}Expand description
One decoded ADTS frame: the interleaved 16-bit PCM plus the geometry needed to interpret it.
Fields§
§pcm: Vec<i16>Interleaved 16-bit PCM, channels samples per time index. For a
default channelConfiguration (Table 1.19, values 1–6) the
channels are in the canonical [crate::channel_map] output order
(e.g. 5.1 is L, R, C, LFE, Ls, Rs); for the unmapped configs
(0 PCE-defined, 7) they stay in raw_data_block element order
(an SCE/LFE contributes one channel, a CPE two). Length is
FRAME_LEN * channels for the plain AAC path, or
2 * FRAME_LEN * channels once the stream is SBR-active
(HE-AAC dual-rate output; FRAME_LEN * channels again when
the §4.6.18.4.3 downsampled SBR mode is selected).
channels: usizeNumber of interleaved channels this frame produced.
sample_rate: u32The frame’s sampling rate in Hz: the ADTS-signalled core rate, doubled once the stream is SBR-active (kept at the core rate in the §4.6.18.4.3 downsampled SBR mode).
Trait Implementations§
Source§impl Clone for DecodedFrame
impl Clone for DecodedFrame
Source§fn clone(&self) -> DecodedFrame
fn clone(&self) -> DecodedFrame
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more