[SCM] calf/master: + Organ: fix off-by-one bug (thanks drobilla and gcc 4.3 ; ) )

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


The following commit has been merged in the master branch:
commit a2bf6051dcf5a30581b3051e12c1f1a3ad6309ee
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date:   Fri May 9 22:17:29 2008 +0000

    + Organ: fix off-by-one bug (thanks drobilla and gcc 4.3 ;) )
    
    
    git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@171 78b06b96-2940-0410-b7fc-879d825d01d8

diff --git a/src/organ.cpp b/src/organ.cpp
index a578c16..13c11a9 100644
--- a/src/organ.cpp
+++ b/src/organ.cpp
@@ -767,7 +767,7 @@ void organ_voice::render_block() {
     if (!any_running)
         released = true;
     // calculate delta from pre and post
-    for (int i = 0; i < ampctl_count; i++)
+    for (int i = 0; i < ampctl_count - 1; i++)
         amp_post[i] = (amp_post[i] - amp_pre[i]) * (1.0 / BlockSize);
     float a0 = amp_pre[0], a1 = amp_pre[1], a2 = amp_pre[2], a3 = amp_pre[3];
     float d0 = amp_post[0], d1 = amp_post[1], d2 = amp_post[2], d3 = amp_post[3];

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list