[SCM] calf/master: Only use hard-gating when both EG1-to-amp and EG2-to-amp is zero.

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


The following commit has been merged in the master branch:
commit 425ecccacbc3557337016bb1b56974f84d547aa3
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Sat May 8 16:08:11 2010 +0100

    Only use hard-gating when both EG1-to-amp and EG2-to-amp is zero.

diff --git a/src/monosynth.cpp b/src/monosynth.cpp
index 5d92235..a071d23 100644
--- a/src/monosynth.cpp
+++ b/src/monosynth.cpp
@@ -542,7 +542,8 @@ void monosynth_audio_module::calculate_step()
         calculate_buffer_stereo();
         break;
     }
-    if ((envelope1.state == adsr::STOP && envelope2.state == adsr::STOP && !gate) || force_fadeout || (envelope1.state == adsr::RELEASE && *params[par_env1toamp] <= 0.f) || (envelope2.state == adsr::RELEASE && *params[par_env2toamp] <= 0.f))
+    bool no_amp_env = *params[par_env1toamp] <= 0.f && *params[par_env2toamp] <= 0.f;
+    if ((envelope1.state == adsr::STOP && envelope2.state == adsr::STOP && !gate) || force_fadeout || (envelope1.state == adsr::RELEASE && no_amp_env) || (envelope2.state == adsr::RELEASE && no_amp_env))
     {
         enum { ramp = step_size * 4 };
         for (int i = 0; i < step_size; i++)

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list