• src/doors/syncmoo1/syncmoo1_audio.c syncmoo1_audio.hsrc/doors/syncmoo1

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jul 9 01:55:11 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/d04b760f7ccdff599cc62b66
    Added Files:
    src/doors/syncmoo1/syncmoo1_audio.c syncmoo1_audio.h
    Modified Files:
    src/doors/syncmoo1/CMakeLists.txt src/doors/syncmoo1/tests/CMakeLists.txt test_audio.c
    Log Message:
    syncmoo1: add syncmoo1_audio -- content-addressed SFX over termgfx

    The module 1oom's hw_audio_sfx_* hooks will forward to. Samples are content-addressed as s_<fnv1a8>, so identical bytes in INTROSND.LBX and SOUNDFX.LBX share one client-cache entry and the name never depends on
    1oom's index numbering.

    Two engine facts shape it, both read from the source:

    - batch_start(max) is a capacity hint, not a reset. ui_late_init()
    registers the 41 gameplay sounds before the intro registers its
    three, so clearing here would silence the game once the intro ran.
    There is a test for exactly that.

    - The audio tier is unknown while the engine registers sounds, so
    every Store would be dropped. Samples are copied into a pending
    queue and drained by sm_audio_pump() once the tier is known.

    No manager attached (a terminal with no audio APC) is a silent no-op throughout, which is also what lets the unit test drive the module with
    no socket. Tests run with -UNDEBUG so the assert()s actually execute.

    sm_audio_slot() returns NULL for an empty slot, so the test NULL-checks
    before every strcmp(). Without that, the batch_start regression test
    would "fail" by segfaulting inside strcmp before the assertion could
    name the defect it exists to catch.

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

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