aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alu.h22
-rw-r--r--OpenAL32/alSource.c6
2 files changed, 14 insertions, 14 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index bf2a7f77..36e81e0b 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -40,18 +40,15 @@ extern "C" {
#endif
typedef struct HrtfState {
- alignas(16) ALfloat History[MAX_INPUT_CHANNELS][SRC_HISTORY_LENGTH];
- alignas(16) ALfloat Values[MAX_INPUT_CHANNELS][HRIR_LENGTH][2];
+ alignas(16) ALfloat History[SRC_HISTORY_LENGTH];
+ alignas(16) ALfloat Values[HRIR_LENGTH][2];
} HrtfState;
typedef struct HrtfParams {
- ALfloat Gain;
- ALfloat Dir[3];
- alignas(16) ALfloat Coeffs[MAX_INPUT_CHANNELS][HRIR_LENGTH][2];
- alignas(16) ALfloat CoeffStep[MAX_INPUT_CHANNELS][HRIR_LENGTH][2];
- ALuint Delay[MAX_INPUT_CHANNELS][2];
- ALint DelayStep[MAX_INPUT_CHANNELS][2];
- ALuint IrSize;
+ alignas(16) ALfloat Coeffs[HRIR_LENGTH][2];
+ alignas(16) ALfloat CoeffStep[HRIR_LENGTH][2];
+ ALuint Delay[2];
+ ALint DelayStep[2];
} HrtfParams;
typedef struct DirectParams {
@@ -59,8 +56,11 @@ typedef struct DirectParams {
union {
struct {
- HrtfParams Params;
- HrtfState State;
+ HrtfParams Params[MAX_INPUT_CHANNELS];
+ HrtfState State[MAX_INPUT_CHANNELS];
+ ALuint IrSize;
+ ALfloat Gain;
+ ALfloat Dir[3];
} Hrtf;
/* A mixing matrix. First subscript is the channel number of the input
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index acccd0be..1a1d696f 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2347,11 +2347,11 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
for(j = 0;j < MAX_INPUT_CHANNELS;j++)
{
for(k = 0;k < SRC_HISTORY_LENGTH;k++)
- src->Direct.Mix.Hrtf.State.History[j][k] = 0.0f;
+ src->Direct.Mix.Hrtf.State[j].History[k] = 0.0f;
for(k = 0;k < HRIR_LENGTH;k++)
{
- src->Direct.Mix.Hrtf.State.Values[j][k][0] = 0.0f;
- src->Direct.Mix.Hrtf.State.Values[j][k][1] = 0.0f;
+ src->Direct.Mix.Hrtf.State[j].Values[k][0] = 0.0f;
+ src->Direct.Mix.Hrtf.State[j].Values[k][1] = 0.0f;
}
}
for(i = 0;i < device->NumAuxSends;i++)