mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:37:46 +02:00
move script-engine library to intel tbb concurrent map
This commit is contained in:
parent
51bc5d10b5
commit
38f2b2ac6a
1 changed files with 3 additions and 7 deletions
|
@ -520,21 +520,17 @@ void ScriptEngine::run() {
|
||||||
|
|
||||||
// write audio packet to AudioMixer nodes
|
// write audio packet to AudioMixer nodes
|
||||||
NodeList* nodeList = NodeList::getInstance();
|
NodeList* nodeList = NodeList::getInstance();
|
||||||
NodeHashSnapshot snapshotHash = nodeList->getNodeHash().snapshot_table();
|
nodeList->eachNode([this, &nodeList, &audioPacket, &numPreSequenceNumberBytes](const SharedNodePointer& node){
|
||||||
|
|
||||||
for (auto it = snapshotHash.begin(); it != snapshotHash.end(); it++) {
|
|
||||||
SharedNodePointer node = it->second;
|
|
||||||
|
|
||||||
// only send to nodes of type AudioMixer
|
// only send to nodes of type AudioMixer
|
||||||
if (node->getType() == NodeType::AudioMixer) {
|
if (node->getType() == NodeType::AudioMixer) {
|
||||||
// pack sequence number
|
// pack sequence number
|
||||||
quint16 sequence = _outgoingScriptAudioSequenceNumbers[node->getUUID()]++;
|
quint16 sequence = _outgoingScriptAudioSequenceNumbers[node->getUUID()]++;
|
||||||
memcpy(audioPacket.data() + numPreSequenceNumberBytes, &sequence, sizeof(quint16));
|
memcpy(audioPacket.data() + numPreSequenceNumberBytes, &sequence, sizeof(quint16));
|
||||||
|
|
||||||
// send audio packet
|
// send audio packet
|
||||||
nodeList->writeDatagram(audioPacket, node);
|
nodeList->writeDatagram(audioPacket, node);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue