History

fix for script agent audio missing channel flag

Stephen Birarda committed 12 years ago

Commit 0af79c41 parent 67910a52 files · +6 −1Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+5−1
@@ -1,3 +1,4 @@
1+
12 //
23 // ScriptEngine.cpp
34 // libraries/script-engine/src
@@ -469,7 +470,10 @@ void ScriptEngine::run() { · 465 unmodified lines
469470
470471 // pack a placeholder value for sequence number for now, will be packed when destination node is known
471472 int numPreSequenceNumberBytes = audioPacket.size();
472− packetStream << (quint16)0;
473+ packetStream << (quint16) 0;
474+
475+ // assume scripted avatar audio is mono and set channel flag to zero
476+ packetStream << (quint8) 0;
473477
474478 // use the orientation and position of this avatar for the source of this audio
475479 packetStream.writeRawData(reinterpret_cast<const char*>(&_avatarData->getPosition()), sizeof(glm::vec3));