FastLED 3.10.8
Loading...
Searching...
No Matches

◆ add() [9/9]

FL_MAYBE_UNUSED fl::shared_ptr< fl::audio::Processor > CFastLED::add ( fl::UIAudio & uiAudio)
static

Add a UIAudio element and return an auto-pumped Processor.

Convenience overload that extracts the audio input from a UIAudio widget.

Parameters
uiAudioReference to a UIAudio instance
Returns
shared_ptr to Processor

Example:

fl::UIAudio audio_ui("Audio Input");
auto audio = FastLED.add(audio_ui);
audio->onBeat([]{ /* pulse leds */ });
fl::UIAudio audio("Audio Input")
fl::UIAudio audio_ui("Audio Input")
CFastLED FastLED
Global LED strip management instance.

Definition at line 958 of file FastLED.cpp.hpp.

958 {
959 return fl::audio::AudioManager::instance().add(uiAudio);
960}
static AudioManager & instance() FL_NO_EXCEPT
shared_ptr< Processor > add(const Config &config) FL_NO_EXCEPT

References fl::audio::AudioManager::add(), FL_NO_EXCEPT, and fl::audio::AudioManager::instance().

+ Here is the call graph for this function: