MCPcopy Create free account
hub / github.com/FastLED/FastLED / findPeakBin

Function findPeakBin

tests/fl/audio/fft/fft.cpp:702–712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700}
701
702int findPeakBin(fl::span<const float> bins) {
703 int peak = 0;
704 float peakVal = 0.0f;
705 for (int i = 0; i < static_cast<int>(bins.size()); ++i) {
706 if (bins[i] > peakVal) {
707 peakVal = bins[i];
708 peak = i;
709 }
710 }
711 return peak;
712}
713
714bool isNaNCheck(float x) { return !(x == x); }
715

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected