code wiki / (root) / nx_audio_wav.nx

nx_audio_wav.nx

buildroot/runtime/nx_audio_wav.nx

2853 B76 linesdepth 2pulls 2 transitivereach 23 importersview sourcekind librarytopic audio
docsdependenciesstructsconstsfunctions

about

nx_audio_wav.nx -- SOVEREIGN AUDIO ENGINE rung R4: render to a real .wav file. Makes the engine produce a PLAYABLE artifact (the live-testable principle for audio: the file is the proof). WAV/RIFF is a STANDARD format -> sovereign implementation, proven byte-exact vs the spec in the gate (per the non-novel verification doctrine). 16-bit PCM, little-endian, interleaved stereo. Only % and / used (no reliance on bitwise). license_tier: ORIGINAL.

dependencies 1 imports · 18 importers

nx_syscalls.nx nx_audio_wav.nx nx_audio_bark.nx nx_audio_beats_variants.nx nx_audio_binaural_beats.nx nx_audio_bowl.nx nx_audio_critters.nx nx_audio_sfx_test.nx nx_audio_sfx_web.nx nx_audio_sfx_web_test.nx nx_audio_song_test.nx nx_audio_wav_test.nx

diagram shows first 10 each side; +0 more imports, +8 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_audio_bark.nxnx_audio_beats_variants.nxnx_audio_binaural_beats.nxnx_audio_bowl.nxnx_audio_critters.nxnx_audio_sfx_test.nxnx_audio_sfx_web.nxnx_audio_sfx_web_test.nxnx_audio_song_test.nxnx_audio_wav_test.nxnx_audio_web.nxnx_audio_web_test.nxnx_game_audio_gate.nxnx_gamemusic_gate.nxnx_wasm_diablo_html.nxnx_wasm_shmup_html.nxnx_wire_diablo2_gate.nxnx_wire_endlesssky_gate.nx

structs

none

consts

10const K_MAGIC_65536: i64 = 65536
11const K_MAGIC_16777216: i64 = 16777216

functions

14func wav_put_u32(buf: *u8, off: i64, v: i64) -> i64
called by 1: wav_render_stereo
21func wav_put_u16(buf: *u8, off: i64, v: i64) -> i64
called by 1: wav_render_stereo
27func wav_put_i16(buf: *u8, off: i64, v: i64) -> i64
called by 1: wav_render_stereo
33func wav_put_str(buf: *u8, off: i64, s: *u8) -> i64
called by 1: wav_render_stereo
40func wav_render_stereo(L: *i64, R: *i64, n: i64, rate: i64, out: *u8) -> i64
69func wav_save(path: *u8, buf: *u8, len: i64) -> i64