mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 14:15:46 +01:00
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:
parent
bfbc4566ad
commit
398a318934
20 changed files with 91 additions and 76 deletions
|
|
@ -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 ());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue