MCPcopy Create free account
hub / github.com/LabSound/LabSound / junctionConnectOutput

Method junctionConnectOutput

src/core/AudioSummingJunction.cpp:65–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void 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
86void AudioSummingJunction::junctionDisconnectOutput(std::shared_ptr<AudioNodeOutput> o)
87{

Callers 2

connectMethod · 0.80
connectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected