#[repr(C)]pub struct AudioSpectralSidecarHeader {
pub magic: u32,
pub version: u16,
pub _pad: u16,
pub bin_count: u32,
pub frame_count: u32,
pub sample_rate: u32,
}Expand description
Cold mmap header for STFT/CQT sidecars (frames follow as f32 raster).
Fields§
§magic: u32Format magic "Q4AU" (SPECTRAL_SIDECAR_MAGIC).
version: u16Layout version: VERSION (v1) or VERSION_V2 (appended mel/MFCC planes).
_pad: u16Carries the SIDECAR_KIND_* transform tag (STFT = 0, CQT = 1).
bin_count: u32Frequency bins per frame.
frame_count: u32Number of frames in the raster.
sample_rate: u32Source sample rate.
Implementations§
Source§impl AudioSpectralSidecarHeader
impl AudioSpectralSidecarHeader
pub const VERSION: u16 = 1
Sourcepub const VERSION_V2: u16 = 2
pub const VERSION_V2: u16 = 2
Q4AU-v2: plane-0 (unchanged v1 layout) plus appended mel + MFCC planes.
See bake_spectral_v2_from_samples and the SpectralV2SubHeader layout.
Sourcepub fn payload_bytes(&self) -> usize
pub fn payload_bytes(&self) -> usize
Byte size of the frame raster following the header
(bin_count × frame_count × 4, saturating).
Trait Implementations§
Source§impl Clone for AudioSpectralSidecarHeader
impl Clone for AudioSpectralSidecarHeader
impl Copy for AudioSpectralSidecarHeader
Source§impl Debug for AudioSpectralSidecarHeader
impl Debug for AudioSpectralSidecarHeader
impl Pod for AudioSpectralSidecarHeader
impl StructuralPartialEq for AudioSpectralSidecarHeader
Auto Trait Implementations§
impl Freeze for AudioSpectralSidecarHeader
impl RefUnwindSafe for AudioSpectralSidecarHeader
impl Send for AudioSpectralSidecarHeader
impl Sync for AudioSpectralSidecarHeader
impl Unpin for AudioSpectralSidecarHeader
impl UnsafeUnpin for AudioSpectralSidecarHeader
impl UnwindSafe for AudioSpectralSidecarHeader
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
impl<T> AnyBitPattern for Twhere
T: Pod,
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Interleave for Twhere
T: Pod,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more