From 9c29e993451c261530458e73904788d35f1b5dbc Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 3 Jul 2016 01:53:29 +0200 Subject: HP/LP: enforce enum integr type (inline control sends continuous value) --- scripts/hplp.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/hplp.lua b/scripts/hplp.lua index 966cc17d23..3a1b7b981d 100644 --- a/scripts/hplp.lua +++ b/scripts/hplp.lua @@ -81,7 +81,7 @@ end -- helper functions for parameter interpolation function param_changed (ctrl) - if ctrl[1] == cur[1] and ctrl[2] == cur[2] and ctrl[3] == cur[3] and ctrl[4] == cur[4] then + if math.floor(ctrl[1]) == math.floor(cur[1]) and math.floor(ctrl[2]) == math.floor(cur[2]) and ctrl[3] == cur[3] and ctrl[4] == cur[4] then return false end return true @@ -140,7 +140,7 @@ function dsp_run (ins, outs, n_samples) siz = 64 end - local o = cur[2] + local o = math.floor(cur[2]) while n_samples > 0 do if changed then apply_params (CtrlPorts:array ()) end @@ -268,7 +268,7 @@ function render_inline (ctx, w, max_h) grid_freq (ctx, w, h, 10000) ctx:unset_dash () - local o = cur[2] + local o = math.floor(cur[2]) -- draw transfer function line ctx:set_source_rgba (.8, .8, .8, 1.0) ctx:move_to (-.5, db_to_y (o * filt:dB_at_freq (freq_at_x (0, w)), h)) -- cgit v1.2.3