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

Function generateDC

tests/fl/audio/test_helpers.h:140–145  ·  view source on GitHub ↗

Generate DC offset as raw PCM vector (in-place version) @param out Output vector to append samples to @param count Number of samples to generate @param dcOffset Constant DC value

Source from the content-addressed store, hash-verified

138/// @param count Number of samples to generate
139/// @param dcOffset Constant DC value
140inline void generateDC(vector<i16> &out, int count, i16 dcOffset) {
141 out.reserve(out.size() + count);
142 for (int i = 0; i < count; ++i) {
143 out.push_back(dcOffset);
144 }
145}
146
147// ============================================================================
148// FFT Test Data Generators

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 3

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected