mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
add some debugging to audio mixer for distance attenuation
This commit is contained in:
parent
948f9607f6
commit
57c39ceb99
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue