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

◆ rms()

float rms ( Slice< const int16_t > data)

Definition at line 98 of file simple.h.

98 {
99 double sumSq = 0.0;
100 const int N = data.size();
101 for (int i = 0; i < N; ++i) {
102 int32_t x32 = int32_t(data[i]);
103 sumSq += x32 * x32;
104 }
105 float rms = sqrt(float(sumSq) / N);
106 return rms;
107}
float rms(Slice< const int16_t > data)
Definition simple.h:98
fl::size size() const
Definition slice.h:142

References rms(), and fl::Slice< T >::size().

Referenced by drawVUMeter(), loop(), rms(), and fl::AudioReactive::updateVolumeAndPeak().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: