aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alSource.h4
-rw-r--r--OpenAL32/alSource.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 30b949db..ee342f92 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -87,7 +87,7 @@ typedef struct ALsource
ALint lSourceType;
/* HRTF info */
- ALfloat HrtfHistory[HRTF_LENGTH];
+ ALfloat HrtfHistory[MAXCHANNELS][HRTF_LENGTH];
ALuint HrtfOffset;
// Current target parameters used for mixing
@@ -95,7 +95,7 @@ typedef struct ALsource
struct {
ALint Step;
- ALfloat HrtfCoeffs[HRTF_LENGTH][2];
+ ALfloat HrtfCoeffs[MAXCHANNELS][HRTF_LENGTH][2];
/* A mixing matrix. First subscript is the channel number of the input
* data (regardless of channel configuration) and the second is the
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 14beb85f..d6e9b18a 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -1349,8 +1349,12 @@ AL_API ALvoid AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources)
Source->Buffer = Source->queue->buffer;
- for(j = 0;j < HRTF_LENGTH;j++)
- Source->HrtfHistory[j] = 0.0f;
+ for(j = 0;j < MAXCHANNELS;j++)
+ {
+ ALuint k;
+ for(k = 0;k < HRTF_LENGTH;k++)
+ Source->HrtfHistory[j][k] = 0.0f;
+ }
Source->HrtfOffset = 0;
}
else