From: Carl Hetherington Date: Fri, 11 May 2007 12:53:43 +0000 (+0000) Subject: Fix compilation with VST=1 X-Git-Tag: 3.0-alpha5~4921 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=9b411705f26466b9cda218c84f4aa9e4786a14f0;p=ardour.git Fix compilation with VST=1 git-svn-id: svn://localhost/ardour2/trunk@1834 d708f5d6-7413-0410-9779-e7cbd77b26cf --- diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index f7ec486d36..ffcb999183 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -71,7 +71,7 @@ class VSTPlugin : public ARDOUR::Plugin void activate (); void deactivate (); void set_block_size (nframes_t nframes); - int connect_and_run (vector& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset); + int connect_and_run (BufferSet&, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset); void store_state (ARDOUR::PluginState&); void restore_state (ARDOUR::PluginState&); string describe_parameter (uint32_t); diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 9ec6994e3c..7c161cccf7 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -44,6 +44,7 @@ #include #include #include +#include #include @@ -365,19 +366,21 @@ VSTPlugin::automatable () const } int -VSTPlugin::connect_and_run (vector& bufs, uint32_t maxbuf, int32_t& in_index, int32_t& out_index, nframes_t nframes, nframes_t offset) +VSTPlugin::connect_and_run (BufferSet& bufs, uint32_t& in_index, uint32_t& out_index, nframes_t nframes, nframes_t offset) { float *ins[_plugin->numInputs]; float *outs[_plugin->numOutputs]; int32_t i; + const uint32_t nbufs = bufs.count().n_audio(); + for (i = 0; i < (int32_t) _plugin->numInputs; ++i) { - ins[i] = bufs[min((uint32_t) in_index,maxbuf - 1)] + offset; + ins[i] = bufs.get_audio(min((uint32_t) in_index, nbufs - 1)).data() + offset; in_index++; } for (i = 0; i < (int32_t) _plugin->numOutputs; ++i) { - outs[i] = bufs[min((uint32_t) out_index,maxbuf - 1)] + offset; + outs[i] = bufs.get_audio(min((uint32_t) out_index, nbufs - 1)).data() + offset; /* unbelievably, several VST plugins still rely on Cubase behaviour and do not silence the buffer in processReplacing @@ -498,3 +501,15 @@ VSTPluginInfo::load (Session& session) return PluginPtr ((Plugin*) 0); } } + +void +VSTPlugin::store_state (ARDOUR::PluginState& s) +{ + +} + +void +VSTPlugin::restore_state (ARDOUR::PluginState& s) +{ + +}