From a59cef31979f09a07bd11641965a5858df2474b5 Mon Sep 17 00:00:00 2001 From: wangyix Date: Mon, 14 Jul 2014 10:05:37 -0700 Subject: [PATCH] removed debug code in AudioMixer --- assignment-client/src/audio/AudioMixer.cpp | 26 +--------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index 6df23ca32f..c86d37e283 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -366,11 +366,6 @@ void AudioMixer::addBufferToMixForListeningNodeWithBuffer(PositionalAudioRingBuf } void AudioMixer::prepareMixForListeningNode(Node* node) { - - static int k = 0; - k++; - bool debug = (k % 20) == 0; - AvatarAudioRingBuffer* nodeRingBuffer = ((AudioMixerClientData*) node->getLinkedData())->getAvatarAudioRingBuffer(); // zero out the client mix for this node @@ -385,31 +380,12 @@ void AudioMixer::prepareMixForListeningNode(Node* node) { // enumerate the ARBs attached to the otherNode and add all that should be added to mix for (int i = 0; i < otherNodeClientData->getRingBuffers().size(); i++) { PositionalAudioRingBuffer* otherNodeBuffer = otherNodeClientData->getRingBuffers()[i]; - - + if ((*otherNode != *node || otherNodeBuffer->shouldLoopbackForNode()) && otherNodeBuffer->willBeAddedToMix() && otherNodeBuffer->getNextOutputTrailingLoudness() > 0.0f) { addBufferToMixForListeningNodeWithBuffer(otherNodeBuffer, nodeRingBuffer); - } else { - - if (debug) { - printf("\nWILL NOT MIX!!!\n"); - printf("listening node = %s\n", node->getUUID().toString().toLatin1().data()); - printf("other node = %s\n", otherNode->getUUID().toString().toLatin1().data()); - - if (otherNodeBuffer->getType() == PositionalAudioRingBuffer::Microphone) - printf("\t avatar buffer...\n"); - else - { - printf("\t inj buffer %s\n", ((InjectedAudioRingBuffer*)otherNodeBuffer)->getStreamIdentifier().toString().toLatin1().data()); - } - - printf("\t\t other==listening || shouldLoopBack: %d\n", (*otherNode != *node || otherNodeBuffer->shouldLoopbackForNode())); - printf("\t\t other will be added to mix: %d\n", otherNodeBuffer->willBeAddedToMix()); - printf("\t\t other trailing loudess: %f\n", otherNodeBuffer->getNextOutputTrailingLoudness()); - } } } }