https://gitlab.synchro.net/main/sbbs/-/commit/96140261b2f6c68e41f59442
Modified Files:
src/doors/syncconquer/PROVENANCE.md src/doors/syncconquer/door/door_input.c door_io.c soundio_termgfx.cpp src/doors/syncconquer/vanilla/redalert/options.cpp sounddlg.cpp
Log Message:
syncalert: make the Sound Controls usable over the terminal
Three fixes to in-game music/sound control, all driven by SyncTERM play:
Widen the volume sliders. The Options sound sliders were a 10px-tall band
at 640x400 (5 base units x RESFACTOR 2), narrower than one text-cell row, so
a cell-granular mouse (SyncTERM has no SGR-Pixels) could click between the
band and miss it. Raised to 8 base = one full 16px cell row, so a click
always lands.
Add +/- music-volume hotkeys. SyncAlert_Music_Volume_Step() (options.cpp, extern "C") nudges Options.ScoreVolume ~10% and applies it via the same Set_Score_Volume() the slider uses, so the two agree and it persists. The
door intercepts +/=/-/_ in all keyboard modes: door_io_hotkey()'s raw-byte branch (legacy/kitty) and door_input.c's evdev decoder (SyncTERM).
Fix the "stop" button. The score loops CLIENT-SIDE (termgfx uploads it once
and the terminal loops it), so SoundImp_Stop_Sample() resetting our tracker never silenced it -- only door exit called termgfx_audio_music_stop(). But stopping immediately would gap a theme CHANGE (which also stops the old
tracker before starting the new). So arm a deferred stop on Stop_Sample of a music tracker, cancel it when a new score stream starts (a theme change),
and otherwise fire it ~120ms later from a per-tick housekeep. A real Theme.Stop() (the stop button, THEME_QUIET) now goes quiet; song changes
stay seamless.
Co-Authored-By: Claude Opus 4.8 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net