mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 12:02:25 +02:00
repairs to audio exchange for new UUID setup
This commit is contained in:
parent
a5c837b197
commit
1c70e09178
3 changed files with 7 additions and 4 deletions
|
@ -364,6 +364,11 @@ void AudioMixer::run() {
|
|||
nodeAddress,
|
||||
nodeAddress);
|
||||
|
||||
// temp activation of public socket before server ping/reply is setup
|
||||
if (!avatarNode->getActiveSocket()) {
|
||||
avatarNode->activatePublicSocket();
|
||||
}
|
||||
|
||||
nodeList->updateNodeWithData(nodeAddress, packetData, receivedBytes);
|
||||
|
||||
if (std::isnan(((PositionalAudioRingBuffer *)avatarNode->getLinkedData())->getOrientation().x)) {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <Node.h>
|
||||
#include <PacketHeaders.h>
|
||||
#include <UUID.h>
|
||||
|
||||
#include "PositionalAudioRingBuffer.h"
|
||||
|
||||
|
@ -27,7 +28,7 @@ PositionalAudioRingBuffer::~PositionalAudioRingBuffer() {
|
|||
|
||||
int PositionalAudioRingBuffer::parseData(unsigned char* sourceBuffer, int numBytes) {
|
||||
unsigned char* currentBuffer = sourceBuffer + numBytesForPacketHeader(sourceBuffer);
|
||||
currentBuffer += sizeof(uint16_t); // the source ID
|
||||
currentBuffer += NUM_BYTES_RFC4122_UUID; // the source ID
|
||||
currentBuffer += parsePositionalData(currentBuffer, numBytes - (currentBuffer - sourceBuffer));
|
||||
currentBuffer += parseAudioSamples(currentBuffer, numBytes - (currentBuffer - sourceBuffer));
|
||||
|
||||
|
|
|
@ -224,9 +224,6 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
|||
|
||||
unsigned char* startPosition = sourceBuffer;
|
||||
|
||||
// push past the node ID
|
||||
sourceBuffer += sizeof(uint16_t);
|
||||
|
||||
// UUID
|
||||
_uuid = QUuid::fromRfc4122(QByteArray((char*) sourceBuffer, NUM_BYTES_RFC4122_UUID));
|
||||
sourceBuffer += NUM_BYTES_RFC4122_UUID;
|
||||
|
|
Loading…
Reference in a new issue