summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-07-04 19:05:38 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-07-04 19:05:38 +0200
commit39118c5f8577451c434531cf38c7505762c69484 (patch)
tree610822fe37771b14169691d3a9132ef938881056 /src
parent2a3a269b12a28f0bfadca30ed800184a98f215b8 (diff)
Skip events whose audio-files has not yet been loaded.
Diffstat (limited to 'src')
-rw-r--r--src/drumgizmo.cc5
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))