mirror of
https://github.com/overte-org/overte.git
synced 2025-06-18 12:00:38 +02:00
include diffusion ratio in point attenuation
This commit is contained in:
parent
588231cebf
commit
6639fc737a
1 changed files with 2 additions and 16 deletions
|
@ -917,7 +917,7 @@ int AudioReflector::analyzePathsSingleStep() {
|
||||||
|
|
||||||
// we used to use... ((reflectiveAttenuation + totalDiffusionAttenuation) * toListenerAttenuation) > MINIMUM_ATTENUATION_TO_REFLECT
|
// 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) {
|
&& totalDelay < MAXIMUM_DELAY_MS) {
|
||||||
|
|
||||||
// add this location, as the reflective attenuation as well as the total diffusion attenuation
|
// 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
|
// 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
|
// audio so that it can be adjusted to ear position
|
||||||
AudioPoint point = { end, currentDelay,
|
AudioPoint point = { end, currentDelay,
|
||||||
reflectiveAttenuation,
|
(reflectiveAttenuation + totalDiffusionAttenuation),
|
||||||
pathDistance};
|
pathDistance};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -955,23 +955,9 @@ int AudioReflector::analyzePathsSingleStep() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
path->finalized = true; // if we're too quiet, then we're done
|
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 {
|
} else {
|
||||||
path->finalized = true; // if it doesn't intersect, then it is finished
|
path->finalized = true; // if it doesn't intersect, then it is finished
|
||||||
if (wantExtraDebuggging && isDiffusion) {
|
|
||||||
qDebug() << "diffusion doesn't intersect!";
|
|
||||||
}
|
|
||||||
qDebug() << "doesn't intersect!";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue