aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-26 12:53:21 -0400
committerDavid Robillard <d@drobilla.net>2016-07-26 12:53:21 -0400
commita75a1fac59d1ea1e2c042db7cf076a30ee945933 (patch)
tree27bf0e2bee113af93d78f6c3cb9bef003a4bad7e
parent3cd84b539098a94154039d29d72499919785620e (diff)
downloadlv2-a75a1fac59d1ea1e2c042db7cf076a30ee945933.tar.xz
Make spring control decrease all the way to zero
-rw-r--r--plugins/eg-params.lv2/params.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/eg-params.lv2/params.c b/plugins/eg-params.lv2/params.c
index d151615..5ffcff0 100644
--- a/plugins/eg-params.lv2/params.c
+++ b/plugins/eg-params.lv2/params.c
@@ -618,8 +618,8 @@ run(LV2_Handle instance, uint32_t sample_count)
}
}
- if (self->spring > 0.01f) {
- self->spring -= 0.001;
+ if (self->spring > 0.0f) {
+ self->spring = (self->spring >= 0.001) ? self->spring - 0.001 : 0.0;
lv2_atom_forge_frame_time(&self->forge, 0);
LV2_Atom_Forge_Frame frame;
lv2_atom_forge_object(&self->forge, &frame, 0, uris->patch_Set);