0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-27 06:18:57 +00:00
termux-packages/x11-packages/mlt/0003-rtaudio-remove-pthread_attr_setinheritsched.patch
2024-09-23 18:18:22 +02:00

35 lines
1.5 KiB
Diff

diff --git a/src/modules/rtaudio/RtAudio.cpp b/src/modules/rtaudio/RtAudio.cpp
index bd597ef..dc64863 100644
--- a/src/modules/rtaudio/RtAudio.cpp
+++ b/src/modules/rtaudio/RtAudio.cpp
@@ -8636,7 +8636,9 @@ bool RtApiAlsa :: probeDeviceOpen( unsigned int deviceId, StreamMode mode, unsig
pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM);
// This is definitely required. Otherwise it fails.
+#if !defined __ANDROID__ || __ANDROID_API__ >= 28
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
+#endif
pthread_attr_setschedparam(&attr, &param);
}
else
@@ -9602,7 +9604,9 @@ bool RtApiPulse::probeDeviceOpen( unsigned int deviceId, StreamMode mode,
pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM);
// This is definitely required. Otherwise it fails.
+#if !defined __ANDROID__ || __ANDROID_API__ >= 28
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
+#endif
pthread_attr_setschedparam(&attr, &param);
}
else
@@ -10454,7 +10458,9 @@ bool RtApiOss :: probeDeviceOpen( unsigned int deviceId, StreamMode mode, unsign
pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM);
// This is definitely required. Otherwise it fails.
+#if !defined __ANDROID__ || __ANDROID_API__ >= 28
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
+#endif
pthread_attr_setschedparam(&attr, &param);
}
else