code wiki / _hdl_build / nx_audio_codec_pack.nx
nx_audio_codec_pack.nx
buildroot/runtime/_hdl_build/nx_audio_codec_pack.nx
about
nx_audio_codec_pack.nx -- prove the WHOLE /listen audio set runs through OUR OWN lossless codec (operator
2026-06-23: "make sure this is all using our own codec"). For each track WAV: deinterleave L/R Int16,
nv1l_encode each channel with our NishiLossless LPC codec (nx_nv1_lpc), then nv1l_decode and assert the
reconstruction is BIT-EXACT to the original PCM. Reports the compression ratio per track. GREEN only if every
channel of every track round-trips bit-for-bit (zero loss) -- that is the "using our own codec" proof.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_nv1_lpc.nxnx_syscalls.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
| 9 | const K_MAGIC_524288: i64 = 524288 |
functions
| 11 | func kp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 12 | func kpn(v: i64) -> i64 |
| 20 | func kf_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 26 | func same(a: *u8, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 } called by 1: pack_ch |
| 29 | func pack_ch(pcm: *u8, nsamp: i64, enc: *u8, dec: *u8, cap: i64) -> i64 |
| 39 | func pack_file(path: *u8, wav: *u8, Lb: *u8, Rb: *u8, enc: *u8, dec: *u8, cap: i64) -> i64 |
| 61 | func main() -> i64 |