diff options
author | Nil Geisweiller <ngeiswei@gmail.com> | 2017-06-04 21:34:48 +0300 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-06 14:44:19 +0200 |
commit | a07ca8fa3e2e7b8e837164a3888afe8b186d3813 (patch) | |
tree | 9354879f4fd42cf4b8a120ca6f04cead5346986b | |
parent | 2c41df947488671e78fc3947ed0065103024a09f (diff) |
Fix a-EQ when parameter changes are very slow
If the parameters change too slowly the filter may never get updated. Indeed,
in spite of v_f0, v_g or v_bw being updated, set_params may never be called,
thus v_filter never updated.
-rw-r--r-- | libs/plugins/a-eq.lv2/a-eq.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/libs/plugins/a-eq.lv2/a-eq.c b/libs/plugins/a-eq.lv2/a-eq.c index d286552e03..7a15c8a14f 100644 --- a/libs/plugins/a-eq.lv2/a-eq.c +++ b/libs/plugins/a-eq.lv2/a-eq.c @@ -393,23 +393,17 @@ run(LV2_Handle instance, uint32_t n_samples) if (!is_eq(aeq->v_f0[i], *aeq->f0[i], 0.1)) { aeq->v_f0[i] += tau * (*aeq->f0[i] - aeq->v_f0[i]); changed = true; - } else { - aeq->v_f0[i] = *aeq->f0[i]; } if (*aeq->filtog[i] <= 0 || *aeq->enable <= 0) { if (!is_eq(aeq->v_g[i], 0.f, 0.05)) { aeq->v_g[i] += tau * (0.0 - aeq->v_g[i]); changed = true; - } else { - aeq->v_g[i] = 0.0; } } else { if (!is_eq(aeq->v_g[i], *aeq->g[i], 0.05)) { aeq->v_g[i] += tau * (*aeq->g[i] - aeq->v_g[i]); changed = true; - } else { - aeq->v_g[i] = *aeq->g[i]; } } @@ -417,8 +411,6 @@ run(LV2_Handle instance, uint32_t n_samples) if (!is_eq(aeq->v_bw[i], *aeq->bw[i], 0.001)) { aeq->v_bw[i] += tau * (*aeq->bw[i] - aeq->v_bw[i]); changed = true; - } else { - aeq->v_bw[i] = *aeq->bw[i]; } } |