From 6639fc737ad1ca81c85ff602a32eca2c4b724afe Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Mon, 14 Apr 2014 16:45:55 -0700 Subject: [PATCH] include diffusion ratio in point attenuation --- interface/src/AudioReflector.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/interface/src/AudioReflector.cpp b/interface/src/AudioReflector.cpp index fdafa3d762..fe1c26950a 100644 --- a/interface/src/AudioReflector.cpp +++ b/interface/src/AudioReflector.cpp @@ -917,7 +917,7 @@ int AudioReflector::analyzePathsSingleStep() { // we used to use... ((reflectiveAttenuation + totalDiffusionAttenuation) * toListenerAttenuation) > MINIMUM_ATTENUATION_TO_REFLECT - if ((reflectiveAttenuation * toListenerAttenuation) > MINIMUM_ATTENUATION_TO_REFLECT + if (((reflectiveAttenuation + totalDiffusionAttenuation) * toListenerAttenuation) > MINIMUM_ATTENUATION_TO_REFLECT && totalDelay < MAXIMUM_DELAY_MS) { // add this location, as the reflective attenuation as well as the total diffusion attenuation @@ -925,7 +925,7 @@ int AudioReflector::analyzePathsSingleStep() { // and attenuation to the listener is recalculated at the point where we actually inject the // audio so that it can be adjusted to ear position AudioPoint point = { end, currentDelay, - reflectiveAttenuation, + (reflectiveAttenuation + totalDiffusionAttenuation), pathDistance}; /* @@ -955,23 +955,9 @@ int AudioReflector::analyzePathsSingleStep() { } } else { path->finalized = true; // if we're too quiet, then we're done - if (wantExtraDebuggging && isDiffusion) { - qDebug() << "diffusion too quiet!"; - } - - if (((reflectiveAttenuation + totalDiffusionAttenuation) * toListenerAttenuation) <= MINIMUM_ATTENUATION_TO_REFLECT) { - qDebug() << "too quiet!"; - } - if (totalDelay >= MAXIMUM_DELAY_MS) { - qDebug() << "too much delay!"; - } } } else { path->finalized = true; // if it doesn't intersect, then it is finished - if (wantExtraDebuggging && isDiffusion) { - qDebug() << "diffusion doesn't intersect!"; - } - qDebug() << "doesn't intersect!"; } } }