| 419 | |
| 420 | |
| 421 | void AudioContext::connect(std::shared_ptr<AudioNode> destination, std::shared_ptr<AudioNode> source, int destIdx, int srcIdx) |
| 422 | { |
| 423 | if (!destination) |
| 424 | throw std::runtime_error("Cannot connect to null destination"); |
| 425 | if (!source) |
| 426 | throw std::runtime_error("Cannot connect from null source"); |
| 427 | if (srcIdx > source->numberOfOutputs()) |
| 428 | throw std::out_of_range("Output index greater than available outputs"); |
| 429 | if (destIdx > destination->numberOfInputs()) |
| 430 | throw std::out_of_range("Input index greater than available inputs"); |
| 431 | m_internal->pendingNodeConnections.enqueue({ConnectionOperationKind::Connect, destination, source, destIdx, srcIdx}); |
| 432 | } |
| 433 | |
| 434 | void AudioContext::disconnect(std::shared_ptr<AudioNode> destination, std::shared_ptr<AudioNode> source, int destIdx, int srcIdx) |
| 435 | { |
nothing calls this directly
no test coverage detected