MCPcopy Create free account
hub / github.com/christophhart/HISE / getCurrentThread

Method getCurrentThread

hi_scripting/scripting/api/ScriptingApi.cpp:7465–7482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7463}
7464
7465int ScriptingApi::Threads::getCurrentThread() const
7466{
7467 auto s = getScriptProcessor()->getMainController_()->getKillStateHandler().getCurrentThread();
7468
7469 MainController::KillStateHandler::getLockTypeForThread(s);
7470
7471 switch(s)
7472 {
7473 case TargetThreadId::MessageThread: return (int)LockId::MessageLock;
7474 case TargetThreadId::SampleLoadingThread: return (int)LockId::SampleLock;
7475 case TargetThreadId::AudioThread: return (int)LockId::AudioLock;
7476 case TargetThreadId::AudioExportThread: return (int)LockId::AudioLock;
7477 case TargetThreadId::ScriptingThread: return (int)LockId::ScriptLock;
7478 case TargetThreadId::UnknownThread: return (int)LockId::numLockTypes;
7479 case TargetThreadId::Free: return (int)LockId::unused;
7480 default: return -1;
7481 }
7482}
7483
7484bool ScriptingApi::Threads::isAudioRunning() const
7485{

Callers 15

ScopedSleeperMethod · 0.45
addJobMethod · 0.45
callRepaintMethod · 0.45
triggerCompilationMethod · 0.45
sendMessageInternalMethod · 0.45
removeModuleMethod · 0.45
clearMethod · 0.45
internalAddNoteOnMethod · 0.45

Calls 1

getMainController_Method · 0.80

Tested by

no test coverage detected