aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-18 11:05:38 -0700
committerChris Robinson <[email protected]>2014-05-18 11:05:38 -0700
commitef9dfe3772b7dd8db641ca841eb3704b23f9ac7e (patch)
tree55c36b74a0a74e4c574784240ef53122c78bf5db
parent9317ec59b99af1b598de1c302470113a77da966d (diff)
Move an HRTF mixer parameter and shorten a couple variable names
-rw-r--r--Alc/mixer.c38
-rw-r--r--Alc/mixer_defs.h12
-rw-r--r--Alc/mixer_inc.c5
-rw-r--r--OpenAL32/Include/alu.h6
4 files changed, 28 insertions, 33 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index e90bb482..7b0b9d30 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -345,37 +345,33 @@ ALvoid MixSource(ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo)
increment, ResampledData, DstBufferSize);
{
- DirectParams *directparms = &src->Direct;
+ DirectParams *parms = &src->Direct;
- DoFilters(&directparms->LpFilter[chan], &directparms->HpFilter[chan],
- SrcData, ResampledData, DstBufferSize,
- directparms->Filters[chan]);
+ DoFilters(&parms->LpFilter[chan], &parms->HpFilter[chan], SrcData,
+ ResampledData, DstBufferSize, parms->Filters[chan]);
if(!src->IsHrtf)
- src->Dry.Mix(directparms->OutBuffer, SrcData,
- &directparms->Mix.Gains[chan],
- maxu(directparms->Counter, OutPos) - OutPos,
- OutPos, DstBufferSize);
+ src->Dry.Mix(parms->OutBuffer, SrcData, &parms->Mix.Gains[chan],
+ maxu(parms->Counter, OutPos) - OutPos, OutPos,
+ DstBufferSize);
else
- src->Dry.HrtfMix(directparms->OutBuffer, SrcData,
- maxu(directparms->Counter, OutPos) - OutPos,
- directparms->Offset + OutPos,
- directparms->Mix.Hrtf.IrSize,
- &directparms->Mix.Hrtf.Params[chan],
- &directparms->Mix.Hrtf.State[chan],
- OutPos, DstBufferSize);
+ src->Dry.HrtfMix(parms->OutBuffer, SrcData,
+ maxu(parms->Counter, OutPos) - OutPos,
+ parms->Offset + OutPos, OutPos,
+ parms->Mix.Hrtf.IrSize, &parms->Mix.Hrtf.Params[chan],
+ &parms->Mix.Hrtf.State[chan], DstBufferSize);
}
for(j = 0;j < Device->NumAuxSends;j++)
{
- SendParams *sendparms = &src->Send[j];
- if(!sendparms->OutBuffer)
+ SendParams *parms = &src->Send[j];
+ if(!parms->OutBuffer)
continue;
- DoFilters(&sendparms->LpFilter[chan], &sendparms->HpFilter[chan],
+ DoFilters(&parms->LpFilter[chan], &parms->HpFilter[chan],
SrcData, ResampledData, DstBufferSize,
- sendparms->Filters[chan]);
- src->WetMix(sendparms->OutBuffer, SrcData, &sendparms->Gain,
- maxu(sendparms->Counter, OutPos) - OutPos,
+ parms->Filters[chan]);
+ src->WetMix(parms->OutBuffer, SrcData, &parms->Gain,
+ maxu(parms->Counter, OutPos) - OutPos,
OutPos, DstBufferSize);
}
}
diff --git a/Alc/mixer_defs.h b/Alc/mixer_defs.h
index b19a847c..130743c5 100644
--- a/Alc/mixer_defs.h
+++ b/Alc/mixer_defs.h
@@ -20,9 +20,9 @@ void Resample_cubic32_C(const ALfloat *src, ALuint frac, ALuint increment, ALflo
/* C mixers */
void MixDirect_Hrtf_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
- ALuint Counter, ALuint Offset, const ALuint IrSize,
+ ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
- ALuint OutPos, ALuint BufferSize);
+ ALuint BufferSize);
void MixDirect_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
struct MixGains *Gains, ALuint Counter, ALuint OutPos,
ALuint BufferSize);
@@ -32,9 +32,9 @@ void MixSend_C(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
/* SSE mixers */
void MixDirect_Hrtf_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
- ALuint Counter, ALuint Offset, const ALuint IrSize,
+ ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
- ALuint OutPos, ALuint BufferSize);
+ ALuint BufferSize);
void MixDirect_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
struct MixGains *Gains, ALuint Counter, ALuint OutPos,
ALuint BufferSize);
@@ -44,9 +44,9 @@ void MixSend_SSE(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
/* Neon mixers */
void MixDirect_Hrtf_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
- ALuint Counter, ALuint Offset, const ALuint IrSize,
+ ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
const struct HrtfParams *hrtfparams, struct HrtfState *hrtfstate,
- ALuint OutPos, ALuint BufferSize);
+ ALuint BufferSize);
void MixDirect_Neon(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
struct MixGains *Gains, ALuint Counter, ALuint OutPos,
ALuint BufferSize);
diff --git a/Alc/mixer_inc.c b/Alc/mixer_inc.c
index f22190d8..7c90ae9c 100644
--- a/Alc/mixer_inc.c
+++ b/Alc/mixer_inc.c
@@ -26,9 +26,8 @@ static inline void ApplyCoeffs(ALuint Offset, ALfloat (*restrict Values)[2],
void MixDirect_Hrtf(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
- ALuint Counter, ALuint Offset, const ALuint IrSize,
- const HrtfParams *hrtfparams, HrtfState *hrtfstate,
- ALuint OutPos, ALuint BufferSize)
+ ALuint Counter, ALuint Offset, ALuint OutPos, const ALuint IrSize,
+ const HrtfParams *hrtfparams, HrtfState *hrtfstate, ALuint BufferSize)
{
alignas(16) ALfloat Coeffs[HRIR_LENGTH][2];
ALuint Delay[2];
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 4d0beb38..254b15e3 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -123,9 +123,9 @@ typedef void (*DryMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const AL
MixGains *Gains, ALuint Counter, ALuint OutPos,
ALuint BufferSize);
typedef void (*HrtfMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
- ALuint Counter, ALuint Offset, const ALuint IrSize,
- const HrtfParams *hrtfparams, HrtfState *hrtfstate,
- ALuint OutPos, ALuint BufferSize);
+ ALuint Counter, ALuint Offset, ALuint OutPos,
+ const ALuint IrSize, const HrtfParams *hrtfparams,
+ HrtfState *hrtfstate, ALuint BufferSize);
typedef void (*WetMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat *data,
MixGainMono *Gain, ALuint Counter, ALuint OutPos,
ALuint BufferSize);