Files
totk-pc-recomp/runtime/ui
Valiantsin DzerakhandClaude Opus 5.5 6347b8262a The audio output device can be chosen on the Sound tab and in totk.ini (audio_device), and a change moves the sound to it while the game runs (#1014)
TOTK_AUDIO_DEVICE names the device as SDL lists it; unset, empty or default keeps the system default and the same open
as before. audio_mixer.c output_open opens the named device, or the default with one log line when it is not
connected. Once a device is chosen, an output worker thread (output_worker) owns the SDL stream: on a cfg change and
once a second it resolves the name again and output_switch opens the new device with the same spec, destroys the old
stream (which waits for its callback), restarts the prefill and resumes. The render thread only wakes or starts the
worker (output_watch), so the game's audio never waits for a device open. A chosen device that disappears falls back
to the system default and comes back within a second of being plugged in again. TOTK_AUDIO_CHANNELS=auto reads the
channels of the device chosen at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 22:28:42 +03:00
..