From e4e2257667d008f58007bab084f2906d85a36bed Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 20 Sep 2002 21:51:50 +0000 Subject: [PATCH] Redo last change by using glib's CLAMP() macro Original commit message from CVS: Redo last change by using glib's CLAMP() macro --- ext/ladspa/gstladspa.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index fdb19e1113..e310b59037 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -282,10 +282,9 @@ gst_ladspa_class_init (GstLADSPAClass *klass) klass->control_info[i].def = 440.0; } #endif /* LADSPA_IS_HINT_HAS_DEFAULT */ - if(klass->control_info[i].def < klass->control_info[i].lowerbound) - klass->control_info[i].def = klass->control_info[i].lowerbound; - if(klass->control_info[i].def > klass->control_info[i].upperbound) - klass->control_info[i].def = klass->control_info[i].upperbound; + + klass->control_info[i].def = CLAMP(klass->control_info[i].def, + klass->control_info[i].lowerbound, klass->control_info[i].upperbound) if (LADSPA_IS_PORT_INPUT(desc->PortDescriptors[current_portnum])) { argperms = G_PARAM_READWRITE;