diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index 1ae67c4063..bf2e6ebb97 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -171,7 +171,8 @@ void AudioMixer::run() { // loop through all other nodes that have sufficient audio to mix for (NodeList::iterator otherNode = nodeList->begin(); otherNode != nodeList->end(); otherNode++) { - if (((PositionalAudioRingBuffer*) otherNode->getLinkedData())->willBeAddedToMix() + if (otherNode->getLinkedData() + && ((PositionalAudioRingBuffer*) otherNode->getLinkedData())->willBeAddedToMix() && (otherNode != node || (otherNode == node && nodeRingBuffer->shouldLoopbackForNode()))) { PositionalAudioRingBuffer* otherNodeBuffer = (PositionalAudioRingBuffer*) otherNode->getLinkedData(); // based on our listen mode we will do this mixing... @@ -339,7 +340,7 @@ void AudioMixer::run() { } memcpy(clientPacket + numBytesPacketHeader, clientSamples, sizeof(clientSamples)); - nodeList->getNodeSocket()->send(node->getPublicSocket(), clientPacket, sizeof(clientPacket)); + nodeList->getNodeSocket()->send(node->getActiveSocket(), clientPacket, sizeof(clientPacket)); } } diff --git a/interface/src/starfield/renderer/Tiling.h b/interface/src/starfield/renderer/Tiling.h index 7edbfd6656..53b17a9844 100755 --- a/interface/src/starfield/renderer/Tiling.h +++ b/interface/src/starfield/renderer/Tiling.h @@ -12,10 +12,10 @@ #include "starfield/Config.h" namespace starfield { - + const float LOG2 = 1.4426950408889634; + class Tiling { public: - Tiling(unsigned tileResolution) : _tileResolution(tileResolution), _rcpSlice(tileResolution / Radians::twicePi()) { _nBits = ceil(log(getTileCount()) * LOG2); } @@ -39,10 +39,7 @@ namespace starfield { unsigned _tileResolution; float _rcpSlice; unsigned _nBits; - - const float LOG2 = 1.4426950408889634; }; - } #endif