diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-07-04 19:05:38 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-07-04 19:05:38 +0200 |
commit | 39118c5f8577451c434531cf38c7505762c69484 (patch) | |
tree | 610822fe37771b14169691d3a9132ef938881056 /src/drumgizmo.cc | |
parent | 2a3a269b12a28f0bfadca30ed800184a98f215b8 (diff) |
Skip events whose audio-files has not yet been loaded.
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r-- | src/drumgizmo.cc | 5 |
1 files 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)) |