1066 {
1067 int bands = binEnd - binStart;
1068 normFactors.
resize(binEnd);
1069 for (int i = 0; i < binEnd; ++i) {
1070 normFactors[i] = 1.0f;
1071 }
1072
1073
1074 const int numRawBins = fftN / 2 + 1;
1075 const u16x16 rawBinHz(fs / static_cast<float>(fftN));
1076 const u16x16 halfBin = rawBinHz >> 1;
1079
1080 int kStart = 0;
1081 if (loEdge > halfBin) {
1082 kStart = static_cast<int>(
1084 }
1085 int kEnd = static_cast<int>(
1087 if (kEnd > numRawBins) kEnd = numRawBins;
1088
1090 for (int k = kStart; k < kEnd; ++k) {
1091 counts[lut[k]] += 1.0f;
1092 }
1093
1094 for (int i = binStart; i < binEnd; ++i) {
1095 normFactors[i] = (counts[i] > 0.0f) ? 1.0f / counts[i] : 1.0f;
1096 }
1097 (void)bands;
1098 }
#define FASTLED_STACK_ARRAY(TYPE, NAME, SIZE)
Stack-allocated array with automatic zero-initialization.
fl::vector< float > mLogBinEdges
constexpr u32 to_int() const FL_NO_EXCEPT
static constexpr FASTLED_FORCE_INLINE u16x16 ceil(u16x16 x) FL_NO_EXCEPT
void resize(fl::size n) FL_NO_EXCEPT