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

Method handleAsyncUpdate

hi_scripting/scripting/ScriptProcessorModules.cpp:131–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void JavascriptMidiProcessor::DeferredExecutioner::handleAsyncUpdate()
132{
133 jassert(parent.isDeferred());
134
135 HiseEvent m;
136
137 while (pendingEvents.pop(m))
138 {
139 if (m.isIgnored() || m.isArtificial())
140 continue;
141
142 auto f = [m](JavascriptProcessor* p)
143 {
144 auto jmp = dynamic_cast<JavascriptMidiProcessor*>(p);
145
146 HiseEvent copy(m);
147
148 ScopedValueSetter<HiseEvent*> svs(jmp->currentEvent, &copy);
149 jmp->currentMidiMessage->setHiseEvent(m);
150 jmp->runScriptCallbacks();
151
152 return jmp->lastResult;
153 };
154
155 parent.getMainController()->getJavascriptThreadPool().addJob(JavascriptThreadPool::Task::HiPriorityCallbackExecution, &parent, f);
156 }
157}
158
159ValueTree JavascriptMidiProcessor::exportAsValueTree() const
160{

Callers

nothing calls this directly

Calls 8

isDeferredMethod · 0.80
setHiseEventMethod · 0.80
runScriptCallbacksMethod · 0.80
popMethod · 0.45
isIgnoredMethod · 0.45
isArtificialMethod · 0.45
addJobMethod · 0.45
getMainControllerMethod · 0.45

Tested by

no test coverage detected