| 63 | } |
| 64 | |
| 65 | void PingPongDelayNode::BuildSubgraph(AudioContext & ac) |
| 66 | { |
| 67 | /// @TODO rewrite with individual splitters |
| 68 | // Input into splitter |
| 69 | ac.connect(splitter, input, 0, 0); |
| 70 | |
| 71 | ac.connect(splitterGain, splitter, 0, 0); |
| 72 | ac.connect(splitterGain, splitter, 1, 0); |
| 73 | |
| 74 | ac.connect(wetGain, splitterGain, 0, 0); |
| 75 | splitterGain->gain()->setValue(0.5f); |
| 76 | |
| 77 | ac.connect(leftDelay, wetGain, 0, 0); |
| 78 | ac.connect(leftDelay, feedbackGain, 0, 0); |
| 79 | |
| 80 | ac.connect(rightDelay, leftDelay, 0, 0); |
| 81 | ac.connect(feedbackGain, rightDelay, 0, 0); |
| 82 | |
| 83 | ac.connect(merger, leftDelay, 0, 0); |
| 84 | ac.connect(merger, rightDelay, 0, 1); |
| 85 | |
| 86 | ac.connect(output, merger, 0, 0); |
| 87 | |
| 88 | // Activate with input->output |
| 89 | ac.connect(output, input, 0, 0); |
| 90 | } |
| 91 | |
| 92 | } // lab |