summaryrefslogtreecommitdiff
path: root/sms/cepstrum.c
diff options
context:
space:
mode:
authorJohn Glover <glover.john@gmail.com>2010-10-21 13:39:28 +0100
committerJohn Glover <glover.john@gmail.com>2010-10-21 13:39:28 +0100
commitce65c30264be9683dd3a59b35730d2f31e02d37f (patch)
tree90aaf2e77526af9ba099e76175956d0dd6a37633 /sms/cepstrum.c
parentb46b988f164f983fc889c7bc0c96953e4609d27a (diff)
downloadsimpl-ce65c30264be9683dd3a59b35730d2f31e02d37f.tar.gz
simpl-ce65c30264be9683dd3a59b35730d2f31e02d37f.tar.bz2
simpl-ce65c30264be9683dd3a59b35730d2f31e02d37f.zip
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.
Diffstat (limited to 'sms/cepstrum.c')
-rw-r--r--sms/cepstrum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sms/cepstrum.c b/sms/cepstrum.c
index 430f1c3..26af068 100644
--- a/sms/cepstrum.c
+++ b/sms/cepstrum.c
@@ -102,7 +102,7 @@ void sms_dCepstrum( int sizeCepstrum, sfloat *pCepstrum, int sizeFreq, sfloat *p
{
int i, k;
sfloat factor;
- sfloat fNorm = PI / (float)iMaxFreq; /* value to normalize frequencies to 0:0.5 */
+ sfloat fNorm = PI / (sfloat)iMaxFreq; /* value to normalize frequencies to 0:0.5 */
//static sizeCepstrumStatic
static CepstrumMatrices m;
//printf("nPoints: %d, nCoeff: %d \n", m.nPoints, m.nCoeff);
@@ -176,7 +176,7 @@ void sms_dCepstrumEnvelope(int sizeCepstrum, sfloat *pCepstrum, int sizeEnv, sfl
{
sms_error("bad fft size, incremented to power of 2");
}
- if ((pFftBuffer = (sfloat *) malloc(sizeFftArray * sizeof(float))) == NULL)
+ if ((pFftBuffer = (sfloat *) malloc(sizeFftArray * sizeof(sfloat))) == NULL)
{
sms_error("could not allocate memory for fft array");
return;