Fix event type and parameter type confusion

I'm not sure if this is really the best way to do event types (should it
just be a completely static enum in evoral, or completely dynamic and
provided by the type map, or a mix like currently?), but previously the
event type was frequently set to either total garbage, or parameter
types, which are a different thing.

This fixes all those cases, and makes Evoral::EventType an enum so the
compiler will warn about implicit conversions from int.
This commit is contained in:
David Robillard 2016-11-07 05:14:55 -05:00
parent bfbc4566ad
commit 398a318934
20 changed files with 91 additions and 76 deletions

View file

@ -59,7 +59,7 @@ SMFTest::takeFiveTest ()
if (ret > 0) { // didn't skip (meta) event
//cerr << "read smf event type " << hex << int(buf[0]) << endl;
ev.set_time(Evoral::Beats::ticks_at_rate(time, smf.ppqn()));
ev.set_event_type(type_map->midi_event_type(buf[0]));
ev.set_event_type(Evoral::MIDI_EVENT);
seq->append(ev, next_event_id ());
}
}