summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Glover <j@johnglover.net>2013-01-25 14:50:03 +0100
committerJohn Glover <j@johnglover.net>2013-01-25 14:50:03 +0100
commit10bc63c13cf9a6195d6b19f832258ff8e1d84f78 (patch)
tree09f101412c47a485a6d2b623183354a9200db44c /src
parent42381e2a704850cca13c74110813fa865727cef8 (diff)
downloadsimpl-10bc63c13cf9a6195d6b19f832258ff8e1d84f78.tar.gz
simpl-10bc63c13cf9a6195d6b19f832258ff8e1d84f78.tar.bz2
simpl-10bc63c13cf9a6195d6b19f832258ff8e1d84f78.zip
[tests] Add basic tests for SMS synthesis
Diffstat (limited to 'src')
-rw-r--r--src/sms/synthesis.c8
1 files changed, 8 insertions, 0 deletions
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);
+ }
}