mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Switch to SCHED_OTHER while handling events
GUI drawing should not be able to interrupt the cores that are handling DSP, but it seems like that was happening for some people with suboptimal kernel configurations. This will require some more extensive testing to see if these changes don't actually increase DSP load.
This commit is contained in:
@@ -45,6 +45,10 @@ TODO: Add an updated screenshot with some fancy VST3-only plugins to the readme
|
||||
difference in responsiveness.
|
||||
- VST2 editor idle events are now handled slightly differently. This should
|
||||
result in even more responsive GUIs for VST2 plugins.
|
||||
- Win32 and X11 events in the Wine plugin host are now handled with lower
|
||||
scheduling priority than other tasks. With a properly configured system GUI
|
||||
drawing should not affect DSP load at all, but this should help with less than
|
||||
optimal setups some people were getting DSP load spikes with the editor open.
|
||||
- Changed part of the build process considering [this Wine
|
||||
bug](https://bugs.winehq.org/show_bug.cgi?id=49138). Building with Wine 5.7
|
||||
and 5.8 required a change, but that change now breaks builds using Wine 6.0
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <function2/function2.hpp>
|
||||
|
||||
#include "../common/utils.h"
|
||||
|
||||
/**
|
||||
* The delay between calls to the event loop so we can keep a nice 60 fps. We
|
||||
* could bump this up to the monitor's refresh rate, but I'm afraid that it will
|
||||
@@ -108,7 +110,18 @@ class MainContext {
|
||||
return;
|
||||
}
|
||||
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user