From a21ab2d9260bd4cb1af1de0b8cd4cad9e9687861 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 8 Oct 2018 20:50:52 +0200 Subject: Move event.h and audiotypes.h into src and get rid of the obsolete include folder. --- drumgizmo/input/jackmidi.cc | 2 +- drumgizmo/input/midifile.cc | 4 ++-- drumgizmo/input/test.cc | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drumgizmo/input') diff --git a/drumgizmo/input/jackmidi.cc b/drumgizmo/input/jackmidi.cc index 8f8d5cb..8459e67 100644 --- a/drumgizmo/input/jackmidi.cc +++ b/drumgizmo/input/jackmidi.cc @@ -133,7 +133,7 @@ void JackMidiInputEngine::process(jack_nframes_t num_frames) int k = mmap.lookup(key); if(k != -1 && velocity) { - events.push_back({TYPE_ONSET, (size_t)k, event.time, velocity / 127.f}); + events.push_back({EventType::OnSet, (size_t)k, event.time, velocity / 127.f}); } } jack_midi_clear_buffer(buffer); diff --git a/drumgizmo/input/midifile.cc b/drumgizmo/input/midifile.cc index c3bd8ae..562ed37 100644 --- a/drumgizmo/input/midifile.cc +++ b/drumgizmo/input/midifile.cc @@ -157,7 +157,7 @@ void MidifileInputEngine::run(size_t pos, size_t len, std::vector& even events.emplace_back(); auto& event = events.back(); - event.type = TYPE_ONSET; + event.type = EventType::OnSet; size_t evpos = current_event->time_seconds * (samplerate / speed); event.offset = evpos - pos; @@ -183,7 +183,7 @@ void MidifileInputEngine::run(size_t pos, size_t len, std::vector& even else { assert(len >= 1); - events.push_back({TYPE_STOP, 0, len-1, 0.f}); + events.push_back({EventType::Stop, 0, len-1, 0.f}); } } } diff --git a/drumgizmo/input/test.cc b/drumgizmo/input/test.cc index 3a5ea47..955d218 100644 --- a/drumgizmo/input/test.cc +++ b/drumgizmo/input/test.cc @@ -86,15 +86,15 @@ void TestInputEngine::run(size_t pos, size_t len, std::vector& events) events.emplace_back(); auto& event = events.back(); - event.type = TYPE_ONSET; + event.type = EventType::OnSet; if((length != -1) && (pos > (size_t)(length * sample_rate))) { - event.type = TYPE_STOP; + event.type = EventType::Stop; } else { - event.type = TYPE_ONSET; + event.type = EventType::OnSet; } if(instrument != -1) -- cgit v1.2.3