| 467 | |
| 468 | |
| 469 | void AudioContext::connectParam(std::shared_ptr<AudioParam> param, std::shared_ptr<AudioNode> driver, int index) |
| 470 | { |
| 471 | if (!param) |
| 472 | throw std::invalid_argument("No parameter specified"); |
| 473 | if (!driver) |
| 474 | throw std::invalid_argument("No driving node supplied"); |
| 475 | if (index >= driver->numberOfOutputs()) |
| 476 | throw std::out_of_range("Output index greater than available outputs on the driver"); |
| 477 | m_internal->pendingParamConnections.enqueue({ConnectionOperationKind::Connect, param, driver, index}); |
| 478 | } |
| 479 | |
| 480 | |
| 481 | // connect a named parameter on a node to receive the indexed output of a node |
no test coverage detected