| 2126 | { return new State(voiceIndex); } |
| 2127 | |
| 2128 | void ScriptnodeVoiceKiller::initialiseNetworks(ScriptnodeVoiceKiller& v) |
| 2129 | { |
| 2130 | if (!v.initialised) |
| 2131 | { |
| 2132 | auto parentSynth = v.getParentProcessor(true, false); |
| 2133 | auto modParent = v.getParentProcessor(false, false); |
| 2134 | |
| 2135 | if (parentSynth == nullptr) |
| 2136 | return; |
| 2137 | |
| 2138 | auto modParentIsGain = parentSynth->getChildProcessor(ModulatorSynth::GainModulation) == modParent; |
| 2139 | |
| 2140 | if (!modParentIsGain) |
| 2141 | { |
| 2142 | // nothing to do here... |
| 2143 | v.initialised = true; |
| 2144 | return; |
| 2145 | } |
| 2146 | |
| 2147 | if (auto holder = dynamic_cast<DspNetwork::Holder*>(parentSynth)) |
| 2148 | { |
| 2149 | holder->setVoiceKillerToUse(&v); |
| 2150 | v.initialised = true; |
| 2151 | } |
| 2152 | } |
| 2153 | } |
| 2154 | |
| 2155 | float ScriptnodeVoiceKiller::startVoice(int voiceIndex) |
| 2156 | { |
nothing calls this directly
no test coverage detected