From 4c0f83913bc08c5c481d26b04906ae3a682837e3 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Fri, 4 Apr 2014 07:04:02 -0700 Subject: [PATCH] tweaks to bounce --- interface/src/AudioReflector.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/interface/src/AudioReflector.cpp b/interface/src/AudioReflector.cpp index 1562055be7..f61f411abc 100644 --- a/interface/src/AudioReflector.cpp +++ b/interface/src/AudioReflector.cpp @@ -38,12 +38,14 @@ int getDelayFromDistance(float distance) { return MS_DELAY_PER_METER * distance; } -const float BOUNCE_ATTENUATION_FACTOR = 0.125f; +// **option 1**: this is what we're using +const float PER_BOUNCE_ATTENUATION_FACTOR = 0.5f; +// **option 2**: we're not using these +const float BOUNCE_ATTENUATION_FACTOR = 0.125f; // each bounce we adjust our attenuation by this factor, the result is an asymptotically decreasing attenuation... // 0.125, 0.25, 0.5, ... const float PER_BOUNCE_ATTENUATION_ADJUSTMENT = 2.0f; - // we don't grow larger than this, which means by the 4th bounce we don't get that much less quiet const float MAX_BOUNCE_ATTENUATION = 0.99f; @@ -234,9 +236,12 @@ void AudioReflector::echoReflections(const glm::vec3& origin, const QVector