| 63 | } |
| 64 | |
| 65 | void AudioSummingJunction::junctionConnectOutput(std::shared_ptr<AudioNodeOutput> o) |
| 66 | { |
| 67 | if (!o) |
| 68 | return; |
| 69 | |
| 70 | std::lock_guard<std::mutex> lock(junctionMutex); |
| 71 | |
| 72 | for (std::vector<std::weak_ptr<AudioNodeOutput>>::iterator i = m_connectedOutputs.begin(); i != m_connectedOutputs.end();) |
| 73 | if (i->expired()) |
| 74 | i = m_connectedOutputs.erase(i); |
| 75 | else |
| 76 | i++; |
| 77 | |
| 78 | for (auto i : m_connectedOutputs) |
| 79 | if (i.lock() == o) |
| 80 | return; |
| 81 | |
| 82 | m_connectedOutputs.push_back(o); |
| 83 | m_renderingStateNeedUpdating = true; |
| 84 | } |
| 85 | |
| 86 | void AudioSummingJunction::junctionDisconnectOutput(std::shared_ptr<AudioNodeOutput> o) |
| 87 | { |