VST3: another attempt at sharing has_editor with other instances

This commit is contained in:
Robin Gareus 2023-10-18 23:18:43 +02:00
parent 7227407aa6
commit 9138fb9913
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 3 additions and 3 deletions

View File

@ -471,7 +471,7 @@ private:
/* ****************************************************************************/
class LIBARDOUR_API VST3PluginInfo : public PluginInfo
class LIBARDOUR_API VST3PluginInfo : public PluginInfo, public std::enable_shared_from_this<ARDOUR::VST3PluginInfo>
{
public:
VST3PluginInfo ();
@ -482,7 +482,7 @@ public:
bool is_instrument () const;
PBD::Searchpath preset_search_path () const;
mutable boost::optional<bool> has_editor;
boost::optional<bool> has_editor;
std::shared_ptr<VST3PluginModule> m;
};

View File

@ -1068,7 +1068,7 @@ VST3PluginInfo::load (Session& session)
PluginPtr plugin;
Steinberg::VST3PI* plug = new VST3PI (m, unique_id);
plugin.reset (new VST3Plugin (session.engine (), session, plug));
plugin->set_info (PluginInfoPtr (new VST3PluginInfo (*this)));
plugin->set_info (PluginInfoPtr (shared_from_this ()));
return plugin;
} catch (failed_constructor& err) {
;