FastLED 3.10.8
Loading...
Searching...
No Matches

◆ decimateBy2()

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

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

1156 {
1157 int outLen = len / 2;
1158 for (int i = 0; i < outLen; i++) {
1159 int idx = i * 2;
1160 auto s = [&](int offset) -> i32 {
1161 int j = idx + offset;
1162 if (j < 0) j = 0;
1163 if (j >= len) j = len - 1;
1164 return buf[j];
1165 };
1166 i32 val = -s(-3) + 9*s(-1) + 16*s(0) + 9*s(1) - s(3);
1167 buf[i] = static_cast<kiss_fft_scalar>(val / 32);
1168 }
1169 }
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
#define kiss_fft_scalar
Definition kiss_fft.h:69

References fl::FL_NO_EXCEPT, 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: