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

Method dequeueBlock

src/platforms/arm/teensy/audio_input_teensy.cpp.hpp:66–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66bool TeensyAudioRecorder::dequeueBlock(fl::vector<fl::i16>& samples, u8& channel, u32& timestamp) {
67 if (mBlockQueue.empty()) {
68 return false;
69 }
70
71 const QueuedBlock& block = mBlockQueue.front();
72 channel = block.channel;
73 timestamp = block.timestamp;
74
75 // Copy samples
76 samples.clear();
77 samples.reserve(AUDIO_BLOCK_SAMPLES);
78 for (int i = 0; i < AUDIO_BLOCK_SAMPLES; i++) {
79 samples.push_back(block.samples[i]);
80 }
81
82 mBlockQueue.erase(mBlockQueue.begin());
83 return true;
84}
85
86// Teensy_I2S_Audio implementation
87

Callers 1

readMethod · 0.80

Calls 7

emptyMethod · 0.45
frontMethod · 0.45
clearMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected