diff options
author | Chris Robinson <[email protected]> | 2011-06-17 16:22:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-06-17 16:22:39 -0700 |
commit | edf78b077efa5a8d3f11ea2059095f33e9f971a8 (patch) | |
tree | 3ba00f2c84cfa650291f21865be9b4a18affee86 /OpenAL32 | |
parent | 753e64c76cabf3ba22a4509f5ee2c7615de00b48 (diff) |
Use separate lines for HRTF history and values
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 2 | ||||
-rw-r--r-- | OpenAL32/Include/alSource.h | 5 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index c77fa6eb..ab44fa55 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -497,7 +497,7 @@ ALboolean IsValidChannels(ALenum type); #define HRIR_BITS (5) #define HRIR_LENGTH (1<<HRIR_BITS) -#define HRIR_LENGTH_MASK (HRIR_LENGTH-1) +#define HRIR_MASK (HRIR_LENGTH-1) void InitHrtf(void); void GetHrtfCoeffs(ALfloat elevation, ALfloat angle, const ALshort **left, const ALshort **right, ALuint *ldelay, ALuint *rdelay); diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 0572cbc1..e9c50f14 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -11,7 +11,7 @@ extern "C" { #endif -#define SRC_HISTORY_BITS (7) +#define SRC_HISTORY_BITS (6) #define SRC_HISTORY_LENGTH (1<<SRC_HISTORY_BITS) #define SRC_HISTORY_MASK (SRC_HISTORY_LENGTH-1) @@ -94,7 +94,8 @@ typedef struct ALsource ALuint SampleSize; /* HRTF info */ - ALfloat HrtfHistory[MAXCHANNELS][SRC_HISTORY_LENGTH][2]; + ALfloat HrtfHistory[MAXCHANNELS][SRC_HISTORY_LENGTH]; + ALfloat HrtfValues[MAXCHANNELS][HRIR_LENGTH][2]; ALuint HrtfOffset; /* Current target parameters used for mixing */ diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 9486915e..c50e648c 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -1382,9 +1382,11 @@ AL_API ALvoid AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources) { ALuint k; for(k = 0;k < SRC_HISTORY_LENGTH;k++) + Source->HrtfHistory[j][k] = 0.0f; + for(k = 0;k < HRIR_LENGTH;k++) { - Source->HrtfHistory[j][k][0] = 0.0f; - Source->HrtfHistory[j][k][1] = 0.0f; + Source->HrtfValues[j][k][0] = 0.0f; + Source->HrtfValues[j][k][1] = 0.0f; } } Source->HrtfOffset = 0; |