From 4b7c46e3f26ce07f0587cbb16fd47e531d5c841a Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Tue, 24 Jan 2012 15:13:10 +0000 Subject: - fix bugs in reset and control port handling svn path=/trunk/externals/postlude/; revision=15889 --- pluginhost~/src/handlers_pd.c | 6 +++--- pluginhost~/src/handlers_pd.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pluginhost~/src/handlers_pd.c b/pluginhost~/src/handlers_pd.c index 53e4c40..bf5fd45 100644 --- a/pluginhost~/src/handlers_pd.c +++ b/pluginhost~/src/handlers_pd.c @@ -977,7 +977,7 @@ void handle_pd_dssi(ph *x, t_symbol *s, int argc, t_atom *argv) } void handle_pd_control (ph *x, t_symbol* ctrl_name, t_float ctrl_value, - int instance) + t_float instance) /* Change the value of a named control port of the plug-in */ { unsigned param = 0; @@ -1050,7 +1050,7 @@ void handle_pd_info (ph *x) } } -void handle_pd_reset(ph *x, int i) +void handle_pd_reset(ph *x, t_float i) { unsigned int n; const LADSPA_Descriptor *ladspa; @@ -1058,7 +1058,7 @@ void handle_pd_reset(ph *x, int i) ladspa = x->descriptor->LADSPA_Plugin; for(n = 0; n < x->n_instances; n++) { - if (i == -1 || (int)n == i) { + if ((int)i == -1 || n == (int)i) { if (ladspa->deactivate && ladspa->activate){ ladspa->deactivate(x->instance_handles[n]); ladspa->activate(x->instance_handles[n]); diff --git a/pluginhost~/src/handlers_pd.h b/pluginhost~/src/handlers_pd.h index aa19f25..ec934da 100644 --- a/pluginhost~/src/handlers_pd.h +++ b/pluginhost~/src/handlers_pd.h @@ -34,10 +34,10 @@ void handle_pd_bang(ph *x); void handle_pd_info(ph *x); void handle_pd_listplugins(ph *x); void handle_pd_dsp(ph *x, t_signal **sp); -void handle_pd_reset(ph *x, int i); +void handle_pd_reset(ph *x, t_float i); void handle_pd_list(ph *x, t_symbol *s, int argc, t_atom *argv); void handle_pd_dssi(ph *x, t_symbol *s, int argc, t_atom *argv); void handle_pd_control (ph *x, t_symbol* ctrl_name, t_float ctrl_value, - int instance); + t_float instance); void handle_pd_plug(ph *x, t_symbol *s, int argc, t_atom *argv); void handle_pd_osc(ph *x, t_symbol *s, int argc, t_atom *argv); -- cgit v1.2.1