summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-11-06 22:04:35 -0500
committerDavid Robillard <d@drobilla.net>2016-12-03 15:18:21 -0500
commit08fffeffec10beb708610fd35eb9e7c35365d446 (patch)
treece9c8c77e6a926b4d8be90052c32945b7718bb4b /libs/ardour/ardour
parent875b1367b2c4750ecd861424c57ed4bcc9c642d2 (diff)
Remove Evoral::MIDIEvent
It is slightly questionable whether type specific methods like velocity() belong on Event at all, these may be better off as free functions. However the code currently uses them as methods in many places, and it seems like a step in the right direction, since, for example, we might some day have events that have a velocity but aren't stored as MIDI messages (e.g. if Ardour uses an internal musical model that is more expressive). In any case, the former inheritance and plethora of sloppy casts is definitely not the right thing.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/buffer_set.h4
-rw-r--r--libs/ardour/ardour/midi_buffer.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index f1b632e6e2..a4fa53e2fc 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -31,7 +31,7 @@
#include "ardour/types.h"
#if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT
-#include "evoral/MIDIEvent.hpp"
+#include "evoral/Event.hpp"
struct _VstEvents;
typedef struct _VstEvents VstEvents;
struct _VstMidiEvent;
@@ -196,7 +196,7 @@ private:
~VSTBuffer ();
void clear ();
- void push_back (Evoral::MIDIEvent<framepos_t> const &);
+ void push_back (Evoral::Event<framepos_t> const &);
VstEvents* events () const {
return _events;
}
diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h
index e4a1a3f02c..1b0bf2a151 100644
--- a/libs/ardour/ardour/midi_buffer.h
+++ b/libs/ardour/ardour/midi_buffer.h
@@ -47,7 +47,7 @@ public:
void copy(const MidiBuffer& copy);
void copy(MidiBuffer const * const);
- bool push_back(const Evoral::MIDIEvent<TimeType>& event);
+ bool push_back(const Evoral::Event<TimeType>& event);
bool push_back(TimeType time, size_t size, const uint8_t* data);
uint8_t* reserve(TimeType time, size_t size);
@@ -56,7 +56,7 @@ public:
size_t size() const { return _size; }
bool empty() const { return _size == 0; }
- bool insert_event(const Evoral::MIDIEvent<TimeType>& event);
+ bool insert_event(const Evoral::Event<TimeType>& event);
bool merge_in_place(const MidiBuffer &other);
/** EventSink interface for non-RT use (export, bounce). */
@@ -122,8 +122,8 @@ public:
size_t offset;
};
- typedef iterator_base< MidiBuffer, Evoral::MIDIEvent<TimeType> > iterator;
- typedef iterator_base< const MidiBuffer, const Evoral::MIDIEvent<TimeType> > const_iterator;
+ typedef iterator_base< MidiBuffer, Evoral::Event<TimeType> > iterator;
+ typedef iterator_base< const MidiBuffer, const Evoral::Event<TimeType> > const_iterator;
iterator begin() { return iterator(*this, 0); }
iterator end() { return iterator(*this, _size); }
@@ -176,8 +176,8 @@ public:
static bool second_simultaneous_midi_byte_is_first (uint8_t, uint8_t);
private:
- friend class iterator_base< MidiBuffer, Evoral::MIDIEvent<TimeType> >;
- friend class iterator_base< const MidiBuffer, const Evoral::MIDIEvent<TimeType> >;
+ friend class iterator_base< MidiBuffer, Evoral::Event<TimeType> >;
+ friend class iterator_base< const MidiBuffer, const Evoral::Event<TimeType> >;
uint8_t* _data; ///< timestamp, event, timestamp, event, ...
pframes_t _size;