summaryrefslogtreecommitdiff
path: root/sms
diff options
context:
space:
mode:
authorJohn Glover <glover.john@gmail.com>2010-12-30 20:09:15 +0000
committerJohn Glover <glover.john@gmail.com>2010-12-30 20:09:15 +0000
commit3ec9b99c2773e2da6eb11bfdcfdb2e2e17945efa (patch)
tree2e299acb39f39c5bcbc7579b34fb863734db6acd /sms
parent2358c2a7d087a0920727d9ef54c8be7830ea7160 (diff)
downloadsimpl-3ec9b99c2773e2da6eb11bfdcfdb2e2e17945efa.tar.gz
simpl-3ec9b99c2773e2da6eb11bfdcfdb2e2e17945efa.tar.bz2
simpl-3ec9b99c2773e2da6eb11bfdcfdb2e2e17945efa.zip
Whitespace fix
Diffstat (limited to 'sms')
-rw-r--r--sms/spectrum.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sms/spectrum.c b/sms/spectrum.c
index 356811f..6f5f229 100644
--- a/sms/spectrum.c
+++ b/sms/spectrum.c
@@ -48,7 +48,7 @@ int sms_spectrum(int sizeWindow, sfloat *pWaveform, sfloat *pWindow, int sizeMag
sms_fft(sizeFft, pFftBuffer);
/* convert from rectangular to polar coordinates */
- for (i = 0; i < sizeMag; i++)
+ for(i = 0; i < sizeMag; i++)
{
it2 = i << 1; //even numbers 0-N
fReal = pFftBuffer[it2]; /*odd numbers 1->N+1 */
@@ -126,7 +126,7 @@ int sms_invSpectrum(int sizeWaveform, sfloat *pWaveform, sfloat *pWindow,
/* assume the output array has been taken care off */
/* before, this was multiplied by .5, why? */
- for (i = 0; i < sizeWaveform; i++)
+ for(i = 0; i < sizeWaveform; i++)
//pWaveform[i] += pFftBuffer[i] * pWindow[i];
pWaveform[i] = pFftBuffer[i];
@@ -150,7 +150,7 @@ int sms_invQuickSpectrumW(sfloat *pFMagSpectrum, sfloat *pFPhaseSpectrum,
sfloat fPower;
/* convert from polar coordinates to rectangular */
- for (i = 0; i<sizeMag; i++)
+ for(i = 0; i<sizeMag; i++)
{
it2 = i << 1;
fPower = pFMagSpectrum[i];
@@ -165,7 +165,7 @@ int sms_invQuickSpectrumW(sfloat *pFMagSpectrum, sfloat *pFPhaseSpectrum,
/* \todo is a seperate pFftBuffer necessary here?
it seems like multiplying the window into the waveform
would be fine, without pFftBuffer */
- for (i = 0; i < sizeWave; i++)
+ for(i = 0; i < sizeWave; i++)
pFWaveform[i] += (pFftBuffer[i] * pFWindow[i] * .5);
return sizeMag;
@@ -178,19 +178,19 @@ int sms_invQuickSpectrumW(sfloat *pFMagSpectrum, sfloat *pFPhaseSpectrum,
* \param pMag pointer to sfloat array of magnitude spectrum
* \param pPhase pointer to sfloat array of phase spectrum
*/
-void sms_RectToPolar( int sizeMag, sfloat *pRect, sfloat *pMag, sfloat *pPhase)
+void sms_RectToPolar(int sizeMag, sfloat *pRect, sfloat *pMag, sfloat *pPhase)
{
int i, it2;
sfloat fReal, fImag;
- for (i=0; i<sizeMag; i++)
+ for(i=0; i<sizeMag; i++)
{
it2 = i << 1;
fReal = pRect[it2];
fImag = pRect[it2+1];
pMag[i] = sqrtf(fReal * fReal + fImag * fImag);
- if (pPhase)
+ if(pPhase)
pPhase[i] = atan2f(fImag, fReal);
}
}