Emit a warning if the OutputThread fails to get realtime scheduling
This only applies to linux systems. Here, sched_setscheduler() is called to get realtime scheduling. With this patch, the return value of this function is now checked and a warning / error message is generated if it fails.
This commit is contained in:

committed by
Max Kellermann

parent
e7b211f2c0
commit
3392cbbd91
@@ -593,7 +593,12 @@ AudioOutput::Task()
|
||||
{
|
||||
FormatThreadName("output:%s", name);
|
||||
|
||||
SetThreadRealtime();
|
||||
Error error;
|
||||
if(!SetThreadRealtime(error)) {
|
||||
LogError(error);
|
||||
LogWarning(output_domain,
|
||||
"OutputThread could not get realtime scheduling, continuing anyway");
|
||||
}
|
||||
SetThreadTimerSlackUS(100);
|
||||
|
||||
mutex.lock();
|
||||
|
Reference in New Issue
Block a user