syom 0.8.0

AAC to planar f32. LC, HE-AAC, AAC-LD. ADTS, M4A, LATM. Zero deps.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Heap-built fixed-size arrays (TASK-118): `Box::new([v; N])` builds the
//! array on the stack first, which for frame-sized state costs tens of KiB
//! of stack in constructors. Going through a `Vec` never does.

/// `Box<[T; N]>` filled with clones of `v`, without an `N`-element stack
/// temporary.
pub(crate) fn heap_array<T: Clone, const N: usize>(v: T) -> Box<[T; N]> {
    match vec![v; N].into_boxed_slice().try_into() {
        Ok(a) => a,
        Err(_) => unreachable!("vec![v; N] always has N elements"),
    }
}