MCPcopy Create free account
hub / github.com/FastLED/FastLED / Null_Audio

Class Null_Audio

src/platforms/audio_input_null.hpp:9–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace fl {
8
9class Null_Audio : public audio::IInput {
10public:
11 ~Null_Audio() = default;
12 // Starts the audio source.
13 void start() override {}
14 // Stops the audio source, call this before light sleep.
15 void stop() override {}
16
17 bool error(fl::string* msg = nullptr) FL_NOEXCEPT override {
18 if (msg) {
19 *msg = "No audio device available: this is a null device.";
20 }
21 return true;
22 }
23 // Read audio data and return as audio::Sample with calculated timestamp.
24 // Returns invalid audio::Sample on error or when no data is available.
25 audio::Sample read() FL_NOEXCEPT override {
26 return audio::Sample(); // Always return invalid sample
27 }
28
29};
30
31} // namespace fl

Callers

nothing calls this directly

Calls 1

SampleClass · 0.50

Tested by

no test coverage detected