nx_flac_frame_gate.nx
buildroot/runtime/nx_flac_frame_gate.nx
about
nx_flac_frame_gate.nx -- proves FLAC frame + subframe decoding.
T4/T5 assemble REAL frames byte by byte and decode them to samples: a
192-sample CONSTANT frame at 44.1kHz/16-bit mono, and a 3-sample VERBATIM
frame using the deferred 8-bit block size. Both exercise the whole path --
sync, flag bytes, UTF-8 frame number, deferred fields, CRC-8, subframe
header, sample extraction.
T6 is the one that matters for long streams: the header LENGTH is variable
(4 flag bytes + a 1-7 byte number + optional deferred block size and rate),
and the CRC covers exactly those bytes. A parser with a hard-coded length
works on every short file and breaks at frame 128, when the UTF-8 number
grows to two bytes. T6 asserts hdrlen 6 for the simple frame and 7 for the
deferred-blocksize one.
NON-VACUITY: T8 covers refusals -- broken sync, a flipped CRC byte, and the
reserved bit set must each be rejected.
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_bitstream.nxnx_flac.nxnx_flac_frame.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 25 | func g_puts(s: *u8) -> i64 |
| 32 | func g_putn(v: i64) -> i64 |
| 46 | func main() -> i64 |