diff options
author | Chris Robinson <[email protected]> | 2021-04-24 03:12:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-04-24 03:12:05 -0700 |
commit | 738714800621cc7d8f74321883c301a14e3a04c3 (patch) | |
tree | 193f98b7bb2333fdddb291264951d407a9d9aa80 /alc | |
parent | 65b85f7cb9cdac5cbad2cefbe2141141717c80cb (diff) |
Use the root mean square for the HRTF B-Format HF scale
For the second-order decoder. Since the delays are adjusted to avoid most high
frequency phase cancelation, the energy-based scaling with the number of
channels used creates a significant HF increase. Using the RMS-based scaling
seems to create a more level response, though it's not perfect either. More
testing and measurements may be needed.
Diffstat (limited to 'alc')
-rw-r--r-- | alc/panning.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/alc/panning.cpp b/alc/panning.cpp index 4307a8d1..d385ecf0 100644 --- a/alc/panning.cpp +++ b/alc/panning.cpp @@ -740,7 +740,9 @@ void InitHrtfPanning(ALCdevice *device) static const float AmbiOrderHFGain1O[MaxAmbiOrder+1]{ 2.000000000e+00f, 1.154700538e+00f }, AmbiOrderHFGain2O[MaxAmbiOrder+1]{ - 2.357022604e+00f, 1.825741858e+00f, 9.428090416e-01f + /*AMP 1.000000000e+00f, 7.745966692e-01f, 4.000000000e-01f*/ + /*RMS*/ 9.128709292e-01f, 7.071067812e-01f, 3.651483717e-01f + /*ENRGY 2.357022604e+00f, 1.825741858e+00f, 9.428090416e-01f*/ }; static_assert(al::size(AmbiPoints1O) == al::size(AmbiMatrix1O), "First-Order Ambisonic HRTF mismatch"); |