| 450 | } |
| 451 | |
| 452 | bool AudioContext::isConnected(std::shared_ptr<AudioNode> destination, std::shared_ptr<AudioNode> source) |
| 453 | { |
| 454 | if (!destination || !source) |
| 455 | return false; |
| 456 | |
| 457 | AudioNode* n = source.get(); |
| 458 | for (int i = 0; i < destination->numberOfInputs(); ++i) |
| 459 | { |
| 460 | auto c = destination->input(i); |
| 461 | if (c->destinationNode() == n) |
| 462 | return true; |
| 463 | } |
| 464 | |
| 465 | return false; |
| 466 | } |
| 467 | |
| 468 | |
| 469 | void AudioContext::connectParam(std::shared_ptr<AudioParam> param, std::shared_ptr<AudioNode> driver, int index) |