From 10bc63c13cf9a6195d6b19f832258ff8e1d84f78 Mon Sep 17 00:00:00 2001 From: John Glover Date: Fri, 25 Jan 2013 14:50:03 +0100 Subject: [tests] Add basic tests for SMS synthesis --- src/sms/synthesis.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/sms/synthesis.c b/src/sms/synthesis.c index 35e91a4..d3caa6c 100644 --- a/src/sms/synthesis.c +++ b/src/sms/synthesis.c @@ -237,7 +237,9 @@ void sms_synthesize(SMS_Data *pSmsData, sfloat *pFSynthesis, SMS_SynthParams *p if(pSynthParams->iSynthesisType == SMS_STYPE_ALL) { if(pSynthParams->iDetSynthType == SMS_DET_IFFT) + { SineSynthIFFT(pSmsData, pSynthParams); + } else /*pSynthParams->iDetSynthType == SMS_DET_SIN*/ { sms_sineSynthFrame(pSmsData, pSynthParams->pSynthBuff, pSynthParams->sizeHop, @@ -248,7 +250,9 @@ void sms_synthesize(SMS_Data *pSmsData, sfloat *pFSynthesis, SMS_SynthParams *p else if(pSynthParams->iSynthesisType == SMS_STYPE_DET) { if(pSynthParams->iDetSynthType == SMS_DET_IFFT) + { SineSynthIFFT(pSmsData, pSynthParams); + } else /*pSynthParams->iDetSynthType == SMS_DET_SIN*/ { sms_sineSynthFrame(pSmsData, pSynthParams->pSynthBuff, pSynthParams->sizeHop, @@ -256,9 +260,13 @@ void sms_synthesize(SMS_Data *pSmsData, sfloat *pFSynthesis, SMS_SynthParams *p } } else /* pSynthParams->iSynthesisType == SMS_STYPE_STOC */ + { StocSynthApprox(pSmsData, pSynthParams); + } /* de-emphasize the sound and normalize*/ for(i = 0; i < sizeHop; i++) + { pFSynthesis[i] = sms_deEmphasis(pSynthParams->pSynthBuff[i], pSynthParams); + } } -- cgit v1.2.3