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.
master
Chris Robinson 2021-04-24 03:12:05 -07:00
parent 65b85f7cb9
commit 7387148006
1 changed files with 3 additions and 1 deletions

View File

@ -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");