https://gitlab.synchro.net/main/sbbs/-/commit/9e71f98f98f9e52b17c77de7
Modified Files:
src/doors/syncconquer/door/soundio_termgfx.cpp vqaaudio_termgfx.cpp src/doors/syncdoom/i_termmusic.c i_termsound.c src/doors/syncduke/syncduke_stubs.c src/doors/syncmoo1/syncmoo1_audio.c syncmoo1_music.c src/doors/syncmoo1/tests/test_audio.c src/doors/syncretro/test_audio_bytes.golden src/doors/termgfx/audio.c audio.h audio_mgr.c audio_mgr.h audio_stream.c
Log Message:
termgfx: express SyncTERM audio volume in decibels, not percent
SyncTERM's mixer is dB-native -- channels open at a -12 dB base and gains
are 10^(dB/20) -- and A;Volume/A;Queue take a `<float>dB` value verbatim
and UNCLAMPED. The audio APIs sent bare 0..100 percentages instead, which
clamp at unity, are integer-only, and encode real dB gain-staging as
opaque numbers: SD_MUSIC_MAXV 20 (= -14 dB), "queue at 25% (~ -12 dB)",
"100% ran loops up to 12 dB hot". A percentage also cannot ask for boost.
Move the whole termgfx audio stack to dB. The A;Volume/A;Queue builders
and every audio_mgr entry point (sfx, loops, music, stream) take a dB
level; the internal music-unity and loop-base trims become explicit dB;
and termgfx_db_from_pct() does the one faithful percent->dB conversion
(100 -> 0 dB, <=0 -> the -60 dB floor).
This pass is behavior-preserving. Every door call site is wrapped so the
wire carries exactly the dB SyncTERM used to compute from the old
percent, so nothing changes loudness -- verified by ear across all five
doors and by the regenerated APC goldens (V=100 -> V=0.0dB = unity). The per-door perceptual re-mappings -- readable TRIM_DB constants, a slider
that moves linearly in dB, and boost above unity where wanted -- follow separately, one door at a time.
Co-Authored-By: Claude Opus 4.8 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net