• src/xpdev/xpbeep.c

    From deuce@VERT to CVS commit on Thu Apr 16 06:25:04 2020
    src/xpdev xpbeep.c 1.99 1.100
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv12008

    Modified Files:
    xpbeep.c
    Log Message:
    Part two of xpbeep overhaul... remove duplicated code, fix leaks, fix
    races, etc.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Mon Apr 27 23:42:08 2020
    src/xpdev xpbeep.c 1.100 1.101
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv21901

    Modified Files:
    xpbeep.c
    Log Message:
    Fix some warnings.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Wed Apr 29 21:03:17 2020
    src/xpdev xpbeep.c 1.102 1.103
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv6227

    Modified Files:
    xpbeep.c
    Log Message:
    SDL needs a copy of the sample as well (ie: it keeps it around and free()s
    it itself)



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Fri May 1 13:43:54 2020
    src/xpdev xpbeep.c 1.103 1.104
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv10313

    Modified Files:
    xpbeep.c
    Log Message:
    Ignore the result of snd_pcm_drain() rather than waiting for it to work.
    Call snd_pcm_prepare() before every sample.

    Should fix bug #2
    https://sourceforge.net/p/syncterm/tickets/2/


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thu May 14 04:17:29 2020
    src/xpdev xpbeep.c 1.107 1.108
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv19922

    Modified Files:
    xpbeep.c
    Log Message:
    Only access PU from one thread because it's shit.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thu May 14 11:35:45 2020
    src/xpdev xpbeep.c 1.108 1.109
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv22647

    Modified Files:
    xpbeep.c
    Log Message:
    Remove debug printf()



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thu May 14 11:55:13 2020
    src/xpdev xpbeep.c 1.109 1.110
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv25184

    Modified Files:
    xpbeep.c
    Log Message:
    More rhobust pulseaudio fail-through.



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thu May 14 13:54:30 2020
    src/xpdev xpbeep.c 1.110 1.111
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv26118

    Modified Files:
    xpbeep.c
    Log Message:
    I thought I removed this debug output already...



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thu May 14 15:57:27 2020
    src/xpdev xpbeep.c 1.111 1.112
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv12690

    Modified Files:
    xpbeep.c
    Log Message:
    xptone_open() is also a valid first call... put the pthread_once() in there
    as well.
    Fixes https://sf.net/p/syncterm/tickets/14/
    and https://sf.net/p/syncterm/tickets/16/



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Thu May 14 18:12:10 2020
    src/xpdev xpbeep.c 1.112 1.113
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv4877

    Modified Files:
    xpbeep.c
    Log Message:
    Fix last commit for #ifndef XPDEV_THREAD_SAFE


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Mar 17 23:41:53 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/123f60d7afd45bf788bedf42
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Fix ALSA output on Linux

    It seems that the "real" ALSA will actually silently fail if you
    try to clear errors when no errors have occured. The FreeBSD
    emulation of ALSA does not have this insane requirement, so this
    went unnoticed for the 1.1 release.

    I suspect that this actually fixes SF bug 24, because ALSA is
    preferred over pulseaudio.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Mar 18 00:15:18 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/dc1d24b3b16cc0210c56cfd1
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Re-enable PulseAudio, ensure the handle is set to NULL on close.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Mar 18 09:58:31 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/fc9f3d6e3a62fa3e288cdaf4
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Do what was likely intended by 8b6b7b7c

    The previous attempt completely disabled pulse audio.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Mar 18 14:24:32 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e07b57962248e5cc907ca032
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    When trying to open pulse, play a millisecond of silence

    This allows the playback thread to open the device and errors to
    be checked. Otherwise, the first sound won't play.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Mar 18 14:25:58 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e07d1380e650ce7992444f1f
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Fix bug in last commit (extra parameter)
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Mar 18 14:27:14 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/0ef63571e50584c81e2e3da4
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Remove debug crap.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Mar 18 18:37:54 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/606762311f25c816bdb153ee
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Fix the single-threaded build:

    error: `handle_mutex' undeclared
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Mar 19 11:05:12 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/d5e788518f41cbfddf9b3273
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Fix race condition when handle is opened by playing a sample.

    Caused a SyncTERM hang if it played a FG beep.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Feb 7 12:23:42 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/574712547b2d63bf5dcab0f9
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Another Windows warning about constiness.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sat Feb 10 21:49:16 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/2e2ab2510aa35d61fda176c1
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Fix some warnings.

    We can't use const protection for the sample buffer because the Win32
    API takes non-const buffers. For standard implicit conversions,
    simply disable the warning where it occurs on purpose. It appears
    that MSVC builds use the equivilent of -Wconversion (which isn't even
    part of -Wall).
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sat Feb 10 22:10:30 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/1c47d84c7c55b6f6cffc0e06
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    _MSC_VER is the macro name you're looking for there :-)
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sat Feb 10 22:28:17 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/abf1cd9ee46327a9d17cba0b
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Actually remove the const the comment says I can't have.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Feb 22 06:50:40 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/63cec349ee714376a2649e5f
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Remove need_copy variable when it won't be used.

    Fixes Coverity issue.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Feb 22 07:03:57 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/ea42fffa92392454971c1cfd
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Keep pointers to dll_handle around to solence Coverity issues.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Sep 30 20:15:08 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/3993af5cda237d9b760680c2
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Since we can check at the menu now, we don't need this warning.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Dec 19 14:03:39 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/a4579ec124b326cd00f8c1ba
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    I *think* this is "FreeBSD or Solaris"...

    Nobody will really care though.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Jan 2 10:16:46 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/5fd6557c9a1719537ae66b7a
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Some especially silly Coverity-induced paranoia.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 3 09:38:31 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/a51bb0859323c8492f340d7c
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Make the types correct and eliminate infinite loop.

    If a write() to the sound device fails (for example USB device goes
    away), this would loop forever (in it's own thread and whatnot,
    so you only notice because sounds stops and a core gets used up).
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 3 11:01:35 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/403fce39994d95a63c030811
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Remove stutter.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Jan 20 14:02:41 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/a13b771308ba74307480165b
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Add missing re-lock in xptone_open_locked()

    While we're here, add debug assertions to the pthread stuff.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Apr 20 23:27:36 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/c4d40f8df8bfe47e5962a1e6
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    And, of course, fix the Borland build.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tue Apr 21 10:35:41 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/695158804810f59a019739fa
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Add some "idiomatic" idiocy for Windows.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tue Apr 21 11:24:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/d0f1673364b87c2e9d70ce00
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Fix warning.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Tue Apr 21 20:07:07 2026
    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) <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Apr 22 00:11:54 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/ee221af10158c7b559e3071c
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Switch to an equal-power cross-fade.

    The old dB-linear cross-fade was terrible... the two samples crossed
    at -30dB from the channel level (normally -12), which while perceptible
    isn't exactly what people imagine when they think of a cross-fade.

    The equal-power curve actually seems reasonable for all fades.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Apr 22 01:17:53 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/77c1c5218b8d4a29a086831d
    Modified Files:
    src/xpdev/xpbeep.c
    Log Message:
    Use equal-power ramp for Volume command too.

    This effectively let's you pan channels around as they play.
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net