• src/doors/termgfx/OPUS_TRANSITION.mdsrc/doors/syncdoom/i_termmusic.c s

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Jul 1 23:24:33 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/d13fe322b4816e97cdf4667d
    Added Files:
    src/doors/termgfx/OPUS_TRANSITION.md
    Modified Files:
    src/doors/syncdoom/i_termmusic.c syncdoom.c src/doors/syncduke/syncduke.h syncduke_config.c syncduke_io.c syncduke_stubs.c src/doors/termgfx/audio.c audio.h audio_mgr.c audio_mgr.h xtrn/syncdoom/syncdoom.example.ini xtrn/syncduke/syncduke.example.ini
    Log Message:
    termgfx/syncdoom/syncduke: encode door music as Ogg/Opus, sysop-tunable quality

    Switch the doors' rendered-music tier from Ogg/Vorbis to Ogg/Opus. Opus at a given bitrate out-resolves Vorbis, so at matched quality the one-time per-track upload is smaller and cleaner (real OPL tracks measured ~88 kbps Opus vs ~100 kbps Vorbis -- ~10% smaller with better fidelity).

    - termgfx/audio.c: encode SF_FORMAT_OPUS instead of SF_FORMAT_VORBIS. libsndfile's
    Opus encoder accepts only an Opus sample rate (8/12/16/24/48k), so the doors
    now render music at 48000 (i_termmusic.c, syncduke_stubs.c). Container and
    extension stay .ogg (Ogg-Opus is still an Ogg file), so SyncTERM's libsndfile
    decodes it with no change (it sniffs the codec from content).
    - Per-manager music_quality (default TERMGFX_MUSIC_QUALITY_DEFAULT = 0.15) plus a
    new termgfx_audio_set_music_quality() setter, replacing the old compile-time
    constant. libsndfile maps Opus VBR quality ~linearly to bitrate (q0.15 ~= 88
    kbps), unlike Vorbis's content-adaptive VBR.
    - Sysop-configurable per door via syncduke.ini / syncdoom.ini [audio]
    music_quality, documented in both *.example.ini.
    - The cache key (MUS_RENDER_VER) is intentionally NOT bumped: codec and quality
    are transport details, not content, so a client's existing cached file stays
    valid and is never force re-transferred. Reserve MUS_RENDER_VER bumps for
    rendered-PCM changes (bank/normalisation/render fixes).

    OPUS_TRANSITION.md captures the measurements and the design rationale.

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

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