mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 15:13:41 +02:00
Merge branch 'master' of github.com:worklist/hifi into assignment
This commit is contained in:
commit
65e0670eba
2 changed files with 7 additions and 6 deletions
|
@ -59,7 +59,7 @@ void* AudioInjectionManager::injectAudioViaThread(void* args) {
|
|||
// if we don't have an explicit destination socket then pull active socket for current audio mixer from node list
|
||||
if (!_isDestinationSocketExplicit) {
|
||||
Node* audioMixer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_AUDIO_MIXER);
|
||||
if (audioMixer) {
|
||||
if (audioMixer && audioMixer->getActiveSocket()) {
|
||||
_destinationSocket = *audioMixer->getActiveSocket();
|
||||
} else {
|
||||
pthread_exit(0);
|
||||
|
|
|
@ -599,6 +599,7 @@ void NodeList::pingPublicAndLocalSocketsForInactiveNode(Node* node) const {
|
|||
currentTime = usecTimestampNow();
|
||||
memcpy(pingPacket + numHeaderBytes, ¤tTime, sizeof(currentTime));
|
||||
|
||||
qDebug() << "Attemping to ping" << *node << "\n";
|
||||
// send the ping packet to the local and public sockets for this node
|
||||
_nodeSocket.send(node->getLocalSocket(), pingPacket, sizeof(pingPacket));
|
||||
_nodeSocket.send(node->getPublicSocket(), pingPacket, sizeof(pingPacket));
|
||||
|
@ -655,15 +656,15 @@ unsigned NodeList::broadcastToNodes(unsigned char* broadcastData, size_t dataByt
|
|||
unsigned n = 0;
|
||||
for(NodeList::iterator node = begin(); node != end(); node++) {
|
||||
// only send to the NodeTypes we are asked to send to.
|
||||
if (node->getActiveSocket() != NULL) {
|
||||
if (memchr(nodeTypes, node->getType(), numNodeTypes)) {
|
||||
if (memchr(nodeTypes, node->getType(), numNodeTypes)) {
|
||||
if (node->getActiveSocket()) {
|
||||
// we know which socket is good for this node, send there
|
||||
_nodeSocket.send(node->getActiveSocket(), broadcastData, dataBytes);
|
||||
++n;
|
||||
} else {
|
||||
// we don't have an active link to this node, ping it to set that up
|
||||
pingPublicAndLocalSocketsForInactiveNode(&(*node));
|
||||
}
|
||||
} else {
|
||||
// we don't have an active link to this node, ping it to set that up
|
||||
pingPublicAndLocalSocketsForInactiveNode(&(*node));
|
||||
}
|
||||
}
|
||||
return n;
|
||||
|
|
Loading…
Reference in a new issue