mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +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,
|
||||||
nodeAddress);
|
nodeAddress);
|
||||||
|
|
||||||
|
// temp activation of public socket before server ping/reply is setup
|
||||||
|
if (!avatarNode->getActiveSocket()) {
|
||||||
|
avatarNode->activatePublicSocket();
|
||||||
|
}
|
||||||
|
|
||||||
nodeList->updateNodeWithData(nodeAddress, packetData, receivedBytes);
|
nodeList->updateNodeWithData(nodeAddress, packetData, receivedBytes);
|
||||||
|
|
||||||
if (std::isnan(((PositionalAudioRingBuffer *)avatarNode->getLinkedData())->getOrientation().x)) {
|
if (std::isnan(((PositionalAudioRingBuffer *)avatarNode->getLinkedData())->getOrientation().x)) {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include <Node.h>
|
#include <Node.h>
|
||||||
#include <PacketHeaders.h>
|
#include <PacketHeaders.h>
|
||||||
|
#include <UUID.h>
|
||||||
|
|
||||||
#include "PositionalAudioRingBuffer.h"
|
#include "PositionalAudioRingBuffer.h"
|
||||||
|
|
||||||
|
@ -27,7 +28,7 @@ PositionalAudioRingBuffer::~PositionalAudioRingBuffer() {
|
||||||
|
|
||||||
int PositionalAudioRingBuffer::parseData(unsigned char* sourceBuffer, int numBytes) {
|
int PositionalAudioRingBuffer::parseData(unsigned char* sourceBuffer, int numBytes) {
|
||||||
unsigned char* currentBuffer = sourceBuffer + numBytesForPacketHeader(sourceBuffer);
|
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 += parsePositionalData(currentBuffer, numBytes - (currentBuffer - sourceBuffer));
|
||||||
currentBuffer += parseAudioSamples(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;
|
unsigned char* startPosition = sourceBuffer;
|
||||||
|
|
||||||
// push past the node ID
|
|
||||||
sourceBuffer += sizeof(uint16_t);
|
|
||||||
|
|
||||||
// UUID
|
// UUID
|
||||||
_uuid = QUuid::fromRfc4122(QByteArray((char*) sourceBuffer, NUM_BYTES_RFC4122_UUID));
|
_uuid = QUuid::fromRfc4122(QByteArray((char*) sourceBuffer, NUM_BYTES_RFC4122_UUID));
|
||||||
sourceBuffer += NUM_BYTES_RFC4122_UUID;
|
sourceBuffer += NUM_BYTES_RFC4122_UUID;
|
||||||
|
|
Loading…
Reference in a new issue