1069 {
1070 int bands = binEnd - binStart;
1071 normFactors.
resize(binEnd);
1072 for (int i = 0; i < binEnd; ++i) {
1073 normFactors[i] = 1.0f;
1074 }
1075
1076
1077 const int numRawBins = fftN / 2 + 1;
1078 const u16x16 rawBinHz(fs / static_cast<float>(fftN));
1079 const u16x16 halfBin = rawBinHz >> 1;
1082
1083 int kStart = 0;
1084 if (loEdge > halfBin) {
1085 kStart = static_cast<int>(
1087 }
1088 int kEnd = static_cast<int>(
1090 if (kEnd > numRawBins) kEnd = numRawBins;
1091
1093 for (int k = kStart; k < kEnd; ++k) {
1094 counts[lut[k]] += 1.0f;
1095 }
1096
1097 for (int i = binStart; i < binEnd; ++i) {
1098 normFactors[i] = (counts[i] > 0.0f) ? 1.0f / counts[i] : 1.0f;
1099 }
1100 (void)bands;
1101 }
#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