diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2022-01-12 03:05:56 -0800 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2022-01-12 03:25:59 -0800 |
commit | 481b115b96608fdd8f3178a2b7d7c0f3d3f06b69 (patch) | |
tree | a10632e9505903d8a94d57aa851b60235ea6b5a9 | |
parent | 5ec7d8cf960599a6ae0bb08ba2c219511c35e9ab (diff) |
Add an ambi-format option for ACN ordering and FuMa scaling
-rw-r--r-- | alc/alc.cpp | 15 | ||||
-rw-r--r-- | alsoftrc.sample | 3 | ||||
-rw-r--r-- | utils/alsoft-config/mainwindow.cpp | 3 |
3 files changed, 19 insertions, 2 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index 00757842..04dbcab3 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -3315,6 +3315,21 @@ START_API_FUNC device->mAmbiScale = DevAmbiScaling::FuMa; } } + else if(al::strcasecmp(fmt, "acn+fuma") == 0) + { + if(device->mAmbiOrder > 3) + ERR("FuMa is incompatible with %d%s order ambisonics (up to third-order only)\n", + device->mAmbiOrder, + (((device->mAmbiOrder%100)/10) == 1) ? "th" : + ((device->mAmbiOrder%10) == 1) ? "st" : + ((device->mAmbiOrder%10) == 2) ? "nd" : + ((device->mAmbiOrder%10) == 3) ? "rd" : "th"); + else + { + device->mAmbiLayout = DevAmbiLayout::ACN; + device->mAmbiScale = DevAmbiScaling::FuMa; + } + } else if(al::strcasecmp(fmt, "ambix") == 0 || al::strcasecmp(fmt, "acn+sn3d") == 0) { device->mAmbiLayout = DevAmbiLayout::ACN; diff --git a/alsoftrc.sample b/alsoftrc.sample index 7b94fa35..1664381d 100644 --- a/alsoftrc.sample +++ b/alsoftrc.sample @@ -102,7 +102,8 @@ ## ambi-format: # Specifies the channel order and normalization for the "ambi*" set of channel -# configurations. Valid settings are: fuma, ambix (or acn+sn3d), acn+n3d +# configurations. Valid settings are: fuma, acn+fuma, ambix (or acn+sn3d), or +# acn+n3d #ambi-format = ambix ## hrtf: diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 718752c6..baecf525 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -130,8 +130,9 @@ static const struct NameValuePair { }, ambiFormatList[] = { { "Default", "" }, { "AmbiX (ACN, SN3D)", "ambix" }, - { "ACN, N3D", "acn+n3d" }, { "Furse-Malham", "fuma" }, + { "ACN, N3D", "acn+n3d" }, + { "ACN, FuMa", "acn+fuma" }, { "", "" } }, hrtfModeList[] = { |