| 3637 | } |
| 3638 | |
| 3639 | void ScriptingObjects::ScriptRoutingMatrix::setNumChannels(int numSourceChannels) |
| 3640 | { |
| 3641 | if (!isPositiveAndBelow(numSourceChannels, NUM_MAX_CHANNELS + 1)) |
| 3642 | { |
| 3643 | reportScriptError("illegal channel amount: " + String(numSourceChannels)); |
| 3644 | RETURN_VOID_IF_NO_THROW(); |
| 3645 | } |
| 3646 | |
| 3647 | if (auto r = dynamic_cast<RoutableProcessor*>(rp.get())) |
| 3648 | { |
| 3649 | if (!r->getMatrix().resizingIsAllowed()) |
| 3650 | { |
| 3651 | reportScriptError("Can't resize this matrix"); |
| 3652 | RETURN_VOID_IF_NO_THROW(); |
| 3653 | } |
| 3654 | |
| 3655 | r->getMatrix().setNumSourceChannels(numSourceChannels); |
| 3656 | r->getMatrix().setNumAllowedConnections(numSourceChannels); |
| 3657 | } |
| 3658 | } |
| 3659 | |
| 3660 | bool ScriptingObjects::ScriptRoutingMatrix::addConnection(int sourceIndex, int destinationIndex) |
| 3661 | { |
no test coverage detected