Move an HRTF mixer parameter and shorten a couple variable names

This commit is contained in:
Chris Robinson
2014-05-18 11:05:38 -07:00
parent 9317ec59b9
commit ef9dfe3772
4 changed files with 28 additions and 33 deletions
+17 -21
View File
@@ -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);
}
}
+6 -6
View File
@@ -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);
+2 -3
View File
@@ -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];
+3 -3
View File
@@ -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);