diff options
author | Sander Vocke <sandervocke@gmail.com> | 2024-07-28 09:24:01 +0200 |
---|---|---|
committer | Sander Vocke <sandervocke@gmail.com> | 2024-07-28 09:24:01 +0200 |
commit | faaaf5d328429fd2c3f38131f7a874d056761f3f (patch) | |
tree | c49575d96ac820addefcf184ec7ad4f0151bc716 /drumgizmo/input | |
parent | f6660bc51fe8c02ff7c3b6188e8437c67712bddf (diff) |
Openness development
Diffstat (limited to 'drumgizmo/input')
-rw-r--r-- | drumgizmo/input/jackmidi.cc | 9 | ||||
-rw-r--r-- | drumgizmo/input/midifile.cc | 4 | ||||
-rw-r--r-- | drumgizmo/input/test.cc | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/drumgizmo/input/jackmidi.cc b/drumgizmo/input/jackmidi.cc index 7081bf1..2637cc5 100644 --- a/drumgizmo/input/jackmidi.cc +++ b/drumgizmo/input/jackmidi.cc @@ -3,7 +3,7 @@ * jackmidi.cc * * Mo 25. Jan 11:26:06 CET 2016 - * Copyright 2016 Christian Glöckner + * Copyright 2016 Christian Gl�ckner * cgloeckner@freenet.de ****************************************************************************/ @@ -50,7 +50,7 @@ bool JackMidiInputEngine::init(const Instruments& instruments) { if(!loadMidiMap(midimap_file, instruments)) { - std::cerr << "[MidifileInputEngine] Failed to parse midimap '" + std::cerr << "[JackMidiInputEngine] Failed to parse midimap '" << midimap_file << "'\n"; return false; } @@ -114,7 +114,10 @@ void JackMidiInputEngine::process(jack_nframes_t num_frames) // It might not be though in case the system is under heavy load. // Make room for both the new and old events to make sure we don't throw // anything away. - events.reserve(events.size() + num_events); + + // FIXME: NarcoticV: Had to comment out the line below on my system + // (pipewire-jack), otherwise I got race conditions and crashes. + // events.reserve(events.size() + num_events); for(jack_nframes_t i = 0; i < num_events; ++i) { diff --git a/drumgizmo/input/midifile.cc b/drumgizmo/input/midifile.cc index c0b8e73..0eb1add 100644 --- a/drumgizmo/input/midifile.cc +++ b/drumgizmo/input/midifile.cc @@ -3,7 +3,7 @@ * midifile.cc * * Mi 20. Jan 16:07:57 CET 2016 - * Copyright 2016 Christian Glöckner + * Copyright 2016 Christian Gl�ckner * cgloeckner@freenet.de ****************************************************************************/ @@ -166,7 +166,7 @@ void MidifileInputEngine::run(size_t pos, size_t len, std::vector<event_t>& even else { assert(len >= 1); - events.push_back({EventType::Stop, 0, len-1, 0.f}); + events.push_back({EventType::Stop, 0, len-1, InstrumentStateKind::NoneOrAny, 0.f}); } } } diff --git a/drumgizmo/input/test.cc b/drumgizmo/input/test.cc index bc88c48..c23fa18 100644 --- a/drumgizmo/input/test.cc +++ b/drumgizmo/input/test.cc @@ -105,7 +105,7 @@ void TestInputEngine::run(size_t pos, size_t len, std::vector<event_t>& events) event.instrument = rand() % 32; } - event.velocity = (float)rand()/(float)RAND_MAX; + event.velocity_or_state = (float)rand()/(float)RAND_MAX; event.offset = len; } |