• src/doors/syncconquer/door/vqaaudio_termgfx.cppsrc/doors/syncconquer/C

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Jul 11 04:50:47 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8d9808e2b1b3f0c5ab2fe126
    Added Files:
    src/doors/syncconquer/door/vqaaudio_termgfx.cpp
    Modified Files:
    src/doors/syncconquer/CMakeLists.txt PROVENANCE.md src/doors/syncconquer/vanilla/redalert/init.cpp src/doors/termgfx/audio_mgr.c audio_mgr.h
    Log Message:
    syncalert: FMV cutscene audio over the terminal

    Red Alert's VQA cutscenes played silent in the door. Anim_Init() enabled captions and EVA but never VQAOPTF_AUDIO, so the VQA loader decoded no
    audio at all; and the vendored common/vqaaudio_null.cpp stubbed the whole
    audio backend. This gives the cutscenes their dialog and effects.

    New door/vqaaudio_termgfx.cpp replaces the vqaaudio_null stub (swapped in
    the door CMake). It accumulates each decoded VQA audio block and ships it
    to the client through a new termgfx streaming path -- Store, Load, then
    A;Queue onto the SyncTERM music-channel FIFO -- so the chunks play back
    to back. Decode is never paused: the player's frame display rides the
    same loop, so pausing it to throttle audio would stutter the video;
    instead a throttle bounds how far the client FIFO is allowed to run
    ahead of playback.

    A/V pacing rides the door's true monotonic wall clock (door_io_now_ms),
    driving BOTH the movie's VQA_GetTime (which the drawer paces frames on)
    and the audio-ship throttle, so video and audio stay locked in real
    time. The vendored 60Hz TimerClass is deliberately not used for this:
    its tick count is delta_ms / (1000/60), and 1000/60 truncates to 16, so
    it runs ~4% fast -- enough to race the video ahead of the real-time
    audio over a minute or two. This mirrors the OpenAL backend, whose
    VQA_GetTime derives from the audio device's real playback position.

    The new shared termgfx API termgfx_audio_stream_chunk() / termgfx_audio_stream_stop() (audio_mgr.c) is reusable by the other
    doors. Vendored engine change recorded in PROVENANCE.md (#14).

    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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