From 6f5ee7c4293c43486d48bac00fdcdba90dabb17d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 11 Jul 2010 21:55:11 +0000 Subject: 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 --- libs/ardour/ardour/buffer_set.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'libs/ardour/ardour/buffer_set.h') 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 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 VSTBuffers; + VSTBuffers _vst_buffers; +#endif + /// Use counts (there may be more actual buffers than this) ChanCount _count; -- cgit v1.2.3