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

◆ decimateBy2()

static void fl::audio::fft::Context::decimateBy2 ( kiss_fft_scalar * buf,
int len )
inlinestaticprivate

Definition at line 1061 of file fft_impl.cpp.hpp.

1061 {
1062 int outLen = len / 2;
1063 for (int i = 0; i < outLen; i++) {
1064 int idx = i * 2;
1065 auto s = [&](int offset) -> i32 {
1066 int j = idx + offset;
1067 if (j < 0) j = 0;
1068 if (j >= len) j = len - 1;
1069 return buf[j];
1070 };
1071 i32 val = -s(-3) + 9*s(-1) + 16*s(0) + 9*s(1) - s(3);
1072 buf[i] = static_cast<kiss_fft_scalar>(val / 32);
1073 }
1074 }
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
#define kiss_fft_scalar
Definition kiss_fft.h:69

References kiss_fft_scalar, and offset().

Referenced by runHybrid(), and runOctaveWise().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: