mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:25:52 +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++) {
|
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();
|
AudioRingBuffer* otherAgentBuffer = (AudioRingBuffer*) otherAgent->getLinkedData();
|
||||||
|
|
||||||
float *agentPosition = agentRingBuffer->getPosition();
|
float *agentPosition = agentRingBuffer->getPosition();
|
||||||
|
@ -146,6 +146,7 @@ void *sendBuffer(void *args)
|
||||||
|
|
||||||
float minCoefficient = std::min(1.0f,
|
float minCoefficient = std::min(1.0f,
|
||||||
powf(0.5, (logf(DISTANCE_RATIO * distanceToAgent) / logf(3)) - 1));
|
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;
|
distanceCoeffs[lowAgentIndex][highAgentIndex] = minCoefficient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue