FastLED 3.9.15
Loading...
Searching...
No Matches

◆ frequencyToScale255()

fl::u8 fl::AudioReactive::frequencyToScale255 ( fl::u8 binIndex) const

Definition at line 374 of file audio_reactive.cpp.

374 {
375 if (binIndex >= 16) return 0;
376
377 float value = (mCurrentData.frequencyBins[binIndex] < 0.0f) ? 0.0f :
378 ((mCurrentData.frequencyBins[binIndex] > 255.0f) ? 255.0f : mCurrentData.frequencyBins[binIndex]);
379 return static_cast<fl::u8>(value);
380}
unsigned char u8
Definition int.h:17

References mCurrentData.