aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-20 07:35:42 -0700
committerChris Robinson <[email protected]>2021-04-20 07:35:42 -0700
commit37730927efe488e63114b5c665bd53e9ee5b478c (patch)
tree80363099564e4dc4ab61764a24ff1ddb4cc70236 /alc/alc.cpp
parent22818b3e8399985e3174583cfaba6cb4436d7010 (diff)
Lower RLIMIT_RTTIME to allow RTKit to give RT priority
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 267e5fef..5ec0ab11 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -1130,6 +1130,8 @@ void alc_initconfig(void)
if(auto priopt = ConfigValueInt(nullptr, nullptr, "rt-prio"))
RTPrioLevel = *priopt;
+ if(auto limopt = ConfigValueBool(nullptr, nullptr, "rt-time-limit"))
+ AllowRTTimeLimit = *limopt;
aluInit();
aluInitMixer();
@@ -1317,6 +1319,9 @@ void ProbeCaptureDeviceList()
/* Mixing thread piority level */
int RTPrioLevel{1};
+/* Allow reducing the process's RTTime limit for RTKit. */
+bool AllowRTTimeLimit{true};
+
FILE *gLogFile{stderr};
#ifdef _DEBUG
LogLevel gLogLevel{LogLevel::Warning};