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

◆ add() [7/9]

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_NO_EXCEPT
Definition shared_ptr.h:423

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

953 {
955}
static AudioManager & instance() FL_NO_EXCEPT
shared_ptr< Processor > add(const Config &config) FL_NO_EXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Definition move.h:30

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

+ Here is the call graph for this function: