From 6d65be5e0e33896069db797276dc5f6663ca5b7b Mon Sep 17 00:00:00 2001 From: Louis du Verdier Date: Sun, 26 Oct 2025 16:17:58 +0100 Subject: [PATCH] Do not set POSIX thread scheduler policy on systems reporting that they do not support it --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index 78e58d82..8addfdec 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -17616,7 +17616,7 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority int priorityStep = (priorityMax - priorityMin) / 7; /* 7 = number of priorities supported by miniaudio. */ struct sched_param sched; - if (pthread_attr_getschedparam(&attr, &sched) == 0) { + if (priorityMin != -1 && priorityMax != -1 && pthread_attr_getschedparam(&attr, &sched) == 0) { if (priority == ma_thread_priority_idle) { sched.sched_priority = priorityMin; } else if (priority == ma_thread_priority_realtime) {