prepare VST plugins for reporting connected pins
authorRobin Gareus <robin@gareus.org>
Tue, 12 Apr 2016 22:44:18 +0000 (00:44 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 12 Apr 2016 22:52:28 +0000 (00:52 +0200)
The VST needs a way to get the parent PluginInserts's channel-map :(

libs/ardour/ardour/vst_plugin.h
libs/ardour/vst_plugin.cc

index b5c289872cdddc21373089bcb6123b80c0eebf0c..e77ba892e3b03638f5bd50fc47f5374ca97ba75e 100644 (file)
@@ -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;
 };
index 32690f84d21f33226d0487f705f8f6cc4d5807c0..83d7dc2ced1990eecdfb2a7430664666bf9f4c15 100644 (file)
@@ -44,6 +44,8 @@ VSTPlugin::VSTPlugin (AudioEngine& engine, Session& session, VSTHandle* handle)
        , _handle (handle)
        , _state (0)
        , _plugin (0)
+       , _pi (0)
+       , _num (0)
 {
 
 }