MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / next

Method next

Audio/AudioPlayback.cpp:293–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293float *
294AudioBufferList::next(void)
295{
296 QMutexLocker(&this->listMutex);
297
298 if (this->playBuffer != nullptr) {
299 std::cerr << "Invalid next(), please call release() first!" << std::endl;
300 return nullptr;
301 } else if (this->playListTail == nullptr) {
302 // Starving
303 return nullptr;
304 } else {
305 AudioBuffer *buffer = this->playListTail;
306 this->playBuffer = buffer;
307
308 this->playListTail = buffer->prev;
309
310 if (this->playListTail == nullptr)
311 this->playListHead = nullptr;
312 --this->playListLen;
313
314 return buffer->data;
315 }
316}
317
318void
319AudioBufferList::release(void)

Callers 2

playMethod · 0.80
init_tleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected