• src/doors/termgfx/audio_midi.c audio_midi.hsrc/doors/syncduke/.gitigno

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Jun 29 20:25:39 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/2f4543c6054bae5c01afabfd
    Added Files:
    src/doors/termgfx/audio_midi.c audio_midi.h
    Modified Files:
    src/doors/syncduke/.gitignore CMakeLists.txt syncduke.h syncduke_input.c syncduke_io.c syncduke_stubs.c src/doors/termgfx/CMakeLists.txt audio.c audio.h audio_mgr.c audio_mgr.h
    Log Message:
    syncduke: OPL3 MIDI music + digital-audio polish

    Builds on the SFX path (5b29253803 diabetes-21-onto) with in-process music
    and a round of audio fixes, all through termgfx's SyncTERM audio-APC manager:

    - Music: render the GRP's MIDIs via libADLMIDI (OPL3), peak-normalized, cached
    as OGG/Vorbis (libsndfile, build-gated TERMGFX_WITH_SNDFILE) under a content-
    addressed m/<track>.ogg so a track uploads once; raw-WAV fallback otherwise. - SFX: transcode the VOCs libsndfile rejects (multi-block) to 8-bit WAV.
    - Setup Sound volume sliders wired (FX + music master) and SOUND/MUSIC toggles. - Looping ambient (FX_PlayLooped*) on dedicated channels; stop on door exit.
    - soundonce flood fix: a door-side per-sound rate limit. Returning a real voice
    handle so the engine's Sound[].num gate works would deadlock newgame()'s
    busy-wait on the skill-announce voice (the engine assumes an async audiolib
    completion source our APC path lacks), so instead we drop a same-sound
    re-dispatch inside an 8-tick window -- collapsing a per-tic soundonce stream
    to one burst while leaving real weapon fire untouched.

    New termgfx audio module (audio_midi.{c,h}) + audio.c/audio_mgr.c additions; syncduke wires them through its FX_/MUSIC_ stubs.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net