mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
fix for script agent audio missing channel flag
This commit is contained in:
parent
67910a5ba2
commit
0af79c4d95
2 changed files with 6 additions and 1 deletions
|
@ -99,6 +99,7 @@ void AudioMixer::addBufferToMixForListeningNodeWithBuffer(PositionalAudioRingBuf
|
|||
bool shouldAttenuate = (bufferToAdd != listeningNodeBuffer);
|
||||
|
||||
if (shouldAttenuate) {
|
||||
|
||||
// if the two buffer pointers do not match then these are different buffers
|
||||
glm::vec3 relativePosition = bufferToAdd->getPosition() - listeningNodeBuffer->getPosition();
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
//
|
||||
// ScriptEngine.cpp
|
||||
// libraries/script-engine/src
|
||||
|
@ -469,7 +470,10 @@ void ScriptEngine::run() {
|
|||
|
||||
// pack a placeholder value for sequence number for now, will be packed when destination node is known
|
||||
int numPreSequenceNumberBytes = audioPacket.size();
|
||||
packetStream << (quint16)0;
|
||||
packetStream << (quint16) 0;
|
||||
|
||||
// assume scripted avatar audio is mono and set channel flag to zero
|
||||
packetStream << (quint8) 0;
|
||||
|
||||
// use the orientation and position of this avatar for the source of this audio
|
||||
packetStream.writeRawData(reinterpret_cast<const char*>(&_avatarData->getPosition()), sizeof(glm::vec3));
|
||||
|
|
Loading…
Reference in a new issue