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

◆ getSmoothedRMS()

float fl::audio::detector::Silence::getSmoothedRMS ( )
private

Definition at line 116 of file silence.cpp.hpp.

116 {
117 if (mRMSHistory.empty()) {
118 return 0.0f;
119 }
120
121 float sum = 0.0f;
122 for (fl::size i = 0; i < mRMSHistory.size(); i++) {
123 sum += mRMSHistory[i];
124 }
125 return sum / static_cast<float>(mRMSHistory.size());
126}
vector< float > mRMSHistory
Definition silence.h:55

References mRMSHistory.

Referenced by update().

+ Here is the caller graph for this function: