BBS: TELESC.NET.BR Assunto: src/xpdev/xpbeep.c De: Deuc¨ Data: Tue, 21 Apr 2026 20:07:07 -0700 ----------------------------------------------------------- https://gitlab.synchro.net/main/sbbs/-/commit/4f8d820161535a3e4ff10518 Modified Files: src/xpdev/xpbeep.c Log Message: xpbeep: fix non-MT build broken by xptone rewrite The node-FIFO mixer commit (897325cdb8) rewrote xptone() to open its own xp_audio stream via pthread_once + assert_pthread_mutex_lock + xp_audio_open all MT-only symbols but xptone() sits outside the XPDEV_THREAD_SAFE guard in xpbeep.c, so non-MT builds (single-threaded xpdev consumed by the Borland SBBS build) no longer compiled. Split xptone() into two variants under #ifdef XPDEV_THREAD_SAFE / #else: - MT keeps the new single-stream xp_audio_open + chunk-append path with the stream opened at -12 dB for headroom. - Non-MT restores the pre-rewrite per-chunk xp_play_sample16s flow and bakes the -12 dB attenuation into the wave buffer with an inline 0.251 scale, since the non-MT path has no stream/mixer volume to carry it. Co-Authored-By: Claude Opus 4.7 (1M context)n --- mSynchronetn hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net ----------------------------------------------------------- [Voltar]