From 0759c34b7d1c03b0e6cf82ccd8e3e5626255770c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 24 Jul 2025 13:42:51 +0200 Subject: [PATCH] VST3: Allow IRunLoop to query itself For whatever reason renoise_redux.vst3 requires this, and otherwise complains that the host does not implement IRunLoop interface, which the plugin already successfully retrieved to make this query in the first place. --- libs/ardour/vst3_host.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/ardour/vst3_host.cc b/libs/ardour/vst3_host.cc index 65ddacac81..f187a20264 100644 --- a/libs/ardour/vst3_host.cc +++ b/libs/ardour/vst3_host.cc @@ -82,6 +82,8 @@ DEF_CLASS_IID (Presonus::IPlugInViewScaling) #if SMTG_OS_LINUX DEF_CLASS_IID (Linux::IRunLoop); +DEF_CLASS_IID (Linux::ITimerHandler); +DEF_CLASS_IID (Linux::IEventHandler); class AVST3Runloop : public Linux::IRunLoop { @@ -212,7 +214,14 @@ public: uint32 PLUGIN_API addRef () SMTG_OVERRIDE { return 1; } uint32 PLUGIN_API release () SMTG_OVERRIDE { return 1; } - tresult queryInterface (const TUID, void**) SMTG_OVERRIDE { return kNoInterface; } + + tresult queryInterface (const TUID iid, void** obj) SMTG_OVERRIDE { + if (FUnknownPrivate::iidEqual (iid, Linux::IRunLoop::iid)) { + *obj = this; + return kResultOk; + } + return kNoInterface; + } private: Glib::Threads::Mutex _lock;