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

◆ add() [6/8]

Add a pre-created audio input and return an auto-pumped Processor.

This overload accepts a raw IInput, enabling unit tests and stub platforms to inject custom audio sources (e.g., MP3-decoded samples) without real hardware. Available on all platforms.

Parameters
inputShared pointer to an IInput implementation
Returns
shared_ptr to Processor, or nullptr if input is null

Example (test injection):

auto audio = FastLED.add(fakeInput);
audio->onBeat([]{ /* test callback */ });
fl::UIAudio audio("Audio Input")
CFastLED FastLED
Global LED strip management instance.
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
Definition shared_ptr.h:414

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

754 {
756}
shared_ptr< Processor > add(const Config &config) FL_NOEXCEPT
static AudioManager & instance() FL_NOEXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Definition move.h:28

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

+ Here is the call graph for this function: