mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Do not set POSIX thread scheduler policy on systems reporting that they do not support it
This commit is contained in:
committed by
David Reid
parent
6a895501cf
commit
6d65be5e0e
+1
-1
@@ -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. */
|
int priorityStep = (priorityMax - priorityMin) / 7; /* 7 = number of priorities supported by miniaudio. */
|
||||||
|
|
||||||
struct sched_param sched;
|
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) {
|
if (priority == ma_thread_priority_idle) {
|
||||||
sched.sched_priority = priorityMin;
|
sched.sched_priority = priorityMin;
|
||||||
} else if (priority == ma_thread_priority_realtime) {
|
} else if (priority == ma_thread_priority_realtime) {
|
||||||
|
|||||||
Reference in New Issue
Block a user