| 5813 | |
| 5814 | |
| 5815 | ScriptingObjects::ScriptingSynth *ScriptingApi::Synth::getChildSynth(const String &name) |
| 5816 | { |
| 5817 | if(getScriptProcessor()->objectsCanBeCreated()) |
| 5818 | { |
| 5819 | Processor::Iterator<ModulatorSynth> it(owner); |
| 5820 | |
| 5821 | ModulatorSynth *m; |
| 5822 | |
| 5823 | |
| 5824 | while((m = it.getNextProcessor()) != 0) |
| 5825 | { |
| 5826 | if(m->getId() == name) |
| 5827 | { |
| 5828 | return new ScriptingObjects::ScriptingSynth(getScriptProcessor(), m); |
| 5829 | } |
| 5830 | } |
| 5831 | |
| 5832 | reportScriptError(name + " was not found. "); |
| 5833 | RETURN_IF_NO_THROW(new ScriptingObjects::ScriptingSynth(getScriptProcessor(), nullptr)) |
| 5834 | } |
| 5835 | else |
| 5836 | { |
| 5837 | reportIllegalCall("getChildSynth()", "onInit"); |
| 5838 | RETURN_IF_NO_THROW(new ScriptingObjects::ScriptingSynth(getScriptProcessor(), nullptr)) |
| 5839 | |
| 5840 | } |
| 5841 | } |
| 5842 | |
| 5843 | ScriptingApi::Synth::ScriptSynth* ScriptingApi::Synth::getChildSynthByIndex(int index) |
| 5844 | { |
nothing calls this directly
no test coverage detected