Fix compilation with VST=1

git-svn-id: svn://localhost/ardour2/trunk@1834 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington
2007-05-11 12:53:43 +00:00
parent da285fc57d
commit 9b411705f2
2 changed files with 19 additions and 4 deletions

View File

@@ -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<Sample*>& 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);

View File

@@ -44,6 +44,7 @@
#include <ardour/session.h>
#include <ardour/audioengine.h>
#include <ardour/vst_plugin.h>
#include <ardour/buffer_set.h>
#include <pbd/stl_delete.h>
@@ -365,19 +366,21 @@ VSTPlugin::automatable () const
}
int
VSTPlugin::connect_and_run (vector<Sample*>& 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)
{
}