repairs to audio exchange for new UUID setup

This commit is contained in:
Stephen Birarda 2013-10-17 11:58:52 -07:00
parent a5c837b197
commit 1c70e09178
3 changed files with 7 additions and 4 deletions

View file

@ -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)) {

View file

@ -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));

View file

@ -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;