mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:48:38 +02:00
add explicit constants inline for documebntation purposes
This commit is contained in:
parent
2abaa387d2
commit
5f695664a6
1 changed files with 6 additions and 4 deletions
|
@ -288,15 +288,17 @@ void AudioMixer::addStreamToMixForListeningNodeWithStream(PositionalAudioStream*
|
||||||
normalizedHeadPenumbraAngle = EPSILON;
|
normalizedHeadPenumbraAngle = EPSILON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const float SQUARE_ROOT_OF_TWO = 0.71f;
|
||||||
|
const float FILTER_CUTOFF_FREQUENCY_HZ = 4000.0f;
|
||||||
float penumbraFilterGain;
|
float penumbraFilterGain;
|
||||||
float penumbraFilterFrequency;
|
float penumbraFilterFrequency;
|
||||||
float penumbraFilterSlope;
|
float penumbraFilterSlope;
|
||||||
|
|
||||||
// calculate the updated gain. this will be tuned over time.
|
// calculate the updated gain. this will be tuned over time.
|
||||||
// consider this only a crude-first pass at correlating gain, freq and slope with penumbra angle.
|
// consider this only a crude-first pass at correlating gain, freq and slope with penumbra angle.
|
||||||
penumbraFilterGain = 0.71f * (normalizedHeadPenumbraAngle + 0.71f); // [1.0,0.71]
|
penumbraFilterGain = SQUARE_ROOT_OF_TWO * (normalizedHeadPenumbraAngle + SQUARE_ROOT_OF_TWO); // [1.0,0.71]
|
||||||
penumbraFilterFrequency = 4000.0f; // constant frequency
|
penumbraFilterFrequency = FILTER_CUTOFF_FREQUENCY_HZ; // constant frequency
|
||||||
penumbraFilterSlope = 0.71f; // constant slope
|
penumbraFilterSlope = SQUARE_ROOT_OF_TWO; // constant slope
|
||||||
|
|
||||||
qDebug() << "penumbra gain=" << penumbraFilterGain << ", penumbraAngle=" << normalizedHeadPenumbraAngle;
|
qDebug() << "penumbra gain=" << penumbraFilterGain << ", penumbraAngle=" << normalizedHeadPenumbraAngle;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue