https://gitlab.synchro.net/main/sbbs/-/commit/bd8561267a9eaa29c4c2601a
Modified Files:
src/doors/syncretro/main.c syncretro_audio.c syncretro_audio.h syncretro_io.c
Log Message:
syncretro: stop the audio dead on exit, and swallow the last keystrokes
Two things the player sees after quitting.
The audio kept playing. SyncTERM's do_flush() clears a channel only
when no fade is asked for; given O=, it queues a silent crossfade
against the head buffer and leaves the rest of the FIFO in place (syncterm/audio_apc.c). The door runs three chunks deep, so a faded
flush let ~300 ms of game audio play on after the terminal was handed
back to the BBS. Flush without a fade. An abrupt stop is what a
player expects at the moment they quit, and it is the only spelling
that actually empties the queue.
The BBS typed at them. The door restores translated-key mode before
it exits, so any key still held is re-sent as a plain character that
nothing reads; Synchronet's input thread resumes, finds the bytes,
and echoes them at its prompt. Build a fort in Utopia, quit, and the
BBS greets you with "3141". Swallow input for a moment after the
restore, bounded by a deadline and a byte cap.
Also: Ctrl-R now flushes the channel, which the design promised and
the code did not do -- the queued audio belongs to a game that no
longer exists. Pausing drops any chunks held mid-prime for the same
reason. And the flush is skipped entirely for a terminal that never
confirmed libsndfile, so it really does hear nothing from us.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net