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

Method pump

examples/AnimartrixRing/audio_reactive.cpp:33–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void AudioReactive::pump(fl::UIAudio &audio, fl::UICheckbox &enableVibe) {
34 if (autoPump)
35 return;
36 fl::audio::Sample sample = audio.next();
37 if (!sample.isValid())
38 return;
39 sampleCount++;
40 if (sampleCount == 1) {
41 printf("AnimartrixRing: First audio sample received! "
42 "enableVibeReactive=%d\n",
43 (int)enableVibe.value());
44 } else if (sampleCount % 172 == 0) {
45 printf("AnimartrixRing: %u audio samples processed, "
46 "enableVibeReactive=%d\n",
47 (unsigned)sampleCount, (int)enableVibe.value());
48 }
49 if (enableVibe.value()) {
50 processor->update(sample);
51 }
52}

Callers

nothing calls this directly

Calls 5

printfFunction · 0.85
nextMethod · 0.45
isValidMethod · 0.45
valueMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected