| 169 | } |
| 170 | |
| 171 | void EnvelopeModulator::LoadState(FileStreamIn& in, int rev) |
| 172 | { |
| 173 | if (rev < 1) |
| 174 | { |
| 175 | // Temporary additional cable source |
| 176 | mTargetCable = new PatchCableSource(this, kConnectionType_Modulator); |
| 177 | mTargetCable->SetModulatorOwner(this); |
| 178 | AddPatchCableSource(mTargetCable); |
| 179 | } |
| 180 | |
| 181 | IDrawableModule::LoadState(in, rev); |
| 182 | |
| 183 | if (rev < 1) |
| 184 | { |
| 185 | const auto target = GetPatchCableSource(1)->GetTarget(); |
| 186 | if (target != nullptr) |
| 187 | GetPatchCableSource()->SetTarget(target); |
| 188 | RemovePatchCableSource(GetPatchCableSource(1)); |
| 189 | mTargetCable = GetPatchCableSource(); |
| 190 | } |
| 191 | |
| 192 | if (ModularSynth::sLoadingFileSaveStateRev < 423) |
| 193 | in >> rev; |
| 194 | LoadStateValidate(rev <= GetModuleSaveStateRev()); |
| 195 | |
| 196 | mAdsr.LoadState(in); |
| 197 | } |
nothing calls this directly
no test coverage detected