From e8366dbd830d0188ab78c3f095fd890ef160d7f6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 13 Apr 2016 00:44:18 +0200 Subject: prepare VST plugins for reporting connected pins The VST needs a way to get the parent PluginInserts's channel-map :( --- libs/ardour/ardour/vst_plugin.h | 8 ++++++++ libs/ardour/vst_plugin.cc | 2 ++ 2 files changed, 10 insertions(+) diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index b5c289872c..e77ba892e3 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -31,6 +31,8 @@ typedef struct _VSTState VSTState; namespace ARDOUR { +class PluginInsert; + /** Parent class for VST plugins of both Windows and Linux varieties */ class LIBARDOUR_API VSTPlugin : public Plugin { @@ -81,6 +83,10 @@ public: int first_user_preset_index () const; + void set_insert (PluginInsert* pi, uint32_t num) { _pi = pi; _num = num; } + PluginInsert* plugin_insert () const { return _pi; } + uint32_t plugin_number () const { return _num; } + protected: void set_plugin (AEffect *); gchar* get_chunk (bool) const; @@ -97,6 +103,8 @@ protected: VSTHandle* _handle; VSTState* _state; AEffect* _plugin; + PluginInsert* _pi; + uint32_t _num; MidiBuffer* _midi_out_buf; }; diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 32690f84d2..83d7dc2ced 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -44,6 +44,8 @@ VSTPlugin::VSTPlugin (AudioEngine& engine, Session& session, VSTHandle* handle) , _handle (handle) , _state (0) , _plugin (0) + , _pi (0) + , _num (0) { } -- cgit v1.2.3