aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-09-08 16:22:46 -0700
committerChris Robinson <[email protected]>2016-09-08 16:22:46 -0700
commit45dfdca6f9efa7ec8fb5c16be1bb0f513fe5d772 (patch)
tree4f3d8b4d212110e25573715530d264ce184d7911
parent0f24f49a44a12d139692d0846b2722de2213f1a8 (diff)
Reduce the volume for the HRTF ambisonic decoder
Since it's accumulating multiple HRIRs for two output speakers, it seems to be a better option to preserve the amplitude of the high-frequency decoder instead of increasing it, and reduce the amplitude of the low-frequency decoder to compensate.
-rw-r--r--Alc/hrtf.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index d7cd6bad..92a1acea 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -195,20 +195,20 @@ ALuint BuildBFormatHrtf(const struct Hrtf *Hrtf, ALfloat (*coeffs)[HRIR_LENGTH][
{ DEG2RAD(-90.0f), DEG2RAD( 0.0f) },
};
static const ALfloat Ambi3DMatrix[14][2][MAX_AMBI_COEFFS] = {
- { { 0.18898176f, 0.000000000f, 0.188982460f, 0.000000000f }, { 0.0714283915f, 0.0000000000f, 0.1237180798f, 0.0000000000f } },
- { { 0.18898176f, 0.109109004f, 0.109109004f, 0.109109004f }, { 0.0714283915f, 0.0714286206f, 0.0714286206f, 0.0714286206f } },
- { { 0.18898176f, -0.109109004f, 0.109109004f, 0.109109004f }, { 0.0714283915f, -0.0714286206f, 0.0714286206f, 0.0714286206f } },
- { { 0.18898176f, -0.109109004f, 0.109109004f, -0.109109004f }, { 0.0714283915f, -0.0714286206f, 0.0714286206f, -0.0714286206f } },
- { { 0.18898176f, 0.109109004f, 0.109109004f, -0.109109004f }, { 0.0714283915f, 0.0714286206f, 0.0714286206f, -0.0714286206f } },
- { { 0.18898176f, 0.000000000f, 0.000000000f, 0.188982460f }, { 0.0714283915f, 0.0000000000f, 0.0000000000f, 0.1237180798f } },
- { { 0.18898176f, -0.188982460f, 0.000000000f, 0.000000000f }, { 0.0714283915f, -0.1237180798f, 0.0000000000f, 0.0000000000f } },
- { { 0.18898176f, 0.000000000f, 0.000000000f, -0.188982460f }, { 0.0714283915f, 0.0000000000f, 0.0000000000f, -0.1237180798f } },
- { { 0.18898176f, 0.188982460f, 0.000000000f, 0.000000000f }, { 0.0714283915f, 0.1237180798f, 0.0000000000f, 0.0000000000f } },
- { { 0.18898176f, 0.109109004f, -0.109109004f, 0.109109004f }, { 0.0714283915f, 0.0714286206f, -0.0714286206f, 0.0714286206f } },
- { { 0.18898176f, -0.109109004f, -0.109109004f, 0.109109004f }, { 0.0714283915f, -0.0714286206f, -0.0714286206f, 0.0714286206f } },
- { { 0.18898176f, -0.109109004f, -0.109109004f, -0.109109004f }, { 0.0714283915f, -0.0714286206f, -0.0714286206f, -0.0714286206f } },
- { { 0.18898176f, 0.109109004f, -0.109109004f, -0.109109004f }, { 0.0714283915f, 0.0714286206f, -0.0714286206f, -0.0714286206f } },
- { { 0.18898176f, 0.000000000f, -0.188982460f, 0.000000000f }, { 0.0714283915f, 0.0000000000f, -0.1237180798f, 0.0000000000f } },
+ { { 0.071428392f, 0.000000000f, 0.071428392f, 0.000000000f }, { 0.0269973975f, 0.0000000000f, 0.0467610443f, 0.0000000000f } },
+ { { 0.071428392f, 0.041239332f, 0.041239332f, 0.041239332f }, { 0.0269973975f, 0.0269973975f, 0.0269973975f, 0.0269973975f } },
+ { { 0.071428392f, -0.041239332f, 0.041239332f, 0.041239332f }, { 0.0269973975f, -0.0269973975f, 0.0269973975f, 0.0269973975f } },
+ { { 0.071428392f, -0.041239332f, 0.041239332f, -0.041239332f }, { 0.0269973975f, -0.0269973975f, 0.0269973975f, -0.0269973975f } },
+ { { 0.071428392f, 0.041239332f, 0.041239332f, -0.041239332f }, { 0.0269973975f, 0.0269973975f, 0.0269973975f, -0.0269973975f } },
+ { { 0.071428392f, 0.000000000f, 0.000000000f, 0.071428392f }, { 0.0269973975f, 0.0000000000f, 0.0000000000f, 0.0467610443f } },
+ { { 0.071428392f, -0.071428392f, 0.000000000f, 0.000000000f }, { 0.0269973975f, -0.0467610443f, 0.0000000000f, 0.0000000000f } },
+ { { 0.071428392f, 0.000000000f, 0.000000000f, -0.071428392f }, { 0.0269973975f, 0.0000000000f, 0.0000000000f, -0.0467610443f } },
+ { { 0.071428392f, 0.071428392f, 0.000000000f, 0.000000000f }, { 0.0269973975f, 0.0467610443f, 0.0000000000f, 0.0000000000f } },
+ { { 0.071428392f, 0.041239332f, -0.041239332f, 0.041239332f }, { 0.0269973975f, 0.0269973975f, -0.0269973975f, 0.0269973975f } },
+ { { 0.071428392f, -0.041239332f, -0.041239332f, 0.041239332f }, { 0.0269973975f, -0.0269973975f, -0.0269973975f, 0.0269973975f } },
+ { { 0.071428392f, -0.041239332f, -0.041239332f, -0.041239332f }, { 0.0269973975f, -0.0269973975f, -0.0269973975f, -0.0269973975f } },
+ { { 0.071428392f, 0.041239332f, -0.041239332f, -0.041239332f }, { 0.0269973975f, 0.0269973975f, -0.0269973975f, -0.0269973975f } },
+ { { 0.071428392f, 0.000000000f, -0.071428392f, 0.000000000f }, { 0.0269973975f, 0.0000000000f, -0.0467610443f, 0.0000000000f } },
};
/* Change this to 2 for dual-band HRTF processing. May require a higher quality
* band-splitter, or better calculation of the new IR length to deal with the