-#endif
-
- void read_from(BufferSet& in, nframes_t nframes);
- void merge_from(BufferSet& in, nframes_t nframes);
-
- // ITERATORS
- // FIXME: possible to combine these? templates?
-
- class audio_iterator {
- public:
- AudioBuffer& operator*() { return _set.get_audio(_index); }
- AudioBuffer* operator->() { return &_set.get_audio(_index); }
- audio_iterator& operator++() { ++_index; return *this; } // yes, prefix only
- bool operator==(const audio_iterator& other) { return (_index == other._index); }
- bool operator!=(const audio_iterator& other) { return (_index != other._index); }
-
- private:
- friend class BufferSet;
-
- audio_iterator(BufferSet& list, size_t index) : _set(list), _index(index) {}
-
- BufferSet& _set;
- size_t _index;
- };
-
- audio_iterator audio_begin() { return audio_iterator(*this, 0); }
- audio_iterator audio_end() { return audio_iterator(*this, _count.n_audio()); }
-
- class midi_iterator {
- public:
- MidiBuffer& operator*() { return _set.get_midi(_index); }
- MidiBuffer* operator->() { return &_set.get_midi(_index); }
- midi_iterator& operator++() { ++_index; return *this; } // yes, prefix only
- bool operator==(const midi_iterator& other) { return (_index == other._index); }
- bool operator!=(const midi_iterator& other) { return (_index != other._index); }
-
- private:
- friend class BufferSet;