Reading of MIDI CC from MIDI regions (MidiModel). UI still needs work though..
[ardour.git] / libs / ardour / ardour / buffer_set.h
index 03b0b193d47118c3fd7bb645a3374f83d0526123..c75061579889cad47d855409d7e99b2a9920b9f9 100644 (file)
@@ -71,7 +71,7 @@ public:
        Buffer& get(DataType type, size_t i)
        {
                assert(i <= _count.get(type));
-               return *_buffers[type.to_index()][i];
+               return *_buffers[type][i];
        }
 
        AudioBuffer& get_audio(size_t i)
@@ -110,7 +110,7 @@ public:
        };
 
        audio_iterator audio_begin() { return audio_iterator(*this, 0); }
-       audio_iterator audio_end()   { return audio_iterator(*this, _count.get(DataType::AUDIO)); }
+       audio_iterator audio_end()   { return audio_iterator(*this, _count.n_audio()); }
 
        class iterator {
        public:
@@ -120,6 +120,7 @@ public:
                iterator& operator++() { ++_index; return *this; } // yes, prefix only
                bool operator==(const iterator& other) { return (_index == other._index); }
                bool operator!=(const iterator& other) { return (_index != other._index); }
+               iterator operator=(const iterator& other) { _set = other._set; _type = other._type; _index = other._index; return *this; }
 
        private:
                friend class BufferSet;
@@ -139,7 +140,7 @@ public:
 private:
        typedef std::vector<Buffer*> BufferVec;
 
-       /// Vector of vectors, indexed by DataType::to_index()
+       /// Vector of vectors, indexed by DataType
        std::vector<BufferVec> _buffers;
 
        /// Use counts (there may be more actual buffers than this)
@@ -148,7 +149,7 @@ private:
        /// Available counts (number of buffers actually allocated)
        ChanCount _available;
 
-       /// Whether we (don't) 'own' the contained buffers (are a mirror of a PortSet)
+       /// Whether we (don't) 'own' the contained buffers (otherwise we mirror a PortSet)
        bool _is_mirror;
 };