FastLED 3.10.6
Loading...
Searching...
No Matches

◆ updateSoundLevel()

void updateSoundLevel ( )
Examples
hydropack.ino.

Definition at line 132 of file hydropack.ino.

132 {
133 if (!gAudio) {
134 return;
135 }
136 const fl::audio::Sample &sample = gAudio->getSample();
137 if (!sample.isValid() || sample.pcm().empty()) {
138 return;
139 }
140 gSoundLevelMeter.processBlock(sample.pcm());
141 gSoundPressureDbSpl = static_cast<float>(gSoundLevelMeter.getSPL());
142}
fl::audio::SoundLevelMeter gSoundLevelMeter
float gSoundPressureDbSpl
fl::shared_ptr< fl::audio::Processor > gAudio
CRGB sample(const CRGB *grid, const XYMap &xyMap, float x, float y, SampleMode mode)
Sample a pixel from a 2D CRGB grid at floating-point coordinates.
Definition sample.cpp.hpp:9

References gAudio, gSoundLevelMeter, and gSoundPressureDbSpl.

Referenced by setup().

+ Here is the caller graph for this function: