diff options
author | John Glover <john@john-glovers-macbook.local> | 2010-12-30 18:45:16 +0000 |
---|---|---|
committer | John Glover <john@john-glovers-macbook.local> | 2010-12-30 18:45:16 +0000 |
commit | 9214a933be3caff80eec7a19d04fd309c3a35388 (patch) | |
tree | 87d98e6af862043f689145b9f257876b040fe4d6 /sms | |
parent | 8f29130d9c2612a7e7867458cae71dbb73b51aeb (diff) | |
download | simpl-9214a933be3caff80eec7a19d04fd309c3a35388.tar.gz simpl-9214a933be3caff80eec7a19d04fd309c3a35388.tar.bz2 simpl-9214a933be3caff80eec7a19d04fd309c3a35388.zip |
Code tidying
Diffstat (limited to 'sms')
-rw-r--r-- | sms/analysis.c | 6 | ||||
-rw-r--r-- | sms/sms.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sms/analysis.c b/sms/analysis.c index efd98f4..ad8420e 100644 --- a/sms/analysis.c +++ b/sms/analysis.c @@ -517,8 +517,7 @@ int sms_analyze(int sizeWaveform, sfloat *pWaveform, SMS_Data *pSmsData, SMS_Ana { pSmsData->pFSinFreq[i] = pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fFreq; pSmsData->pFSinAmp[i] = sms_dBToMag(pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fMag); - if(pAnalParams->iFormat == SMS_FORMAT_HP || - pAnalParams->iFormat == SMS_FORMAT_IHP) + if(pAnalParams->iFormat == SMS_FORMAT_HP || pAnalParams->iFormat == SMS_FORMAT_IHP) { pSmsData->pFSinPha[i] = pAnalParams->ppFrames[iCurrentFrame]->pSpectralPeaks[i].fPhase; } @@ -538,8 +537,7 @@ int sms_analyze(int sizeWaveform, sfloat *pWaveform, SMS_Data *pSmsData, SMS_Ana /* convert mags back to linear */ sms_arrayDBToMag(pSmsData->nTracks, pSmsData->pFSinAmp); - if(pAnalParams->iFormat == SMS_FORMAT_HP || - pAnalParams->iFormat == SMS_FORMAT_IHP) + if(pAnalParams->iFormat == SMS_FORMAT_HP || pAnalParams->iFormat == SMS_FORMAT_IHP) memcpy((char *) pSmsData->pFSinPha, (char *) pAnalParams->ppFrames[0]->deterministic.pFSinPha, length); @@ -912,7 +912,7 @@ sfloat sms_magToDB(sfloat x) return 0.0; else //return(20. * log10(x * inv_mag_thresh)); - return(TWENTY_OVER_LOG10 * log(x * inv_mag_thresh)); + return TWENTY_OVER_LOG10 * log(x * inv_mag_thresh); /*return(TWENTY_OVER_LOG10 * log(x));*/ } @@ -926,7 +926,7 @@ sfloat sms_dBToMag(sfloat x) if(x < 0.00001) return 0.0; else - return(mag_thresh * pow(10., x*0.05)); + return mag_thresh * pow(10., x*0.05); /*return pow(10.0, x*0.05);*/ } |