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

Method sendCompileMessage

hi_scripting/scripting/scriptnode/api/DspNetwork.cpp:2960–3031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2958}
2959
2960void DspNetwork::FaustManager::sendCompileMessage(const File& f, NotificationType n)
2961{
2962 WeakReference<FaustManager> safeThis(this);
2963
2964 lastCompiledFile = f;
2965 lastCompileResult = Result::ok();
2966
2967 {
2968 hise::SimpleReadWriteLock::ScopedReadLock sl(listenerLock);
2969
2970 for (auto l : listeners)
2971 {
2972 if (l != nullptr)
2973 l->preCompileFaustCode(lastCompiledFile);
2974 }
2975 }
2976
2977
2978 auto pf = [safeThis, n](Processor* p)
2979 {
2980 if (safeThis == nullptr)
2981 return SafeFunctionCall::Status::nullPointerCall;
2982
2983 auto file = safeThis->lastCompiledFile;
2984
2985 p->getMainController()->getSampleManager().setCurrentPreloadMessage("Compile Faust file " + file.getFileNameWithoutExtension());
2986
2987 {
2988 Array<WeakReference<FaustListener>> thisListeners;
2989 thisListeners.ensureStorageAllocated(safeThis->listeners.size());
2990
2991 {
2992 hise::SimpleReadWriteLock::ScopedReadLock sl(safeThis->listenerLock);
2993
2994 for (auto l : safeThis->listeners)
2995 {
2996 if (l != nullptr)
2997 thisListeners.add(l);
2998 }
2999 }
3000
3001 for (auto l : thisListeners)
3002 {
3003 if (l != nullptr)
3004 {
3005 auto thisOk = l->compileFaustCode(file);
3006
3007 if (!thisOk.wasOk())
3008 {
3009 safeThis->lastCompileResult = thisOk;
3010 break;
3011 }
3012 }
3013 }
3014 }
3015
3016 if (n != dontSendNotification)
3017 {

Callers 3

loadSourceMethod · 0.80
buttonClickedMethod · 0.80
recompileMethod · 0.80

Calls 11

preCompileFaustCodeMethod · 0.80
getMainControllerMethod · 0.45
sizeMethod · 0.45
addMethod · 0.45
compileFaustCodeMethod · 0.45
wasOkMethod · 0.45
killVoicesAndCallMethod · 0.45

Tested by

no test coverage detected