MCPcopy Create free account
hub / github.com/csound/csound / QueueMessage

Method QueueMessage

interfaces/csPerfThread.cpp:630–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628// ----------------------------------------------------------------------------
629
630void CsoundPerformanceThread::QueueMessage(CsoundPerformanceThreadMessage *msg)
631{
632 if (status) {
633 delete msg;
634 return;
635 }
636 csoundLockMutex(queueLock);
637 // link message into FIFO
638 if (!lastMessage)
639 firstMessage = msg;
640 else
641 lastMessage->nxt = msg;
642 lastMessage = msg;
643 // mark queue as non-empty
644 csoundWaitThreadLock(flushLock, (size_t) 0);
645 // wake up from pause
646 csoundNotifyThreadLock(pauseLock);
647 csoundUnlockMutex(queueLock);
648}
649
650void CsoundPerformanceThread::Play()
651{

Callers 1

QueueMessageMethod · 0.45

Calls 4

csoundLockMutexFunction · 0.85
csoundWaitThreadLockFunction · 0.85
csoundNotifyThreadLockFunction · 0.85
csoundUnlockMutexFunction · 0.85

Tested by

no test coverage detected