diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-03-31 19:33:10 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-03-31 19:33:10 +0200 |
commit | d10925da9ca82998342c5282d6d3053d44c51c1f (patch) | |
tree | b43117d816550643a908d74956919369d41068d2 /src/drumgizmo.cc | |
parent | 7e798c33dc6dc10bb3bb40310c94a621e6f7340d (diff) |
Don't accumulate events if audiofile is not loaded.
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r-- | src/drumgizmo.cc | 5 |
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; |