From 57c39ceb9908e622cc574d34c1a785f9eae09c26 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 26 Apr 2013 11:53:07 -0700 Subject: [PATCH] add some debugging to audio mixer for distance attenuation --- audio-mixer/src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio-mixer/src/main.cpp b/audio-mixer/src/main.cpp index 9cb977dc1c..bc9de27844 100644 --- a/audio-mixer/src/main.cpp +++ b/audio-mixer/src/main.cpp @@ -127,7 +127,7 @@ void *sendBuffer(void *args) for (AgentList::iterator otherAgent = agentList->begin(); otherAgent != agentList->end(); otherAgent++) { - if (otherAgent != agent || ( otherAgent == agent && agentWantsLoopback)) { + if (otherAgent != agent || (otherAgent == agent && agentWantsLoopback)) { AudioRingBuffer* otherAgentBuffer = (AudioRingBuffer*) otherAgent->getLinkedData(); float *agentPosition = agentRingBuffer->getPosition(); @@ -146,6 +146,7 @@ void *sendBuffer(void *args) float minCoefficient = std::min(1.0f, powf(0.5, (logf(DISTANCE_RATIO * distanceToAgent) / logf(3)) - 1)); + printf("The DC between agent %d and %d is %f\n", agent->getAgentId(), otherAgent->getAgentId(), minCoefficient); distanceCoeffs[lowAgentIndex][highAgentIndex] = minCoefficient; }