FFT.cpp 500 B

123456789101112131415161718192021222324252627282930
  1. /** (c) Nullsoft, Inc. C O N F I D E N T I A L
  2. ** Filename:
  3. ** Project:
  4. ** Description:
  5. ** Author:
  6. ** Created:
  7. **/
  8. #define _USE_MATH_DEFINES
  9. #include <math.h>
  10. #include "main.h"
  11. #include "fft.h"
  12. #include "../nsutil/fft.h"
  13. static nsutil_fft_t fft9;
  14. void fft_init()
  15. {
  16. if (!fft9)
  17. nsutil_fft_Create_F32R(&fft9, 9, nsutil_fft_fast);
  18. }
  19. void fft_9(float wave[512])
  20. {
  21. fft_init(); // getting crash reports of this not being created. strange
  22. nsutil_fft_Forward_F32R_IP(fft9, wave);
  23. }