diff --git a/miniaudio.h b/miniaudio.h index 1f4822c5..70040735 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -16158,8 +16158,10 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority } } - /* I'm not treating a failure of setting the priority as a critical error so not checking the return value here. */ - pthread_attr_setschedparam(&attr, &sched); + /* I'm not treating a failure of setting the priority as a critical error so not aborting on failure here. */ + if (pthread_attr_setschedparam(&attr, &sched) == 0) { + pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); + } } } }