summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_buffer.cc
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/midi_buffer.cc
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/midi_buffer.cc')
-rw-r--r--libs/ardour/midi_buffer.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc
index afd8481795..f1f6b9b633 100644
--- a/libs/ardour/midi_buffer.cc
+++ b/libs/ardour/midi_buffer.cc
@@ -115,7 +115,7 @@ MidiBuffer::read_from(const Buffer& src, nframes_t nframes, nframes_t offset)
// FIXME: slow
for (size_t i=0; i < msrc.size(); ++i) {
- const Evoral::Event& ev = msrc[i];
+ const Evoral::MIDIEvent& ev = msrc[i];
if (ev.time() >= offset && ev.time() < offset+nframes) {
//cout << "MidiBuffer::read_from got event, " << int(ev.type()) << " time: " << ev.time() << " buffer size: " << _size << endl;
push_back(ev);
@@ -136,7 +136,7 @@ MidiBuffer::read_from(const Buffer& src, nframes_t nframes, nframes_t offset)
* @return false if operation failed (not enough room)
*/
bool
-MidiBuffer::push_back(const Evoral::Event& ev)
+MidiBuffer::push_back(const Evoral::MIDIEvent& ev)
{
if (_size == _capacity)
return false;
@@ -262,8 +262,8 @@ MidiBuffer::merge(const MidiBuffer& a, const MidiBuffer& b)
push_back(b[b_index]);
++b_index;
} else {
- const Evoral::Event& a_ev = a[a_index];
- const Evoral::Event& b_ev = b[b_index];
+ const Evoral::MIDIEvent& a_ev = a[a_index];
+ const Evoral::MIDIEvent& b_ev = b[b_index];
if (a_ev.time() <= b_ev.time()) {
push_back(a_ev);