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

Function createSample

tests/fl/audio/test_helpers.hpp:20–24  ·  view source on GitHub ↗

Create an audio::Sample from a vector of samples

Source from the content-addressed store, hash-verified

18
19/// Create an audio::Sample from a vector of samples
20inline audio::Sample createSample(const vector<i16>& samples, u32 timestamp = 0) {
21 audio::SampleImplPtr impl = fl::make_shared<audio::SampleImpl>();
22 impl->assign(samples.begin(), samples.end(), timestamp);
23 return audio::Sample(impl);
24}
25
26/// Create an audio::Sample from a span of samples
27inline audio::Sample createSample(span<const i16> samples, u32 timestamp = 0) {

Callers 2

FL_TEST_FILEFunction · 0.85
makeSampleFunction · 0.85

Calls 4

SampleClass · 0.50
assignMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected