aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-02 13:35:13 -0700
committerChris Robinson <[email protected]>2011-05-02 13:35:13 -0700
commitabdc254e550b68d20d2bca26886d6edf5beea59a (patch)
treed7019005dc5f55304fe7f953d27cdb10f3039e86 /Alc/mixer.c
parentf843b7e2e362d3fc521771cdf8847de0a6f3a8d0 (diff)
Use a pointer-to-arrays for the local HRTF coefficients
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 6afb7de8..ae7ba237 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -78,7 +78,7 @@ void Mix_Hrtf_##T##_1_##sampler(ALsource *Source, ALCdevice *Device, \
ALfloat (*DryBuffer)[MAXCHANNELS]; \
ALfloat *ClickRemoval, *PendingClicks; \
ALuint pos, frac; \
- const ALfloat *HrtfCoeffs; \
+ const ALfloat (*HrtfCoeffs)[2]; \
ALfloat *HrtfHistory; \
ALuint HrtfOffset; \
FILTER *DryFilter; \
@@ -94,7 +94,7 @@ void Mix_Hrtf_##T##_1_##sampler(ALsource *Source, ALCdevice *Device, \
PendingClicks = Device->PendingClicks; \
DryFilter = &Source->Params.iirFilter; \
\
- HrtfCoeffs = &Source->Params.HrtfCoeffs[0][0][0]; \
+ HrtfCoeffs = Source->Params.HrtfCoeffs[0]; \
HrtfHistory = Source->HrtfHistory[0]; \
HrtfOffset = Source->HrtfOffset + OutPos; \
\
@@ -111,10 +111,10 @@ void Mix_Hrtf_##T##_1_##sampler(ALsource *Source, ALCdevice *Device, \
{ \
ClickRemoval[FRONT_LEFT] -= \
HrtfHistory[(HrtfOffset-c)&HRTF_LENGTH_MASK] * \
- HrtfCoeffs[c*2 + 0]; \
+ HrtfCoeffs[c][0]; \
ClickRemoval[FRONT_RIGHT] -= \
HrtfHistory[(HrtfOffset-c)&HRTF_LENGTH_MASK] * \
- HrtfCoeffs[c*2 + 1]; \
+ HrtfCoeffs[c][1]; \
} \
} \
for(BufferIdx = 0;BufferIdx < BufferSize;BufferIdx++) \
@@ -129,10 +129,10 @@ void Mix_Hrtf_##T##_1_##sampler(ALsource *Source, ALCdevice *Device, \
{ \
DryBuffer[OutPos][FRONT_LEFT] += \
HrtfHistory[(HrtfOffset-c)&HRTF_LENGTH_MASK] * \
- HrtfCoeffs[c*2 + 0]; \
+ HrtfCoeffs[c][0]; \
DryBuffer[OutPos][FRONT_RIGHT] += \
HrtfHistory[(HrtfOffset-c)&HRTF_LENGTH_MASK] * \
- HrtfCoeffs[c*2 + 1]; \
+ HrtfCoeffs[c][1]; \
} \
HrtfOffset++; \
\
@@ -151,10 +151,10 @@ void Mix_Hrtf_##T##_1_##sampler(ALsource *Source, ALCdevice *Device, \
{ \
PendingClicks[FRONT_LEFT] += \
HrtfHistory[(HrtfOffset-c)&HRTF_LENGTH_MASK] * \
- HrtfCoeffs[c*2 + 0]; \
+ HrtfCoeffs[c][0]; \
PendingClicks[FRONT_RIGHT] += \
HrtfHistory[(HrtfOffset-c)&HRTF_LENGTH_MASK] * \
- HrtfCoeffs[c*2 + 1]; \
+ HrtfCoeffs[c][1]; \
} \
} \
\