From 8d840d89ea8e10ff864c8537011759e3a19781a6 Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Sun, 6 Apr 2025 23:48:40 +0200 Subject: [PATCH] Make a constant for the park signal in case we want to change it --- src/Backends/Audio/SoftwareMixer/Solaris.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Backends/Audio/SoftwareMixer/Solaris.cpp b/src/Backends/Audio/SoftwareMixer/Solaris.cpp index cfc7487a..4276b9af 100644 --- a/src/Backends/Audio/SoftwareMixer/Solaris.cpp +++ b/src/Backends/Audio/SoftwareMixer/Solaris.cpp @@ -17,6 +17,7 @@ #include #include +static const int parkSignal = SIGUSR1; static pthread_t mainThread; static int sndfp; static void (*parent_callback)(long *stream, size_t frames_total); @@ -46,7 +47,7 @@ static void* soundcheckthread(void*) { // park the main thread since the game probably expects it to not be // doing anything else while we're requesting audio frames. audioDone = false; - pthread_kill(mainThread, SIGUSR1); + pthread_kill(mainThread, parkSignal); parent_callback(mix, 0x400 * 2); @@ -80,7 +81,7 @@ unsigned long SoftwareMixerBackend_Init(void (*callback)(long *stream, size_t fr audioInfo.port = AUDIO_SPEAKER; ioctl(sndfp, AUDIO_SETINFO, &audioInfo); - if(signal(SIGUSR1, threadPark) == SIG_ERR) { + if(signal(parkSignal, threadPark) == SIG_ERR) { Backend_PrintError("Failed to register thread park signal handler for audio system.\n"); return 0; }