• src/sbbs3/termaudio_cache.cppsrc/sbbs3/main.cpp objects.mk sbbs.h sbbs

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thursday, September 24, 2026 21:22:49
    https://gitlab.synchro.net/main/sbbs/-/commit/1b43af44a0a5d5b2e4a9fe7b
    Added Files:
    src/sbbs3/termaudio_cache.cpp
    Modified Files:
    src/sbbs3/main.cpp objects.mk sbbs.h sbbs.jsdocs.vcxproj sbbs.vcxproj termaudio.h
    Log Message:
    Track what the terminal already holds in its audio file cache

    SyncTERM's C;S cache is a directory on the client's own disk, keyed by dialing-directory entry, and it survives disconnect. So a sound file needs uploading once per client machine rather than once per session, which is
    what makes background music practical at all.

    One C;L query per session records what is already there. It is issued by
    the server and only by the server: putmsg() strips C;L out of displayed
    text precisely so untrusted text cannot elicit a reply and desynchronize
    the input stream, and that guarantee holds only while nothing else can
    trigger the query.

    Cache entries are named for the hash of their contents, so editing a file without renaming it produces a new entry rather than leaving a stale copy playing forever. That also removes any need to compare digests against the
    C;L reply: absence of the name is the miss.

    A missing, truncated or malformed reply leaves the list empty, so every
    file uploads. Failing that way costs bandwidth; failing the other way
    would play silence indefinitely with no diagnostic.

    Also adds the APC emitters for load, queue, flush and channel volume. The channel conventions are fixed in termaudio.h because exec/load/cterm_lib.js writes to the same terminal and the two must agree: 2 for music, 3 through
    15 rotating for effects.

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

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