X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fbuffer_set.h;h=711e2350fddcc4f6d0286f3534f29b2ddfbe73eb;hb=90172686b92b53cc5ab1d60c0e6daecb65d17d3d;hp=0c4d5671d355adaa3449842fe4b0fa0b129a7456;hpb=477bc772beaf1214e309edd4fb748621c07e2e7b;p=ardour.git diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 0c4d5671d3..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; @@ -167,9 +202,6 @@ private: /// False if we 'own' the contained buffers, if true we mirror a PortSet) bool _is_mirror; - - /// Whether the buffer set should be considered silent - bool _is_silent; };