diff options
author | Chris Robinson <[email protected]> | 2015-09-26 11:11:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-09-26 11:18:30 -0700 |
commit | 86ff35bf71559295019847ccccb8522f93df1106 (patch) | |
tree | e42eb799fea39226a7a4685f372eec9687040f32 | |
parent | 30d88cf5477ddb32b2c2295d7b03c4d74bc67e3e (diff) |
Increase the max pitch to 255
Note that this is the multiple above the device sample rate, rather than the
source property limit. It could theoretically be increased to 511 by testing
against UINT_MAX instead of INT_MAX, since the increment and positions are
using unsigned integers. I'm just being paranoid about overflows.
-rw-r--r-- | Alc/ALu.c | 3 | ||||
-rw-r--r-- | Alc/mixer.c | 3 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -42,9 +42,6 @@ #include "midi/base.h" -static_assert((INT_MAX>>FRACTIONBITS)/MAX_PITCH > BUFFERSIZE, - "MAX_PITCH and/or BUFFERSIZE are too large for FRACTIONBITS!"); - struct ChanMap { enum Channel channel; ALfloat angle; diff --git a/Alc/mixer.c b/Alc/mixer.c index e9ef6d79..b2084c62 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -38,6 +38,9 @@ #include "mixer_defs.h" +static_assert((INT_MAX>>FRACTIONBITS)/MAX_PITCH > BUFFERSIZE, + "MAX_PITCH and/or BUFFERSIZE are too large for FRACTIONBITS!"); + extern inline void InitiatePositionArrays(ALuint frac, ALuint increment, ALuint *frac_arr, ALuint *pos_arr, ALuint size); alignas(16) ALfloat CubicLUT[FRACTIONONE][4]; diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 7aac62a0..2edc0d0c 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -30,7 +30,7 @@ #define RAD2DEG(x) ((ALfloat)(x) * (180.0f/F_PI)) -#define MAX_PITCH (10) +#define MAX_PITCH (255) #ifdef __cplusplus |