code wiki / (root) / nx_audio_pan.nx

nx_audio_pan.nx

buildroot/runtime/nx_audio_pan.nx

1518 B43 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic audio
docsdependenciesstructsconstsfunctions

about

nx_audio_pan.nx -- SOVEREIGN AUDIO ENGINE rung R2: stereo + constant-power pan. Places a mono source in the stereo field. Uses CONSTANT-POWER pan (gL^2+gR^2 ~= 1) so loudness is steady across the pan -- the law real engines use, baked as a Q8 table (constants computed offline, no runtime trig). Mixes panned sources additively into stereo L/R buses, clamped (reuses R0 ae_clamp). Continuous-pan interpolation + sovereign trig come in a later rung. license_tier: ORIGINAL.

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_audio_mix.nx nx_audio_pan.nx nx_audio_demo_test.nx nx_audio_pan_test.nx

imports: nx_syscalls.nxnx_audio_mix.nx

imported by: nx_audio_demo_test.nxnx_audio_pan_test.nx

structs

none

consts

14const AP_NPAN: i64 = 5

functions

15func ap_gl(i: i64) -> i64
called by 2: ap_pan_intomain
23func ap_gr(i: i64) -> i64
called by 2: ap_pan_intomain
33func ap_pan_into(inb: *i64, n: i64, g: i64, p: i64, outL: *i64, outR: *i64) -> i64
called by 2: mainmain calls 3: ap_glap_grae_clamp