974 {
975 int bands = binEnd - binStart;
976 normFactors.
resize(binEnd);
977 for (int i = 0; i < binEnd; ++i) {
978 normFactors[i] = 1.0f;
979 }
980
981
982 const int numRawBins = fftN / 2 + 1;
983 const u16x16 rawBinHz(fs / static_cast<float>(fftN));
984 const u16x16 halfBin = rawBinHz >> 1;
987
988 int kStart = 0;
989 if (loEdge > halfBin) {
990 kStart = static_cast<int>(
992 }
993 int kEnd = static_cast<int>(
995 if (kEnd > numRawBins) kEnd = numRawBins;
996
998 for (int k = kStart; k < kEnd; ++k) {
999 counts[lut[k]] += 1.0f;
1000 }
1001
1002 for (int i = binStart; i < binEnd; ++i) {
1003 normFactors[i] = (counts[i] > 0.0f) ? 1.0f / counts[i] : 1.0f;
1004 }
1005 (void)bands;
1006 }
#define FASTLED_STACK_ARRAY(TYPE, NAME, SIZE)
Stack-allocated array with automatic zero-initialization.
fl::vector< float > mLogBinEdges
static constexpr FASTLED_FORCE_INLINE u16x16 ceil(u16x16 x) FL_NOEXCEPT
constexpr u32 to_int() const FL_NOEXCEPT
void resize(fl::size n) FL_NOEXCEPT