mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-23 13:47:24 +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
|
|
@ -30,9 +30,8 @@ namespace Evoral {
|
|||
|
||||
template<typename Time>
|
||||
Note<Time>::Note(uint8_t chan, Time t, Time l, uint8_t n, uint8_t v)
|
||||
// FIXME: types?
|
||||
: _on_event (0xDE, t, 3, NULL, true)
|
||||
, _off_event (0xAD, t + l, 3, NULL, true)
|
||||
: _on_event (MIDI_EVENT, t, 3, NULL, true)
|
||||
, _off_event (MIDI_EVENT, t + l, 3, NULL, true)
|
||||
{
|
||||
assert(chan < 16);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue