aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alc/panning.cpp63
-rw-r--r--presets/itu5.1.ambdec27
2 files changed, 52 insertions, 38 deletions
diff --git a/alc/panning.cpp b/alc/panning.cpp
index 0ed401a1..2c99d978 100644
--- a/alc/panning.cpp
+++ b/alc/panning.cpp
@@ -289,13 +289,6 @@ void InitDistanceComp(ALCdevice *device, DecoderView decoder,
}
-inline auto& GetAmbiScales(AmbDecScale scaletype) noexcept
-{
- if(scaletype == AmbDecScale::FuMa) return AmbiScale::FromFuMa();
- if(scaletype == AmbDecScale::SN3D) return AmbiScale::FromSN3D();
- return AmbiScale::FromN3D();
-}
-
inline auto& GetAmbiScales(DevAmbiScaling scaletype) noexcept
{
if(scaletype == DevAmbiScaling::FuMa) return AmbiScale::FromFuMa();
@@ -489,26 +482,44 @@ constexpr DecoderConfig<DualBand, 4> QuadConfig{
{{2.50000000e-1f, -2.04124145e-1f, -2.04124145e-1f, 1.29099445e-1f, 0.00000000e+0f}},
}}
};
-constexpr DecoderConfig<SingleBand, 4> X51Config{
- 2, false, {{SideLeft, FrontLeft, FrontRight, SideRight}},
- DevAmbiScaling::N3D,
- {{1.0f, 1.0f, 1.0f}},
+constexpr DecoderConfig<DualBand, 5> X51Config{
+ 2, false, {{SideLeft, FrontLeft, FrontCenter, FrontRight, SideRight}},
+ DevAmbiScaling::FuMa,
+ /*HF*/{{1.00000000e+0f, 1.00000000e+0f, 1.00000000e+0f}},
+ {{
+ {{5.67316000e-1f, 4.22920000e-1f, -3.15495000e-1f, -6.34490000e-2f, -2.92380000e-2f}},
+ {{3.68584000e-1f, 2.72349000e-1f, 3.21616000e-1f, 1.92645000e-1f, 4.82600000e-2f}},
+ {{1.83579000e-1f, 0.00000000e+0f, 1.99588000e-1f, 0.00000000e+0f, 9.62820000e-2f}},
+ {{3.68584000e-1f, -2.72349000e-1f, 3.21616000e-1f, -1.92645000e-1f, 4.82600000e-2f}},
+ {{5.67316000e-1f, -4.22920000e-1f, -3.15495000e-1f, 6.34490000e-2f, -2.92380000e-2f}},
+ }},
+ /*LF*/{{1.00000000e+0f, 1.00000000e+0f, 1.00000000e+0f}},
{{
- {{3.33000782e-1f, 1.89084803e-1f, -2.00042375e-1f, -2.12307769e-2f, -1.14579885e-2f}},
- {{1.88542860e-1f, 1.27709292e-1f, 1.66295695e-1f, 7.30571517e-2f, 2.10901184e-2f}},
- {{1.88542860e-1f, -1.27709292e-1f, 1.66295695e-1f, -7.30571517e-2f, 2.10901184e-2f}},
- {{3.33000782e-1f, -1.89084803e-1f, -2.00042375e-1f, 2.12307769e-2f, -1.14579885e-2f}},
+ {{4.90109850e-1f, 3.77305010e-1f, -3.73106990e-1f, -1.25914530e-1f, 1.45133000e-2f}},
+ {{1.49085730e-1f, 3.03561680e-1f, 1.53290060e-1f, 2.45112480e-1f, -1.50753130e-1f}},
+ {{1.37654920e-1f, 0.00000000e+0f, 4.49417940e-1f, 0.00000000e+0f, 2.57844070e-1f}},
+ {{1.49085730e-1f, -3.03561680e-1f, 1.53290060e-1f, -2.45112480e-1f, -1.50753130e-1f}},
+ {{4.90109850e-1f, -3.77305010e-1f, -3.73106990e-1f, 1.25914530e-1f, 1.45133000e-2f}},
}}
};
-constexpr DecoderConfig<SingleBand, 4> X51RearConfig{
- 2, false, {{BackLeft, FrontLeft, FrontRight, BackRight}},
- DevAmbiScaling::N3D,
- {{1.0f, 1.0f, 1.0f}},
+constexpr DecoderConfig<DualBand, 5> X51RearConfig{
+ 2, false, {{BackLeft, FrontLeft, FrontCenter, FrontRight, BackRight}},
+ DevAmbiScaling::FuMa,
+ /*HF*/{{1.00000000e+0f, 1.00000000e+0f, 1.00000000e+0f}},
{{
- {{3.33000782e-1f, 1.89084803e-1f, -2.00042375e-1f, -2.12307769e-2f, -1.14579885e-2f}},
- {{1.88542860e-1f, 1.27709292e-1f, 1.66295695e-1f, 7.30571517e-2f, 2.10901184e-2f}},
- {{1.88542860e-1f, -1.27709292e-1f, 1.66295695e-1f, -7.30571517e-2f, 2.10901184e-2f}},
- {{3.33000782e-1f, -1.89084803e-1f, -2.00042375e-1f, 2.12307769e-2f, -1.14579885e-2f}},
+ {{5.67316000e-1f, 4.22920000e-1f, -3.15495000e-1f, -6.34490000e-2f, -2.92380000e-2f}},
+ {{3.68584000e-1f, 2.72349000e-1f, 3.21616000e-1f, 1.92645000e-1f, 4.82600000e-2f}},
+ {{1.83579000e-1f, 0.00000000e+0f, 1.99588000e-1f, 0.00000000e+0f, 9.62820000e-2f}},
+ {{3.68584000e-1f, -2.72349000e-1f, 3.21616000e-1f, -1.92645000e-1f, 4.82600000e-2f}},
+ {{5.67316000e-1f, -4.22920000e-1f, -3.15495000e-1f, 6.34490000e-2f, -2.92380000e-2f}},
+ }},
+ /*LF*/{{1.00000000e+0f, 1.00000000e+0f, 1.00000000e+0f}},
+ {{
+ {{4.90109850e-1f, 3.77305010e-1f, -3.73106990e-1f, -1.25914530e-1f, 1.45133000e-2f}},
+ {{1.49085730e-1f, 3.03561680e-1f, 1.53290060e-1f, 2.45112480e-1f, -1.50753130e-1f}},
+ {{1.37654920e-1f, 0.00000000e+0f, 4.49417940e-1f, 0.00000000e+0f, 2.57844070e-1f}},
+ {{1.49085730e-1f, -3.03561680e-1f, 1.53290060e-1f, -2.45112480e-1f, -1.50753130e-1f}},
+ {{4.90109850e-1f, -3.77305010e-1f, -3.73106990e-1f, 1.25914530e-1f, 1.45133000e-2f}},
}}
};
constexpr DecoderConfig<SingleBand, 5> X61Config{
@@ -618,8 +629,12 @@ void InitPanning(ALCdevice *device, const bool hqdec=false, const bool stablize=
}
}
- /* For non-DevFmtAmbi3D, set the ambisonic order. */
+ /* For non-DevFmtAmbi3D, set the ambisonic order and reset the layout and
+ * scale.
+ */
device->mAmbiOrder = decoder.mOrder;
+ device->mAmbiLayout = DevAmbiLayout::ACN;
+ device->mAmbiScale = DevAmbiScaling::N3D;
const size_t ambicount{decoder.mIs3D ? AmbiChannelsFromOrder(decoder.mOrder) :
Ambi2DChannelsFromOrder(decoder.mOrder)};
diff --git a/presets/itu5.1.ambdec b/presets/itu5.1.ambdec
index 74386034..8f4b14e1 100644
--- a/presets/itu5.1.ambdec
+++ b/presets/itu5.1.ambdec
@@ -1,7 +1,6 @@
# AmbDec configuration
-# Written by Ambisonic Decoder Toolbox, version 8.0
-/description itu50_2h0p_allrad_5200_rE_max_1_band
+/description itu50_2h0p_idhoa
/version 3
@@ -15,7 +14,7 @@
/opt/delay_comp on
/opt/level_comp on
/opt/xover_freq 400.000000
-/opt/xover_ratio 3.000000
+/opt/xover_ratio 0.000000
/speakers/{
# id dist azim elev conn
@@ -29,20 +28,20 @@ add_spkr RS 1.000000 -110.000000 0.000000
/lfmatrix/{
order_gain 1.000000 1.000000 1.000000 0.000000
-add_row 0.420330 0.330200 -0.312250 0.019350 -0.027010
-add_row 0.197700 0.288820 0.287820 0.049110 0.007420
-add_row 0.058030 0.000000 0.205970 0.000000 0.050790
-add_row 0.197700 -0.288820 0.287820 -0.049110 0.007420
-add_row 0.420330 -0.330200 -0.312250 -0.019350 -0.027010
+add_row 4.9010985e-1 3.7730501e-1 -3.7310699e-1 -1.2591453e-1 1.4513300e-2
+add_row 1.4908573e-1 3.0356168e-1 1.5329006e-1 2.4511248e-1 -1.5075313e-1
+add_row 1.3765492e-1 0.0000000e+0 4.4941794e-1 0.0000000e+0 2.5784407e-1
+add_row 1.4908573e-1 -3.0356168e-1 1.5329006e-1 -2.4511248e-1 -1.5075313e-1
+add_row 4.9010985e-1 -3.7730501e-1 -3.7310699e-1 1.2591453e-1 1.4513300e-2
/}
/hfmatrix/{
-order_gain 1.000000 0.866025 0.500000 0.000000
-add_row 0.470934 0.378170 -0.400085 -0.082226 -0.044377
-add_row 0.208954 0.257988 0.230383 0.288520 -0.025085
-add_row 0.109403 -0.000002 0.194278 -0.000003 0.200863
-add_row 0.208950 -0.257989 0.230379 -0.288516 -0.025088
-add_row 0.470936 -0.378173 -0.400081 0.082228 -0.044372
+order_gain 1.000000 1.000000 1.000000 0.000000
+add_row 5.6731600e-1 4.2292000e-1 -3.1549500e-1 -6.3449000e-2 -2.9238000e-2
+add_row 3.6858400e-1 2.7234900e-1 3.2161600e-1 1.9264500e-1 4.8260000e-2
+add_row 1.8357900e-1 0.0000000e+0 1.9958800e-1 0.0000000e+0 9.6282000e-2
+add_row 3.6858400e-1 -2.7234900e-1 3.2161600e-1 -1.9264500e-1 4.8260000e-2
+add_row 5.6731600e-1 -4.2292000e-1 -3.1549500e-1 6.3449000e-2 -2.9238000e-2
/}
/end