aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-10-09 02:50:00 -0700
committerChris Robinson <[email protected]>2008-10-09 02:50:00 -0700
commitaf9932d28b1d983246450814188de88094261a8f (patch)
tree543dfe31071fff31605adb61e3ffe11f7d83a633 /Alc
parent87ff8a65e9e34ac26d34045b8bba373b6b2bd870 (diff)
Increase max pitch to 65536
This should be safe now
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 94b3a9a6..956aa9ab 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -68,7 +68,7 @@ typedef long long ALint64;
#define BUFFERSIZE 24000
#define FRACTIONBITS 14
#define FRACTIONMASK ((1L<<FRACTIONBITS)-1)
-#define MAX_PITCH 4
+#define MAX_PITCH 65536
/* Minimum ramp length in milliseconds. The value below was chosen to
* adequately reduce clicks and pops from harsh gain changes. */
@@ -765,10 +765,10 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma
}
//Compute 18.14 fixed point step
+ if(Pitch > (float)MAX_PITCH)
+ Pitch = (float)MAX_PITCH;
increment = (ALint)(Pitch*(ALfloat)(1L<<FRACTIONBITS));
- if(increment > (MAX_PITCH<<FRACTIONBITS))
- increment = (MAX_PITCH<<FRACTIONBITS);
- else if(increment <= 0)
+ if(increment <= 0)
increment = (1<<FRACTIONBITS);
//Figure out how many samples we can mix.