aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-08-07 05:43:16 -0700
committerChris Robinson <[email protected]>2010-08-07 05:43:16 -0700
commit5f22d30fc91e677933e12034979f42f74c4f653d (patch)
tree71e9f5de28e2f6b1cb21ccf0dea02289a9081ac3 /Alc/mixer.c
parentd6dc855511982a76be8289966842030d135a8578 (diff)
Calculate the source stepping value with the param calculations
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 6b0406be..64b4a13a 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -36,9 +36,6 @@
#include "alu.h"
#include "bs2b.h"
-#define FRACTIONBITS 14
-#define FRACTIONMASK ((1L<<FRACTIONBITS)-1)
-#define MAX_PITCH 65536
/* Minimum ramp length in milliseconds. The value below was chosen to
* adequately reduce clicks and pops from harsh gain changes. */
@@ -156,16 +153,8 @@ static void MixSource(ALsource *ALSource, ALCcontext *ALContext,
wetGainStep[i] = (ALSource->Params.WetGains[i]-WetSend[i]) /
rampLength;
- /* Compute 18.14 fixed point step */
- if(ALSource->Params.Pitch > (float)MAX_PITCH)
- increment = MAX_PITCH << FRACTIONBITS;
- else if(!(ALSource->Params.Pitch > 0.f))
- increment = (1<<FRACTIONBITS);
- else
- {
- increment = (ALint)(ALSource->Params.Pitch*(1L<<FRACTIONBITS));
- if(increment == 0) increment = 1;
- }
+ /* Get fixed point step */
+ increment = ALSource->Params.Step;
DryFilter = &ALSource->Params.iirFilter;
for(i = 0;i < MAX_SENDS;i++)