mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +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
|
||||
NodeList* nodeList = NodeList::getInstance();
|
||||
NodeHashSnapshot snapshotHash = nodeList->getNodeHash().snapshot_table();
|
||||
|
||||
for (auto it = snapshotHash.begin(); it != snapshotHash.end(); it++) {
|
||||
SharedNodePointer node = it->second;
|
||||
|
||||
nodeList->eachNode([this, &nodeList, &audioPacket, &numPreSequenceNumberBytes](const SharedNodePointer& node){
|
||||
// only send to nodes of type AudioMixer
|
||||
if (node->getType() == NodeType::AudioMixer) {
|
||||
// pack sequence number
|
||||
quint16 sequence = _outgoingScriptAudioSequenceNumbers[node->getUUID()]++;
|
||||
memcpy(audioPacket.data() + numPreSequenceNumberBytes, &sequence, sizeof(quint16));
|
||||
|
||||
|
||||
// send audio packet
|
||||
nodeList->writeDatagram(audioPacket, node);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue