summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/buffer_set.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-11 21:55:11 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-11 21:55:11 +0000
commit6f5ee7c4293c43486d48bac00fdcdba90dabb17d (patch)
tree9468080d65f78d36c187403e581ccdd17a07be40 /libs/ardour/ardour/buffer_set.h
parent2578d5da0ef6e7256d25fc737a53bb0294bc19a3 (diff)
Fix up VST build and add basic support for VSTi
git-svn-id: svn://localhost/ardour2/branches/3.0@7403 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/buffer_set.h')
-rw-r--r--libs/ardour/ardour/buffer_set.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index 278496ffbc..711e2350fd 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -29,6 +29,12 @@
#include "ardour/data_type.h"
#include "ardour/types.h"
+#ifdef VST_SUPPORT
+#include "evoral/MIDIEvent.hpp"
+struct VstEvents;
+struct VstMidiEvent;
+#endif
+
namespace ARDOUR {
class Buffer;
@@ -105,6 +111,10 @@ public:
void flush_lv2_midi(bool input, size_t i);
#endif
+#ifdef VST_SUPPORT
+ VstEvents* get_vst_midi (size_t);
+#endif
+
void read_from(const BufferSet& in, nframes_t nframes);
void merge_from(const BufferSet& in, nframes_t nframes);
@@ -159,6 +169,31 @@ private:
LV2Buffers _lv2_buffers;
#endif
+#ifdef VST_SUPPORT
+ class VSTBuffer {
+ public:
+ VSTBuffer (size_t);
+ ~VSTBuffer ();
+
+ void clear ();
+ void push_back (Evoral::MIDIEvent<nframes_t> const &);
+ VstEvents* events () const {
+ return _events;
+ }
+
+ private:
+ /* prevent copy construction */
+ VSTBuffer (VSTBuffer const &);
+
+ VstEvents* _events; /// the parent VSTEvents struct
+ VstMidiEvent* _midi_events; ///< storage area for VSTMidiEvents
+ size_t _capacity;
+ };
+
+ typedef std::vector<VSTBuffer*> VSTBuffers;
+ VSTBuffers _vst_buffers;
+#endif
+
/// Use counts (there may be more actual buffers than this)
ChanCount _count;