summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/ladspa/gstladspa.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index fdb19e11..e310b590 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;