D322: prefer DirectSound over SDL2's WASAPI backend on Windows

Four simultaneous drain monitors on the same USB interface: WASAPI (512 and
2048 samples) fell to 81-88% drain for ~30-50 s every ~317 s and lost 1.4% of
playback, while DirectSound stayed at exact real time. Each WASAPI shortfall
overflowed the audio queue and dropped blocks (the periodic garbled bursts).
audioInit() now hints directsound,wasapi; SDL_AUDIODRIVER still overrides.
Golden gate 3/3; 60 s GE_D204 run clean after load.
This commit is contained in:
James Dansereau committed 2026-09-25 22:25:13 -04:00
1 parent 2a20a93318
commit edddf87429
4 files changed
+33 -4

No files matched your search

+4 -1
View File
@@ -1250,7 +1250,10 @@ GE on N64 renders gameplay at ~20–30 fps, so `g_ClockTimer` (= `speedgraphfram
and cost several game runs to chase. `tools_pc/sdl_drain_monitor.c` opens SDL
exactly like `port/src/audio.c` with no game and no window; on the
maintainer's Focusrite USB interface it showed the same ~312 s drain dips
(to 88 %) outright. Run it first on any "audio gets garbled" report.
(to 88 %) outright, and running it on several SDL backends at once showed the
culprit was SDL2's WASAPI path, not the device (DirectSound was clean; the
port now prefers it on Windows). Run it first on any "audio gets garbled"
report, and compare backends with `SDL_AUDIODRIVER` before blaming the hardware.
- Investigation loop is: reproduce → env-gated capped probe → root-cause
→ narrow `#ifdef PORT` fix → visual verify (`GE_PCDUMP` +
`tools_pc/pixcount.py` vs `docs/reference/n64-footage-*`).