aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-12-11 01:20:00 -0800
committerChris Robinson <[email protected]>2019-12-11 01:20:00 -0800
commit7d0c01050ae9acfe0121ce80475d657953689ec9 (patch)
tree06b4406cfa039ed81a8b40e84ce13713d9028461 /alc
parent4867f93a34226be5d7d78e2f58f1413fc88816e4 (diff)
Fix MHR limits
Diffstat (limited to 'alc')
-rw-r--r--alc/hrtf.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/alc/hrtf.cpp b/alc/hrtf.cpp
index d61e6d0b..d773b47c 100644
--- a/alc/hrtf.cpp
+++ b/alc/hrtf.cpp
@@ -73,7 +73,6 @@ struct LoadedHrtf {
* the makemhr utility.
*/
#define MIN_IR_SIZE (8)
-#define MAX_IR_SIZE (512)
#define MOD_IR_SIZE (2)
#define MIN_FD_COUNT (1)
@@ -622,10 +621,9 @@ std::unique_ptr<HrtfStore> LoadHrtf00(std::istream &data, const char *filename)
}
ALboolean failed{AL_FALSE};
- if(irSize < MIN_IR_SIZE || irSize > MAX_IR_SIZE || (irSize%MOD_IR_SIZE))
+ if(irSize < MIN_IR_SIZE || irSize > HRIR_LENGTH)
{
- ERR("Unsupported HRIR size: irSize=%d (%d to %d by %d)\n",
- irSize, MIN_IR_SIZE, MAX_IR_SIZE, MOD_IR_SIZE);
+ ERR("Unsupported HRIR size, irSize=%d (%d to %d)\n", irSize, MIN_IR_SIZE, HRIR_LENGTH);
failed = AL_TRUE;
}
if(evCount < MIN_EV_COUNT || evCount > MAX_EV_COUNT)
@@ -739,10 +737,9 @@ std::unique_ptr<HrtfStore> LoadHrtf01(std::istream &data, const char *filename)
}
ALboolean failed{AL_FALSE};
- if(irSize < MIN_IR_SIZE || irSize > MAX_IR_SIZE || (irSize%MOD_IR_SIZE))
+ if(irSize < MIN_IR_SIZE || irSize > HRIR_LENGTH)
{
- ERR("Unsupported HRIR size: irSize=%d (%d to %d by %d)\n",
- irSize, MIN_IR_SIZE, MAX_IR_SIZE, MOD_IR_SIZE);
+ ERR("Unsupported HRIR size, irSize=%d (%d to %d)\n", irSize, MIN_IR_SIZE, HRIR_LENGTH);
failed = AL_TRUE;
}
if(evCount < MIN_EV_COUNT || evCount > MAX_EV_COUNT)
@@ -856,10 +853,9 @@ std::unique_ptr<HrtfStore> LoadHrtf02(std::istream &data, const char *filename)
failed = AL_TRUE;
}
- if(irSize < MIN_IR_SIZE || irSize > MAX_IR_SIZE || (irSize%MOD_IR_SIZE))
+ if(irSize < MIN_IR_SIZE || irSize > HRIR_LENGTH)
{
- ERR("Unsupported HRIR size: irSize=%d (%d to %d by %d)\n",
- irSize, MIN_IR_SIZE, MAX_IR_SIZE, MOD_IR_SIZE);
+ ERR("Unsupported HRIR size, irSize=%d (%d to %d)\n", irSize, MIN_IR_SIZE, HRIR_LENGTH);
failed = AL_TRUE;
}
if(fdCount < 1 || fdCount > MAX_FD_COUNT)