summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-03-31 19:33:10 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-03-31 19:33:10 +0200
commitd10925da9ca82998342c5282d6d3053d44c51c1f (patch)
treeb43117d816550643a908d74956919369d41068d2 /src
parent7e798c33dc6dc10bb3bb40310c94a621e6f7340d (diff)
Don't accumulate events if audiofile is not loaded.
Diffstat (limited to 'src')
-rw-r--r--src/drumgizmo.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 1fa41a9..71346d4 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -281,7 +281,10 @@ void DrumGizmo::getSamples(int ch, int pos, sample_t *s, size_t sz)
EventSample *evt = (EventSample *)event;
AudioFile *af = evt->file;
//af->load(); // Make sure it is loaded.
- if(!af->isLoaded()) continue;
+ if(!af->isLoaded()) {
+ removeevent = true;
+ break;
+ }
size_t n = 0;
if(evt->offset > (size_t)pos) n = evt->offset - pos;