code wiki / _hdl_build / nx_media_audio_page.nx
nx_media_audio_page.nx
buildroot/runtime/_hdl_build/nx_media_audio_page.nx
about
nx_media_audio_page.nx -- nishifamily.com/media AUDIO TAB (operator 2026-06-23: "where can I listen to your
output -- get nishifamily.com/media to have an audio tab and generate to it"). Emits a SELF-CONTAINED, sovereign
HTML page: each generated audio file is read from disk and EMBEDDED as a base64 data-URI inside an <audio controls>
element (the nx_audio_web pattern) -> the page PLAYS in any browser with NO separate file + NO server (data URI).
Open it locally to listen now; published to sites/nishifamily/media/audio.html for nishifamily.com/media.
Sovereign: our own base64 + our own WAV (the audio was made by our own modal synth). license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_base64.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_2097152: i64 = 2097152 |
| 10 | const K_MAGIC_1048576: i64 = 1048576 |
| 11 | const K_MAGIC_1572864: i64 = 1572864 |
| 13 | const MLOG: *u8 = "knowledge/status/media_audio.log" |
| 14 | const OUTP: *u8 = "web_assets/media_audio.html" |
functions
| 16 | func mp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 17 | func mpn(v: i64) -> i64 |
| 25 | func app(out: *u8, off: *i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ out[off[0]]=s[i]; off[0]=off[0]+1; i=i+1 } return 0 } |
| 26 | func read_file(path: *u8, buf: *u8, cap: i64) -> i64 |
| 35 | func add_track(out: *u8, off: *i64, title: *u8, desc: *u8, wavpath: *u8, wavbuf: *u8, wavcap: i64, b64buf: *u8) -> i64 |
| 48 | func main() -> i64 |