Beispiel #1
0
 public unsafe static void ForwardTransform(Complex *buffer, int length, bool rearrange = true)
 {
     if (length <= 128)
     {
         Fourier.FourierForwardTransformRotator(buffer, length);
     }
     else if (length <= 65536)
     {
         Fourier.FourierForwardTransformLut(buffer, length, Fourier._lut, 16);
     }
     else if (rearrange)
     {
         Fourier.FourierForwardTransformRotator(buffer, length);
     }
     else
     {
         Fourier.FourierForwardTransformSinCos(buffer, length);
     }
     if (rearrange)
     {
         int num = length / 2;
         for (int i = 0; i < num; i++)
         {
             int     num2    = num + i;
             Complex complex = buffer[i];
             buffer[i]    = buffer[num2];
             buffer[num2] = complex;
         }
     }
 }