From ce65c30264be9683dd3a59b35730d2f31e02d37f Mon Sep 17 00:00:00 2001
From: John Glover <glover.john@gmail.com>
Date: Thu, 21 Oct 2010 13:39:28 +0100
Subject: Changed from floats to doubles in the C/C++ code, makes Python
 integration a bit easier. Fixed a bug that would cause SndObjSynthesis to
 crash if peak values were floats.

---
 sms/tables.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'sms/tables.c')

diff --git a/sms/tables.c b/sms/tables.c
index 4366695..1802952 100644
--- a/sms/tables.c
+++ b/sms/tables.c
@@ -45,7 +45,7 @@ int sms_prepSine (int nTableSize)
         register int i;
         sfloat fTheta;
   
-        if((sms_tab_sine = (sfloat *)malloc(nTableSize*sizeof(float))) == 0)
+        if((sms_tab_sine = (sfloat *)malloc(nTableSize*sizeof(sfloat))) == 0)
                 return (SMS_MALLOC);
         fSineScale =  (sfloat)(TWO_PI) / (sfloat)(nTableSize - 1);
         fSineIncr = 1.0 / fSineScale;
@@ -110,7 +110,7 @@ int sms_prepSinc (int nTableSize)
         sfloat fTheta = -4.0 * TWO_PI / N;
         sfloat fThetaIncr = (8.0 * TWO_PI / N) / (nTableSize);
 
-        if((sms_tab_sinc = (sfloat *) calloc (nTableSize, sizeof(float))) == 0)
+        if((sms_tab_sinc = (sfloat *) calloc (nTableSize, sizeof(sfloat))) == 0)
                 return (SMS_MALLOC);
         
         for(i = 0; i < nTableSize; i++) 
-- 
cgit v1.2.3