From a90f8d58bacb8f93a7e0b5486e2e862e94203721 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 20 Feb 2007 02:55:56 +0000 Subject: Updated Ingen for most recent SLV2 API. Minor (unlikely) SLV2 bug fixes. git-svn-id: http://svn.drobilla.net/lad/ingen@322 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/Plugin.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/libs/engine/Plugin.h') diff --git a/src/libs/engine/Plugin.h b/src/libs/engine/Plugin.h index 7e4921aa..d1a72fac 100644 --- a/src/libs/engine/Plugin.h +++ b/src/libs/engine/Plugin.h @@ -69,6 +69,15 @@ public: #endif } +#ifdef HAVE_SLV2 + ~Plugin() + { + if (_slv2_plugin) + slv2_plugin_free(_slv2_plugin); + } +#endif + + Plugin(const Plugin* const copy) { // Copying only allowed for Internal plugins. Bit of a hack, but // allows the PluginInfo to be defined in the Node class which keeps @@ -126,8 +135,8 @@ public: // FIXME: ew #ifdef HAVE_SLV2 - SLV2Plugin* slv2_plugin() const { return _slv2_plugin; } - void slv2_plugin(const SLV2Plugin* p) { _slv2_plugin = p; } + SLV2Plugin slv2_plugin() const { return _slv2_plugin; } + void slv2_plugin(const SLV2Plugin p) { _slv2_plugin = slv2_plugin_duplicate(p); } #endif @@ -145,7 +154,7 @@ private: PluginLibrary* _library; #ifdef HAVE_SLV2 - SLV2Plugin* _slv2_plugin; + SLV2Plugin _slv2_plugin; #endif }; -- cgit v1.2.1