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

◆ add() [8/8]

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 759 of file FastLED.cpp.hpp.

759 {
760 return fl::audio::AudioManager::instance().add(uiAudio);
761}
shared_ptr< Processor > add(const Config &config) FL_NOEXCEPT
static AudioManager & instance() FL_NOEXCEPT

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

+ Here is the call graph for this function: