History

move script-engine library to intel tbb concurrent map

Stephen Birarda committed 12 years ago

Commit 38f2b2a1 parent 51bc5d11 file · +3 −7Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+3−7
@@ -520,21 +520,17 @@ void ScriptEngine::run() { · 519 unmodified lines
520520
521521 // write audio packet to AudioMixer nodes
522522 NodeList* nodeList = NodeList::getInstance();
523− NodeHashSnapshot snapshotHash = nodeList->getNodeHash().snapshot_table();
524−
525− for (auto it = snapshotHash.begin(); it != snapshotHash.end(); it++) {
526− SharedNodePointer node = it->second;
527−
523+ nodeList->eachNode([this, &nodeList, &audioPacket, &numPreSequenceNumberBytes](const SharedNodePointer& node){
528524 // only send to nodes of type AudioMixer
529525 if (node->getType() == NodeType::AudioMixer) {
530526 // pack sequence number
531527 quint16 sequence = _outgoingScriptAudioSequenceNumbers[node->getUUID()]++;
532528 memcpy(audioPacket.data() + numPreSequenceNumberBytes, &sequence, sizeof(quint16));
533−
529+
534530 // send audio packet
535531 nodeList->writeDatagram(audioPacket, node);
536532 }
537− }
533+ });
538534 }
539535 }
540536