revert fft scaling

This commit is contained in:
Jörg Thalheim 2015-03-05 14:46:15 +01:00
parent 17890500c7
commit c261fc4d9a

13
fft.c
View File

@ -88,14 +88,19 @@ int fix_fft(fixed fr[], fixed fi[], int m, int inverse)
shift = 0;
for(i=0; i<n; ++i)
{
xtbool sshift;
FFT_scale(fr[i], fi[i], sshift, scale);
if(sshift)
j = fr[i];
if(j < 0) j = -j;
m = fi[i];
if(m < 0) m = -m;
if(j > 16383 || m > 16383)
{
shift = (int) sshift;
shift = 1;
break;
}
}
if(shift) ++scale;
}
else
{