aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-12-06 23:11:26 -0800
committerChris Robinson <[email protected]>2019-12-06 23:11:26 -0800
commit3f559e7e6018387bd200bcf5630f97752bcc0dc5 (patch)
tree06e8c11d9616e885465be5470ec0ffca7892ae1e /alc
parentc9a6527121dd0246b2a5c333cc39f1309ed132a5 (diff)
Rename a couple structs for clarity
Diffstat (limited to 'alc')
-rw-r--r--alc/hrtf.h8
-rw-r--r--alc/panning.cpp56
2 files changed, 32 insertions, 32 deletions
diff --git a/alc/hrtf.h b/alc/hrtf.h
index 7dc41a6a..803dc35f 100644
--- a/alc/hrtf.h
+++ b/alc/hrtf.h
@@ -80,11 +80,11 @@ struct DirectHrtfState {
DEF_FAM_NEWDEL(DirectHrtfState, Coeffs)
};
-struct ElevRadius { float value; };
-struct AzimRadius { float value; };
+struct EvRadians { float value; };
+struct AzRadians { float value; };
struct AngularPoint {
- ElevRadius Elev;
- AzimRadius Azim;
+ EvRadians Elev;
+ AzRadians Azim;
};
diff --git a/alc/panning.cpp b/alc/panning.cpp
index 22fcac53..ba71bcd9 100644
--- a/alc/panning.cpp
+++ b/alc/panning.cpp
@@ -529,35 +529,35 @@ void InitHrtfPanning(ALCdevice *device)
constexpr float PI3_4{PI_4 * 3.0f};
static const float CornerElev{static_cast<float>(std::atan2(1.0, std::sqrt(2.0)))};
static const AngularPoint AmbiPoints1O[]{
- { ElevRadius{ CornerElev}, AzimRadius{ -PI_4} },
- { ElevRadius{ CornerElev}, AzimRadius{-PI3_4} },
- { ElevRadius{ CornerElev}, AzimRadius{ PI_4} },
- { ElevRadius{ CornerElev}, AzimRadius{ PI3_4} },
- { ElevRadius{-CornerElev}, AzimRadius{ -PI_4} },
- { ElevRadius{-CornerElev}, AzimRadius{-PI3_4} },
- { ElevRadius{-CornerElev}, AzimRadius{ PI_4} },
- { ElevRadius{-CornerElev}, AzimRadius{ PI3_4} },
+ { EvRadians{ CornerElev}, AzRadians{ -PI_4} },
+ { EvRadians{ CornerElev}, AzRadians{-PI3_4} },
+ { EvRadians{ CornerElev}, AzRadians{ PI_4} },
+ { EvRadians{ CornerElev}, AzRadians{ PI3_4} },
+ { EvRadians{-CornerElev}, AzRadians{ -PI_4} },
+ { EvRadians{-CornerElev}, AzRadians{-PI3_4} },
+ { EvRadians{-CornerElev}, AzRadians{ PI_4} },
+ { EvRadians{-CornerElev}, AzRadians{ PI3_4} },
}, AmbiPoints2O[]{
- { ElevRadius{ -CornerElev}, AzimRadius{ -PI_4} },
- { ElevRadius{ -CornerElev}, AzimRadius{ -PI3_4} },
- { ElevRadius{ CornerElev}, AzimRadius{ -PI3_4} },
- { ElevRadius{ CornerElev}, AzimRadius{ PI3_4} },
- { ElevRadius{ CornerElev}, AzimRadius{ PI_4} },
- { ElevRadius{ -CornerElev}, AzimRadius{ PI_4} },
- { ElevRadius{ -CornerElev}, AzimRadius{ PI3_4} },
- { ElevRadius{ CornerElev}, AzimRadius{ -PI_4} },
- { ElevRadius{-1.205932499e+00f}, AzimRadius{ -PI_2} },
- { ElevRadius{ 1.205932499e+00f}, AzimRadius{ PI_2} },
- { ElevRadius{-1.205932499e+00f}, AzimRadius{ PI_2} },
- { ElevRadius{ 1.205932499e+00f}, AzimRadius{ -PI_2} },
- { ElevRadius{ 0.0f}, AzimRadius{-1.205932499e+00f} },
- { ElevRadius{ 0.0f}, AzimRadius{-1.935660155e+00f} },
- { ElevRadius{ 0.0f}, AzimRadius{ 1.205932499e+00f} },
- { ElevRadius{ 0.0f}, AzimRadius{ 1.935660155e+00f} },
- { ElevRadius{-3.648638281e-01f}, AzimRadius{ PI} },
- { ElevRadius{ 3.648638281e-01f}, AzimRadius{ PI} },
- { ElevRadius{ 3.648638281e-01f}, AzimRadius{ 0.0f} },
- { ElevRadius{-3.648638281e-01f}, AzimRadius{ 0.0f} },
+ { EvRadians{ -CornerElev}, AzRadians{ -PI_4} },
+ { EvRadians{ -CornerElev}, AzRadians{ -PI3_4} },
+ { EvRadians{ CornerElev}, AzRadians{ -PI3_4} },
+ { EvRadians{ CornerElev}, AzRadians{ PI3_4} },
+ { EvRadians{ CornerElev}, AzRadians{ PI_4} },
+ { EvRadians{ -CornerElev}, AzRadians{ PI_4} },
+ { EvRadians{ -CornerElev}, AzRadians{ PI3_4} },
+ { EvRadians{ CornerElev}, AzRadians{ -PI_4} },
+ { EvRadians{-1.205932499e+00f}, AzRadians{ -PI_2} },
+ { EvRadians{ 1.205932499e+00f}, AzRadians{ PI_2} },
+ { EvRadians{-1.205932499e+00f}, AzRadians{ PI_2} },
+ { EvRadians{ 1.205932499e+00f}, AzRadians{ -PI_2} },
+ { EvRadians{ 0.0f}, AzRadians{-1.205932499e+00f} },
+ { EvRadians{ 0.0f}, AzRadians{-1.935660155e+00f} },
+ { EvRadians{ 0.0f}, AzRadians{ 1.205932499e+00f} },
+ { EvRadians{ 0.0f}, AzRadians{ 1.935660155e+00f} },
+ { EvRadians{-3.648638281e-01f}, AzRadians{ PI} },
+ { EvRadians{ 3.648638281e-01f}, AzRadians{ PI} },
+ { EvRadians{ 3.648638281e-01f}, AzRadians{ 0.0f} },
+ { EvRadians{-3.648638281e-01f}, AzRadians{ 0.0f} },
};
static const float AmbiMatrix1O[][MAX_AMBI_CHANNELS]{
{ 1.250000000e-01f, 1.250000000e-01f, 1.250000000e-01f, 1.250000000e-01f },