diff options
Diffstat (limited to 'src/sms')
-rw-r--r-- | src/sms/sms.h | 2 | ||||
-rw-r--r-- | src/sms/synthesis.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/sms/sms.h b/src/sms/sms.h index 7372a8a..c72b6c1 100644 --- a/src/sms/sms.h +++ b/src/sms/sms.h @@ -193,7 +193,7 @@ typedef struct * This structure contains all the necessary settings and memory for residual synthesis. * */ -typedef struct +typedef struct SMSResidualParams { int samplingRate; int hopSize; diff --git a/src/sms/synthesis.c b/src/sms/synthesis.c index bc739d0..35e91a4 100644 --- a/src/sms/synthesis.c +++ b/src/sms/synthesis.c @@ -195,7 +195,9 @@ void sms_approxResidual(int sizeResidual, sfloat* residual, /* generate random phases */ for(i = 0; i < residualParams->sizeStocMagSpectrum; i++) + { residualParams->stocPhaseSpectrum[i] = TWO_PI * sms_random(); + } /* IFFT with 50% overlap */ sms_invQuickSpectrumW(residualParams->stocMagSpectrum, @@ -208,7 +210,9 @@ void sms_approxResidual(int sizeResidual, sfloat* residual, /* output */ for(i = 0; i < sizeApprox; i++) + { approx[i] = residualParams->approx[i] * residualParams->windowScale; + } } /*! \brief synthesizes one frame of SMS data |