summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pluginlv2.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/pluginlv2.cc b/pluginlv2.cc
index 364a915..7593ff4 100644
--- a/pluginlv2.cc
+++ b/pluginlv2.cc
@@ -252,16 +252,15 @@ _lv2_atom_sequence_append_event(LV2_Atom_Sequence* seq,
void Sequence::addMidiEvent(std::size_t pos, const char* data, std::size_t size)
{
- typedef struct {
+ struct MIDINoteEvent {
LV2_Atom_Event event;
uint8_t msg[6];
- } MIDINoteEvent;
-
+ };
MIDINoteEvent ev;
ev.event.time.frames = pos;
ev.event.body.type = map.map(map.handle, LV2_MIDI__MidiEvent);
- ev.event.body.size = size;//sizeof(LV2_Atom_Event) + size;
+ ev.event.body.size = size;
assert(size <= sizeof(ev.msg)); // Assert that we have room for the message