[SCM] calf/master: meter_gain in gain_reduction module with falloff

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


The following commit has been merged in the master branch:
commit 2e094537f19f22032960859571c4c86545ba78da
Author: Markus Schmidt <schmidt at boomshop.net>
Date:   Fri Oct 16 04:43:06 2009 +0200

    meter_gain in gain_reduction module with falloff

diff --git a/src/modules_dsp.cpp b/src/modules_dsp.cpp
index 3f6b720..6f9fc83 100644
--- a/src/modules_dsp.cpp
+++ b/src/modules_dsp.cpp
@@ -1088,8 +1088,9 @@ void gain_reduction_audio_module::deactivate()
 
 void gain_reduction_audio_module::process(float &left, float &right)
 {
-    float compression = 1.f;
     meter_out -= meter_out * 5.f * 1 / srate;
+    meter_comp += (1 - meter_comp) * 5.f * 1 / srate;
+    float gain = 1.f;
     if(bypass < 0.5f) {
         // this routine is mainly copied from thor's compressor module
         // greatest sounding compressor I've heard!
@@ -1111,13 +1112,10 @@ void gain_reduction_audio_module::process(float &left, float &right)
             
         linSlope += (absample - linSlope) * (absample > linSlope ? attack_coeff : release_coeff);
         
-        float gain = 1.f;
-
         if(linSlope > 0.f) {
             gain = output_gain(linSlope, rms);
         }
 
-        compression = gain;
         gain *= makeup;
         
         left *= gain;
@@ -1131,7 +1129,9 @@ void gain_reduction_audio_module::process(float &left, float &right)
     if(maxLR > meter_out) {
         meter_out = maxLR;
     }
-    meter_comp = compression;
+    if(gain < meter_comp) {
+        meter_comp = gain;
+    }
 }
 
 float gain_reduction_audio_module::output_level(float slope) {
@@ -1278,4 +1278,4 @@ int gain_reduction_audio_module::get_changed_offsets(int generation, int &subind
     if (generation == last_generation)
         subindex_graph = 2;
     return last_generation;
-}
\ No newline at end of file
+}

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list