From e347944e38eab4bf4bb789a11a2b3e6728b05410 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 21 Sep 2021 15:31:24 +0200 Subject: [PATCH] Show desktop notification for the memlock warning Since most people don't try running things in a terminal. --- src/plugin/bridges/common.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/plugin/bridges/common.h b/src/plugin/bridges/common.h index 0152c5c8..aa35f9dd 100644 --- a/src/plugin/bridges/common.h +++ b/src/plugin/bridges/common.h @@ -189,9 +189,21 @@ class PluginBridge { init_msg << " Plugins with many input or output channels may cause" << std::endl; - init_msg << " yabridge to crash until you fix this." + init_msg << " yabridge to crash until you fix this. Check the" + << std::endl; + init_msg << " readme for instructions on how to do this." << std::endl; init_msg << std::endl; + + send_notification( + "Low memory locking limit detected", + "The current memlock limit is set to " + + std::to_string(*memlock_limit) + + " bytes. This means that you have not yet set up " + "realtime privileges for your user, and some plugins " + "may cause your DAW to crash until you fix this. Check " + "the readme for instructions on how to do that.", + false); } } else { init_msg