mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-17 14:10:02 +02:00
Make realtime scheduling less aggressive
On the Wine side. Instead of always having it enabled and disabling it when it could potentially hurt (i.e. when handling GUI related things), we'll now only enable it when it's potentially beneficial. This way we don't have to constantly switch scheduling policies on the GUI thread.
This commit is contained in:
@@ -291,18 +291,7 @@ class MainContext {
|
||||
}
|
||||
|
||||
if (predicate()) {
|
||||
// NOTE: These periodic callbacks should not be able to
|
||||
// interrupt other threads that are actively
|
||||
// processing audio. For me personally having the GUI
|
||||
// open makes absolutely zero difference on DSP usage
|
||||
// (as it should), but for some others it does have an
|
||||
// impact.
|
||||
// TODO: Benchmark this further on a properly configured
|
||||
// system, see if it does not increase average load
|
||||
// because of the rapid scheduling switching.
|
||||
set_realtime_priority(false);
|
||||
handler();
|
||||
set_realtime_priority(true);
|
||||
}
|
||||
|
||||
async_handle_events(handler, predicate);
|
||||
|
||||
Reference in New Issue
Block a user