Set realtime priorities if available

This significantly reduces the latency with no real drawbacks from what
I've noticed. Wineserver is still run using the normal scheduling
policies because from my testing running that with realtime priority
that can actually increase latencies, although doing so will greatly
reduce the variance in processing time.
This commit is contained in:
Robbert van der Helm
2020-07-23 19:55:22 +02:00
parent 9d33b9989e
commit 6f5dae90a6
9 changed files with 83 additions and 4 deletions
+4 -1
View File
@@ -18,10 +18,11 @@
#include <iostream>
// Generated inside of build directory
// Generated inside of the build directory
#include <src/common/config/config.h>
#include <src/common/config/version.h>
#include "../common/utils.h"
#include "bridges/group.h"
#include "bridges/vst2.h"
@@ -39,6 +40,8 @@
* Wine 5.7: https://bugs.winehq.org/show_bug.cgi?id=49138
*/
int __cdecl main(int argc, char* argv[]) {
set_realtime_priority();
// Instead of directly hosting a plugin, this process will receive a UNIX
// domain socket endpoint path that it should listen on to allow yabridge
// instances to spawn plugins in this process.