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
484 484
485 // write audio packet to AudioMixer nodes485 // write audio packet to AudioMixer nodes
486 NodeList* nodeList = NodeList::getInstance();486 NodeList* nodeList = NodeList::getInstance();
487 foreach(const SharedNodePointer& node, nodeList->getNodeHash()) {487 nodeList->eachNode([this, &nodeList, &audioPacket, &numPreSequenceNumberBytes](const SharedNodePointer& node){
488 // only send to nodes of type AudioMixer488 // only send to nodes of type AudioMixer
489 if (node->getType() == NodeType::AudioMixer) {489 if (node->getType() == NodeType::AudioMixer) {
490 // pack sequence number490 // pack sequence number
491 quint16 sequence = _outgoingScriptAudioSequenceNumbers[node->getUUID()]++;491 quint16 sequence = _outgoingScriptAudioSequenceNumbers[node->getUUID()]++;
492 memcpy(audioPacket.data() + numPreSequenceNumberBytes, &sequence, sizeof(quint16));492 memcpy(audioPacket.data() + numPreSequenceNumberBytes, &sequence, sizeof(quint16));
493 493
494 // send audio packet494 // send audio packet
495 nodeList->writeDatagram(audioPacket, node);495 nodeList->writeDatagram(audioPacket, node);
496 }496 }
497 }497 });
498 }498 }
499 }499 }
500 500