Say what NX2NAVI_AUDIO_STRICT, the audio_bad log lines and the docs really do, as the review of the audio change found them overstated.

The review found six texts that claimed more than the code does. NX2NAVI_AUDIO_STRICT=1 does not bring 0.10.1 back
exactly: it also ends the process on a limiter attack or release that is not a number and on a mix in use with a
negative buffer count, which 0.10.1 let through, so the cfg.c comment, nx2navi.ini.example, the audren.h audio_bad
comment and the test's comment now say it does so for most of these values. Its FATAL line described the non-strict
outcome ("its sound passes through unchanged", "the renderer goes on") and then ended the process; it now ends with
"NX2NAVI_AUDIO_STRICT=1 ends the process here instead". The audren.c header and docs/architecture.md said nothing the
game sends ends the process, while OpenAudioRenderer's parameters and the request's buffer descriptors still do; both
now say a value in the game's RequestUpdate does not, and name the two that still do. The first log line of a kind
gave "N such values so far", but bad_count counts every update and every render pass that meets any kind, so it now
reads "N times so far for all kinds together"; the renderer_close line and the bad_count comment say the same.
docs/building.md and the test's comment called 0x5299 the one result the SDK hands back; the SDK hands back 0x5299,
0x5499 and 0x5699 and aborts on any other. Texts only: no behaviour changes.

The first commit's message says any other result than 0x5299 makes the SDK abort; it should read any result but
0x5299, 0x5499 and 0x5699. The branch's history is kept, so this message carries the correction.

audio_params_check (the strict runs still end with "FATAL: audio:" and the switch's name), cfg_rows_check (0
problems) and check_content passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 19:35:48 -05:00
parent 7e7fed639e
commit 9770d409d5
7 changed files with 27 additions and 22 deletions

View File

@@ -34,10 +34,11 @@ from other projects, with its license, is listed in [THIRD_PARTY_NOTICES.md](../
- The SDK boundary is at the `nn::*` function level: threads and synchronisation, IPC, memory, fs/RomFS, time,
account, applet, hid, audio renderer and effects run as host code. Only `audren:u` and `sm:` are real IPC services.
What the game sends the audio renderer never ends the process (`audren.c` `audio_bad`): an update whose sections do
not match the renderer is refused whole with 0x5299, which the SDK hands back to the game, and a record, effect or
sink whose values the renderer cannot use is left out, passed through or skipped, with one log line per kind.
`NX2NAVI_AUDIO_STRICT=1` ends the process there instead, for bug reports.
A value in the game's RequestUpdate no longer ends the process (`audren.c` `audio_bad`); OpenAudioRenderer's
parameters and the request's buffer descriptors still do. An update whose sections do not match the renderer is
refused whole with 0x5299, which the SDK hands back to the game, and a record, effect or sink whose values the
renderer cannot use is left out, passed through or skipped, with one log line per kind. `NX2NAVI_AUDIO_STRICT=1`
ends the process there instead, for bug reports.
- Window, keyboard and mouse: Win32 (`gfx_window_win.c`, `input_win.c`). Gamepads and audio output: SDL3 (every
connected gamepad is open; the game reads the one pressed last, `input.c`). Voice: libopus. Movies: a host VP9
decoder over libvpx replaces the SDK's `movie::Decoder` (`runtime/ov_movie.c`).

View File

@@ -524,8 +524,8 @@ A change to what the audio renderer does with values the game sends (`runtime/au
It builds `audren.c` and `audio_mixer.c` with the rest of the runtime stubbed and the real effect DSPs linked, and
sends hand-built RequestUpdates through `renderer_handler`. An update whose sections do not match the renderer (sizes,
magic words, overruns, the output buffer, a mix layout with a negative count or more buffers than the renderer has, a
splitter id run whose length wraps in 32 bits) answers 0x5299, the one result the SDK hands back to the game instead
of aborting, and writes no output, changes no renderer state and places no C buffers. A channel, voice or splitter
splitter id run whose length wraps in 32 bits) answers 0x5299, a result the SDK hands back to the game (it aborts on
any result but 0x5299, 0x5499 and 0x5699), and writes no output, changes no renderer state and places no C buffers. A channel, voice or splitter
record with an id the renderer does not have, a wave buffer index of 4, a filter that is not a finite number and a
changed mix with a foreign id are left out of an update that is otherwise applied; a splitter destination id the
renderer does not have is never read (a guard entry before the destination table would make it heard). Each effect and