nx_audio_resample.nx
buildroot/runtime/nx_audio_resample.nx
about
nx_audio_resample.nx -- SOVEREIGN AUDIO ENGINE rung R1: sample-rate conversion.
Any real engine must resample sources to the mixer's rate before mixing (44.1k
source -> 48k device, etc.). This is a linear-interpolation resampler in Q16
fixed point -- deterministic, no library. Samples are i64 in the i16 range
(reuses ae_clamp from R0). Later rungs add higher-order (cubic/sinc) interp.
license_tier: ORIGINAL.
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_audio_mix.nx
imported by: nx_audio_demo_test.nxnx_audio_resample_test.nx
structs
| none |
consts
| 12 | const AR_FRAC: i64 = 65536 // Q16 unit (1.0) |
functions
| 15 | func ar_out_len(n_in: i64, rate_in: i64, rate_out: i64) -> i64 called by 1: main |
| 20 | func ar_resample_linear(inb: *i64, n_in: i64, rate_in: i64, rate_out: i64, out: *i64, out_cap: i64) -> i64 |