[SCM] calf/master: + Flanger: fixed underflows + RotarySpeaker: fixed compiler warnings

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


The following commit has been merged in the master branch:
commit ff57297096bfeed390bfcfd6da2401232101a578
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date:   Sat Dec 29 20:11:56 2007 +0000

    + Flanger: fixed underflows
    + RotarySpeaker: fixed compiler warnings
    
    
    
    git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@56 78b06b96-2940-0410-b7fc-879d825d01d8

diff --git a/src/calf/audio_fx.h b/src/calf/audio_fx.h
index dd9741f..134fd12 100644
--- a/src/calf/audio_fx.h
+++ b/src/calf/audio_fx.h
@@ -186,6 +186,7 @@ public:
             int ifv = v >> 16;
             T fd; // signal from delay's output
             this->delay.get_interp(fd, ifv, (v & 0xFFFF)*(1.0/65536.0));
+            sanitize(fd);
             T sdry = in * this->dry;
             T swet = fd * this->wet;
             *buf_out++ = sdry + swet;
diff --git a/src/calf/modules_dev.h b/src/calf/modules_dev.h
index e144e7f..fad89af 100644
--- a/src/calf/modules_dev.h
+++ b/src/calf/modules_dev.h
@@ -140,10 +140,10 @@ public:
     }
     void update_speed()
     {
-        cos_h = 16384*16384*cos(dphase_h * 2 * PI);
-        sin_h = 16384*16384*sin(dphase_h * 2 * PI);
-        cos_l = 16384*16384*cos(dphase_l * 2 * PI);
-        sin_l = 16384*16384*sin(dphase_l * 2 * PI);
+        cos_h = (int)(16384*16384*cos(dphase_h * 2 * PI));
+        sin_h = (int)(16384*16384*sin(dphase_h * 2 * PI));
+        cos_l = (int)(16384*16384*cos(dphase_l * 2 * PI));
+        sin_l = (int)(16384*16384*sin(dphase_l * 2 * PI));
     }
     static inline void update_euler(long long int &x, long long int &y, int dx, int dy)
     {
@@ -156,10 +156,10 @@ public:
     {
         if (vibrato_mode)
         {
-            long long int xl0 = 10000*16384*cos(phase_l * 2 * PI);
-            long long int yl0 = 10000*16384*sin(phase_l * 2 * PI);
-            long long int xh0 = 10000*16384*cos(phase_h * 2 * PI);
-            long long int yh0 = 10000*16384*sin(phase_h * 2 * PI);
+            long long int xl0 = (int)(10000*16384*cos(phase_l * 2 * PI));
+            long long int yl0 = (int)(10000*16384*sin(phase_l * 2 * PI));
+            long long int xh0 = (int)(10000*16384*cos(phase_h * 2 * PI));
+            long long int yh0 = (int)(10000*16384*sin(phase_h * 2 * PI));
             // printf("xl=%d yl=%d dx=%d dy=%d\n", (int)(xl0>>14), (int)(yl0 >> 14), cos_l, sin_l);
             for (unsigned int i = 0; i < nsamples; i++) {
                 float in_l = ins[0][i + offset], in_r = ins[1][i + offset];

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list