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

Method findRealSource

hi_scripting/scripting/scriptnode/api/NodeBase.cpp:2074–2099  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2072}
2073
2074scriptnode::NodeBase* ConnectionBase::Helpers::findRealSource(NodeBase* source)
2075{
2076 if (auto cableNode = dynamic_cast<InterpretedCableNode*>(source))
2077 {
2078 source = nullptr;
2079
2080 auto valueParam = cableNode->getParameterFromIndex(0);
2081
2082 jassert(valueParam != nullptr);
2083
2084 if(valueParam != nullptr && valueParam->isModulated())
2085 {
2086 source = nullptr;
2087
2088 for (auto allMod : cableNode->getRootNetwork()->getListOfNodesWithType<ModulationSourceNode>(false))
2089 {
2090 auto am = dynamic_cast<ModulationSourceNode*>(allMod.get());
2091
2092 if (am->isConnectedToSource(valueParam))
2093 return findRealSource(am);
2094 }
2095 }
2096 }
2097
2098 return source;
2099}
2100
2101FrameDataPeakChecker::FrameDataPeakChecker(NodeBase* n, float* d, int s) :
2102 p(*n),

Callers

nothing calls this directly

Calls 5

getParameterFromIndexMethod · 0.80
isModulatedMethod · 0.80
getRootNetworkMethod · 0.80
isConnectedToSourceMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected