[SCM] calf/master: Fixed clip LED parameter.

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:38:33 UTC 2013


The following commit has been merged in the master branch:
commit 096626084d95ec8fbea65dbd6791b854a7503203
Author: Thor Harald Johansen <thj at thj.no>
Date:   Tue Nov 18 23:02:38 2008 +0100

    Fixed clip LED parameter.

diff --git a/src/calf/modules.h b/src/calf/modules.h
index f554443..c638660 100644
--- a/src/calf/modules.h
+++ b/src/calf/modules.h
@@ -821,7 +821,7 @@ public:
         float makeup = *params[param_makeup];
         float knee = *params[param_knee];
         
-        if(slope > 0.f && (slope > threshold || knee < 1.f)) {
+        if(slope > 0.f && slope > threshold) {
             float gain = 0.f;
             if(IS_FAKE_INFINITY(ratio)) {
                 gain = threshold;
@@ -829,8 +829,8 @@ public:
                 gain = (slope - threshold) / ratio + threshold;
             }
             
-            if(knee < 1.f) {
-                float t = std::min(1.f, std::max(0.f, slope / threshold - knee) / (1.f - knee));
+            if(knee > 1.f) {
+                float t = std::max(0.f, std::min(1.f, slope - threshold));
                 gain = (gain - slope) * t + slope;
             }
             return gain * makeup;
diff --git a/src/modules.cpp b/src/modules.cpp
index 40c3ea3..3b0bf25 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -182,13 +182,13 @@ CALF_PORT_PROPS(compressor) = {
     { 15,     0.01, 2000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "attack", "Attack" },
     { 150,    0.01, 2000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "release", "Release" },
     { 2,      1, 16,   0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "makeup", "Makeup Gain" },
-    { 0.25,      0,  1,   0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "knee", "Knee" },
+    { 1,      1,  16,   0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_DB, NULL, "knee", "Knee" },
     { 0,      0,  1,   0, PF_ENUM | PF_CTL_COMBO, compressor_detection_names, "detection", "Detection" },
     { 0,      0,  1,   0, PF_ENUM | PF_CTL_COMBO, compressor_stereo_link_names, "stereo_link", "Stereo Link" },
     { 0,      0,  1,   0, PF_BOOL | PF_CTL_TOGGLE, NULL, "aweighting", "A-weighting" },
     { 0, 0.03125, 1,    0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_CTLO_REVERSE | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL| PF_PROP_GRAPH, NULL, "compression", "Compression" },
     { 0,      0,  1,    0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_METER | PF_CTLO_LABEL | PF_UNIT_DB | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "peak", "Peak" },
-    { 0,      1,  0,    0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip", "Clip" },
+    { 0,      0,  1,    0, PF_BOOL | PF_CTL_LED | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "clip", "Clip" },
     { 0,      0,  1,    0, PF_BOOL | PF_CTL_TOGGLE, NULL, "bypass", "Bypass" },
 };
 

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list