diff options
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 81db5c5..5a201af 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -271,9 +271,10 @@ repeat: assert(t >= 0); assert(t < evt.buffer_size - evt.buffer_ptr); - if(evt.rampdownInProgress() && evt.rampdown_count > 0) + if(evt.rampdownInProgress() && evt.rampdown_offset < (evt.t + t) && + evt.rampdown_count > 0) { - scale = std::min((float)evt.rampdown_count/evt.ramp_length, 1.f); + scale = std::min((float)evt.rampdown_count / evt.ramp_length, 1.f); evt.rampdown_count--; } |