From 23cd2dd1933b628c4c33298deeac428bd90d1056 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 7 Nov 2020 00:29:56 +0100 Subject: [PATCH] Bump the event loop handling rate up to 60 Hz This will also cause plugins to update their editors at 60 FPS. This was kept at a lower value for performance reasons, but since the message loop now no longer blocks event handling we can safely increase this. This will double the amount of resources spent on drawing, but since audio processing in a real world scenario almost never utilizes all cores anyways this should not be an issue. --- CHANGELOG.md | 5 +++++ src/wine-host/utils.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9817159..908b068a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,11 @@ Versioning](https://semver.org/spec/v2.0.0.html). - As part of the communication rework the way the Wine process handles threading has also been completely reworked. +- GUI updates for plugins that don't use hardware acceleration are now run at 60 + Hz instead of 30 Hz. This was kept at 30 updates per second because that + seemed to be a typical rate for Windows VST hosts and because function calls + could not be processed while the GUI was being updated, but since that + limitation now no longer exists we can safely bump this up. ### Removed diff --git a/src/wine-host/utils.h b/src/wine-host/utils.h index 3b00e95f..5c5a14ed 100644 --- a/src/wine-host/utils.h +++ b/src/wine-host/utils.h @@ -32,11 +32,12 @@ #include /** - * The delay between calls to the event loop at an even more than cinematic 30 - * fps. + * 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 + * start to noticeably take up resources in plugin groups. */ constexpr std::chrono::duration event_loop_interval = - std::chrono::milliseconds(1000) / 30; + std::chrono::milliseconds(1000) / 60; /** * A wrapper around `boost::asio::io_context()` to serve as the application's