summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_buffer.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-22 16:28:02 +0000
committerDavid Robillard <d@drobilla.net>2008-09-22 16:28:02 +0000
commita2d2f738cb63dbf0fb89e0a00c424ce883fb7888 (patch)
tree8ff8b9067a8884566b023de2dabedc2b57b856ab /libs/ardour/ardour/midi_buffer.h
parentff2d51ddd8288ec967efab2cb8192f43c893909e (diff)
Move event specific ringbuffer stuff to evoral.
Sane event type interface between evoral and libardour (no more shared magic numbers). Cleanup Evoral::Sequence iterator, fix bugs, probably introduce new ones. Move MIDI specific event functions to Evoral::MIDIEvent (is-a Evoral::Event). git-svn-id: svn://localhost/ardour2/branches/3.0@3785 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/midi_buffer.h')
-rw-r--r--libs/ardour/ardour/midi_buffer.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h
index 0c13199825..606cbd0ec8 100644
--- a/libs/ardour/ardour/midi_buffer.h
+++ b/libs/ardour/ardour/midi_buffer.h
@@ -39,7 +39,7 @@ public:
void copy(const MidiBuffer& copy);
- bool push_back(const Evoral::Event& event);
+ bool push_back(const Evoral::MIDIEvent& event);
bool push_back(const jack_midi_event_t& event);
uint8_t* reserve(double time, size_t size);
@@ -50,7 +50,7 @@ public:
struct iterator {
iterator(MidiBuffer& b, size_t i) : buffer(b), index(i) {}
- inline Evoral::Event& operator*() const { return buffer[index]; }
+ inline Evoral::MIDIEvent& operator*() const { return buffer[index]; }
inline iterator& operator++() { ++index; return *this; } // prefix
inline bool operator!=(const iterator& other) const { return index != other.index; }
@@ -61,7 +61,7 @@ public:
struct const_iterator {
const_iterator(const MidiBuffer& b, size_t i) : buffer(b), index(i) {}
- inline const Evoral::Event& operator*() const { return buffer[index]; }
+ inline const Evoral::MIDIEvent& operator*() const { return buffer[index]; }
inline const_iterator& operator++() { ++index; return *this; } // prefix
inline bool operator!=(const const_iterator& other) const { return index != other.index; }
@@ -80,8 +80,8 @@ private:
friend class iterator;
friend class const_iterator;
- const Evoral::Event& operator[](size_t i) const { assert(i < _size); return _events[i]; }
- Evoral::Event& operator[](size_t i) { assert(i < _size); return _events[i]; }
+ const Evoral::MIDIEvent& operator[](size_t i) const { assert(i < _size); return _events[i]; }
+ Evoral::MIDIEvent& operator[](size_t i) { assert(i < _size); return _events[i]; }
// FIXME: Eliminate this
static const size_t MAX_EVENT_SIZE = 4; // bytes
@@ -92,8 +92,8 @@ private:
/* FIXME: this is utter crap. rewrite as a flat/packed buffer like MidiRingBuffer */
- Evoral::Event* _events; ///< Event structs that point to offsets in _data
- uint8_t* _data; ///< MIDI, straight up. No time stamps.
+ Evoral::MIDIEvent* _events; ///< Event structs that point to offsets in _data
+ uint8_t* _data; ///< MIDI, straight up. No time stamps.
};