X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fbuffer_set.h;h=711e2350fddcc4f6d0286f3534f29b2ddfbe73eb;hb=2a6dcddcc513fa3ebc1aad4b2e5fede62277aba5;hp=278496ffbc84d741252434c25308e3c5e75480f6;hpb=2feede2e8ce393b8684638c526006dfb46ef4908;p=ardour.git 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;