summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2002-09-20 21:51:50 +0000
committerDavid Schleef <ds@schleef.org>2002-09-20 21:51:50 +0000
commite4e2257667d008f58007bab084f2906d85a36bed (patch)
tree9903ad6a4075c8a88498150ff04facb0f7bd4280
parent7fdfef78efc62b3a0cadf3f49e020d52718b012d (diff)
downloadgst-plugins-bad-e4e2257667d008f58007bab084f2906d85a36bed.tar.gz
gst-plugins-bad-e4e2257667d008f58007bab084f2906d85a36bed.tar.bz2
gst-plugins-bad-e4e2257667d008f58007bab084f2906d85a36bed.zip
Redo last change by using glib's CLAMP() macro
Original commit message from CVS: Redo last change by using glib's CLAMP() macro
-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;