From 39118c5f8577451c434531cf38c7505762c69484 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 4 Jul 2021 19:05:38 +0200 Subject: Skip events whose audio-files has not yet been loaded. --- src/drumgizmo.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index d84799d..a38186f 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -352,8 +352,9 @@ void DrumGizmo::getSamples(int ch, int pos, sample_t* s, size_t sz) if(!af.isLoaded() || !af.isValid() || (s == nullptr)) { - removeevent = true; - break; + // This event cannot be played - schedule for deletion and continue. + to_remove.push_back(sample_event.id); + continue; } if(sample_event.offset > (pos + sz)) -- cgit v1.2.3