19 #ifndef __ardour_buffer_set_h__
20 #define __ardour_buffer_set_h__
23 #include "libardour-config.h"
33 #if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT
73 void attach_buffers (
PortSet& ports);
81 void ensure_buffers(
DataType type,
size_t num_buffers,
size_t buffer_capacity);
82 void ensure_buffers(
const ChanCount& chns,
size_t buffer_capacity);
95 size_t buffer_capacity(
DataType type)
const;
121 LV2_Evbuf* get_lv2_midi(
bool input,
size_t i,
bool old_api);
124 void ensure_lv2_bufsize(
bool input,
size_t i,
size_t buffer_capacity);
127 void flush_lv2_midi(
bool input,
size_t i);
130 void forward_lv2_midi(
LV2_Evbuf*,
size_t,
bool purge_ardour_buffer =
true);
133 #if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT
141 template <
typename BS,
typename B>
150 _set = other.
_set; _type = other.
_type; _index = other.
_index;
return *
this;
157 : _set(list), _type(type), _index(index) {}
166 iterator
end(
DataType type) {
return iterator(*
this, type, _count.get(type)); }
169 const_iterator
begin(
DataType type)
const {
return const_iterator(*
this, type, 0); }
170 const_iterator
end(
DataType type)
const {
return const_iterator(*
this, type, _count.get(type)); }
187 typedef std::vector< std::pair<bool, LV2_Evbuf*> > LV2Buffers;
189 LV2Buffers _lv2_buffers;
192 #if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT
206 VSTBuffer (VSTBuffer
const &);
213 typedef std::vector<VSTBuffer*> VSTBuffers;
214 VSTBuffers _vst_buffers;
230 #endif // __ardour_buffer_set_h__
bool operator!=(const iterator_base< BS, B > &other)
const MidiBuffer & get_midi(size_t i) const
MidiBuffer & get_midi(size_t i)
ChanCount _count
Use counts (there may be more actual buffers than this)
bool _is_mirror
False if we 'own' the contained buffers, if true we mirror a PortSet)
void set_count(const ChanCount &count)
std::vector< Buffer * > BufferVec
iterator_base< const BufferSet, const Buffer > const_iterator
iterator_base< BufferSet, MidiBuffer > midi_iterator
AudioBuffer & get_audio(size_t i)
midi_iterator midi_begin()
iterator begin(DataType type)
iterator end(DataType type)
const_iterator end(DataType type) const
audio_iterator audio_begin()
std::vector< BufferVec > _buffers
Vector of vectors, indexed by DataType.
audio_iterator audio_end()
iterator_base< BS, B > & operator++()
iterator_base< BufferSet, AudioBuffer > audio_iterator
const AudioBuffer & get_audio(size_t i) const
const ChanCount & count() const
const ChanCount & available() const
iterator_base< BufferSet, Buffer > iterator
iterator_base< BS, B > operator=(const iterator_base< BS, B > &other)
bool operator==(const iterator_base< BS, B > &other)
const_iterator begin(DataType type) const
ChanCount _available
Available counts (number of buffers actually allocated)
iterator_base(BS &list, DataType type, size_t index)