Merge pull request #462 from birarda/master

distance attenutation tuning for audio-mixer
This commit is contained in:
birarda 2013-05-29 17:38:43 -07:00
commit cad55ffb60

View file

@ -55,7 +55,7 @@ const float BUFFER_SEND_INTERVAL_USECS = (BUFFER_LENGTH_SAMPLES_PER_CHANNEL / SA
const long MAX_SAMPLE_VALUE = std::numeric_limits<int16_t>::max();
const long MIN_SAMPLE_VALUE = std::numeric_limits<int16_t>::min();
const float DISTANCE_SCALE = 5.0f;
const float DISTANCE_SCALE = 2.5f;
const float PHASE_AMPLITUDE_RATIO_AT_90 = 0.5;
const int PHASE_DELAY_AT_90 = 20;
@ -166,7 +166,7 @@ int main(int argc, const char* argv[]) {
powf(agentPosition.z - otherAgentPosition.z, 2));
float minCoefficient = std::min(1.0f,
powf(0.3,
powf(0.4,
(logf(DISTANCE_SCALE * distanceToAgent) / logf(2.5))
- 1));
distanceCoefficients[lowAgentIndex][highAgentIndex] = minCoefficient;