From 0edd0c2abcc27116bfa5e7659ef7056905d5689f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 9 Oct 2020 17:32:45 +0200 Subject: [PATCH] Do not bind pure virtual functions, use indirection This fixes Windows/MSVC builds, where linking fails due to binding a pure virtual function. --- libs/ardour/ardour/vst3_plugin.h | 2 ++ libs/ardour/vst3_plugin.cc | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/ardour/ardour/vst3_plugin.h b/libs/ardour/ardour/vst3_plugin.h index 5b31fbfc6c..0110c84781 100644 --- a/libs/ardour/ardour/vst3_plugin.h +++ b/libs/ardour/ardour/vst3_plugin.h @@ -212,6 +212,8 @@ private: void psl_subscribe_to (boost::shared_ptr, FIDString); void psl_stripable_property_changed (PBD::PropertyChange const&); + void foward_signal (Presonus::IContextInfoHandler2*, FIDString) const; + PBD::ScopedConnectionList _strip_connections; PBD::ScopedConnectionList _ac_connection_list; std::set _ac_subscriptions; diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index 7b3c7dcefd..c4476fa659 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -2692,7 +2692,14 @@ VST3PI::psl_subscribe_to (boost::shared_ptr ac, FIDSt return; } - ac->Changed.connect_same_thread (_ac_connection_list, boost::bind (&IContextInfoHandler2::notifyContextInfoChange, nfo2.get(), id)); + ac->Changed.connect_same_thread (_ac_connection_list, boost::bind (&VST3PI::foward_signal, this, nfo2.get(), id)); +} + +void +VST3PI::foward_signal (IContextInfoHandler2* handler, FIDString id) const +{ + assert (handler); + handler->notifyContextInfoChange (id); } void