aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-10-22 15:23:17 -0700
committerChris Robinson <[email protected]>2019-10-22 15:23:17 -0700
commit4733fc6f1e2ba1bcdaca9d7c1941b2abbf150b67 (patch)
treec6fa4ec6e601d180b21648ef251a039652755249
parenta8a3acb6f66da6b630e6d71b77cdbc2b23a4f552 (diff)
Fix azimuth limit
-rw-r--r--alc/hrtf.cpp2
-rw-r--r--utils/makemhr/makemhr.cpp8
-rw-r--r--utils/makemhr/makemhr.h5
3 files changed, 10 insertions, 5 deletions
diff --git a/alc/hrtf.cpp b/alc/hrtf.cpp
index 7643ce44..bfce69f5 100644
--- a/alc/hrtf.cpp
+++ b/alc/hrtf.cpp
@@ -91,7 +91,7 @@ using HrtfHandlePtr = std::unique_ptr<HrtfHandle>;
#define MAX_EV_COUNT (181)
#define MIN_AZ_COUNT (1)
-#define MAX_AZ_COUNT (360)
+#define MAX_AZ_COUNT (255)
#define MAX_HRIR_DELAY (HRTF_HISTORY_LENGTH-1)
diff --git a/utils/makemhr/makemhr.cpp b/utils/makemhr/makemhr.cpp
index 3659d40b..1e28ca4b 100644
--- a/utils/makemhr/makemhr.cpp
+++ b/utils/makemhr/makemhr.cpp
@@ -1462,10 +1462,12 @@ static void CalculateHrtds(const HeadModelT model, const double radius, HrirData
for(ei = 0;ei < hData->mFds[fi].mEvCount;ei++)
{
- for(ti = 0;ti < channels;ti++)
+ for(ai = 0;ai < hData->mFds[fi].mEvs[ei].mAzCount;ai++)
{
- for(ai = 0;ai < hData->mFds[fi].mEvs[ei].mAzCount;ai++)
- hData->mFds[fi].mEvs[ei].mAzs[ai].mDelays[ti] -= minHrtd;
+ HrirAzT *azd = &hData->mFds[fi].mEvs[ei].mAzs[ai];
+
+ for(ti = 0;ti < channels;ti++)
+ azd->mDelays[ti] -= minHrtd;
}
}
}
diff --git a/utils/makemhr/makemhr.h b/utils/makemhr/makemhr.h
index 5125b43c..ba19efbe 100644
--- a/utils/makemhr/makemhr.h
+++ b/utils/makemhr/makemhr.h
@@ -9,15 +9,18 @@
#define MAX_PATH_LEN (256)
// The limit to the number of 'distances' listed in the data set definition.
+// Must be less than 256
#define MAX_FD_COUNT (16)
// The limits to the number of 'elevations' listed in the data set definition.
+// Must be less than 256.
#define MIN_EV_COUNT (5)
#define MAX_EV_COUNT (181)
// The limits for each of the 'azimuths' listed in the data set definition.
+// Must be less than 256.
#define MIN_AZ_COUNT (1)
-#define MAX_AZ_COUNT (360)
+#define MAX_AZ_COUNT (255)
// The limits for the 'distance' from source to listener for each field in
// the definition file.