diff options
author | Chris Robinson <[email protected]> | 2010-08-07 05:43:16 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-08-07 05:43:16 -0700 |
commit | 5f22d30fc91e677933e12034979f42f74c4f653d (patch) | |
tree | 71e9f5de28e2f6b1cb21ccf0dea02289a9081ac3 /OpenAL32/Include | |
parent | d6dc855511982a76be8289966842030d135a8578 (diff) |
Calculate the source stepping value with the param calculations
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alSource.h | 2 | ||||
-rw-r--r-- | OpenAL32/Include/alu.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 97ecbecf..9cee835b 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -91,7 +91,7 @@ typedef struct ALsource struct { ALfloat DryGains[OUTPUTCHANNELS]; ALfloat WetGains[MAX_SENDS]; - ALfloat Pitch; + ALint Step; struct { FILTER iirFilter; diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 73f70224..fe2f42ba 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -5,6 +5,7 @@ #include "AL/alc.h" #include "AL/alext.h" +#include <limits.h> #include <math.h> #ifdef HAVE_FLOAT_H #include <float.h> @@ -76,6 +77,10 @@ typedef enum { #define BUFFERSIZE 8192 +#define FRACTIONBITS (14) +#define FRACTIONMASK ((1<<FRACTIONBITS)-1) +#define MAX_PITCH (INT_MAX & ~FRACTIONMASK) + /* NOTE: The AL_FORMAT_REAR* enums aren't handled here because they're * converted to AL_FORMAT_QUAD* when loaded */ static __inline ALuint aluBytesFromFormat(ALenum format) |