FastLED 3.9.15
Loading...
Searching...
No Matches

◆ _generate_hamming()

void _generate_hamming ( kiss_fft_scalar window[],
int N )

Definition at line 40 of file cq_kernel.cpp.hpp.

40 {
41 if (N <= 1) {
42 if (N == 1) window[0] = 1;
43 return;
44 }
45 fft_float_t a0 = 0.54;
46 for(int i = 0; i < N; i++){
47 fft_float_t val = a0-(1-a0)*FFT_COS(2*M_PI*i/(N-1));
48 #ifdef FIXED_POINT // If fixed_point, represent hamming window with integers
49 window[i] = (kiss_fft_scalar)(SAMP_MAX*val);
50 #else // Else if floating point, represent hamming window as-is
51 window[i] = val;
52 #endif
53 }
54}
#define SAMP_MAX
#define M_PI
#define FFT_COS(x)
float fft_float_t
#define kiss_fft_scalar
Definition kiss_fft.h:69

References FFT_COS, FL_NOEXCEPT, kiss_fft_scalar, M_PI, and SAMP_MAX.

Referenced by _generate_kernel().

+ Here is the caller graph for this function: