History

Merge branch 'cuckoo' of https://github.com/birarda/hifi into applications_diet_cpp11

Atlante45 committed 11 years ago

Commit c40e83c2 parents b2dac6f a3cc57832 files · +734 −612Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+3−3
@@ -484,17 +484,17 @@ void ScriptEngine::run() { · 483 unmodified lines
484484
485485 // write audio packet to AudioMixer nodes
486486 NodeList* nodeList = NodeList::getInstance();
487− foreach(const SharedNodePointer& node, nodeList->getNodeHash()) {
487+ nodeList->eachNode([this, &nodeList, &audioPacket, &numPreSequenceNumberBytes](const SharedNodePointer& node){
488488 // only send to nodes of type AudioMixer
489489 if (node->getType() == NodeType::AudioMixer) {
490490 // pack sequence number
491491 quint16 sequence = _outgoingScriptAudioSequenceNumbers[node->getUUID()]++;
492492 memcpy(audioPacket.data() + numPreSequenceNumberBytes, &sequence, sizeof(quint16));
493−
493+
494494 // send audio packet
495495 nodeList->writeDatagram(audioPacket, node);
496496 }
497− }
497+ });
498498 }
499499 }
500500