aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-09-08 22:32:30 -0700
committerChris Robinson <[email protected]>2012-09-08 22:32:30 -0700
commit2bf1979d4a805e661bdd43258a5020c96cda1f80 (patch)
tree9ee8042eaa1bb7586b622a27c873a17b98d1ef68 /Alc
parent89cab3cd393a8fd9b3fd9e33a19103108258e938 (diff)
Move the target effect slot to the SendParams struct
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c4
-rw-r--r--Alc/mixer.c7
-rw-r--r--Alc/mixer_defs.h6
-rw-r--r--Alc/mixer_inc.c5
4 files changed, 10 insertions, 12 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index d7b6025e..22f347f5 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -303,7 +303,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
Slot = Device->DefaultSlot;
if(Slot && Slot->effect.type == AL_EFFECT_NULL)
Slot = NULL;
- ALSource->Params.Slot[i] = Slot;
+ ALSource->Params.Send[i].Slot = Slot;
ALSource->Params.Send[i].Gain = WetGain[i];
}
@@ -440,7 +440,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
RoomAirAbsorption[i] = AIRABSORBGAINHF;
}
- ALSource->Params.Slot[i] = Slot;
+ ALSource->Params.Send[i].Slot = Slot;
}
/* Transform source to listener space (convert to head relative) */
diff --git a/Alc/mixer.c b/Alc/mixer.c
index d6686402..e6cab3be 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -437,11 +437,10 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo)
BufferSize);
for(j = 0;j < Device->NumAuxSends;j++)
{
- if(!Source->Params.Slot[j])
+ if(!Source->Params.Send[j].Slot)
continue;
- Source->Params.WetMix(Source, j, &Source->Params.Send[j],
- ResampledData, i, OutPos, SamplesToDo,
- BufferSize);
+ Source->Params.WetMix(&Source->Params.Send[j], ResampledData, i,
+ OutPos, SamplesToDo, BufferSize);
}
}
for(i = 0;i < BufferSize;i++)
diff --git a/Alc/mixer_defs.h b/Alc/mixer_defs.h
index 5c8e5a9f..fb3d3d8f 100644
--- a/Alc/mixer_defs.h
+++ b/Alc/mixer_defs.h
@@ -13,16 +13,16 @@ struct SendParams;
/* C mixers */
void MixDirect_Hrtf_C(struct ALsource*,ALCdevice*,struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixDirect_C(struct ALsource*,ALCdevice*,struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
-void MixSend_C(struct ALsource*,ALuint,struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
+void MixSend_C(struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
/* SSE mixers */
void MixDirect_Hrtf_SSE(struct ALsource*,ALCdevice*,struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixDirect_SSE(struct ALsource*,ALCdevice*,struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
-void MixSend_SSE(struct ALsource*,ALuint,struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
+void MixSend_SSE(struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
/* Neon mixers */
void MixDirect_Hrtf_Neon(struct ALsource*,ALCdevice*,struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
void MixDirect_Neon(struct ALsource*,ALCdevice*,struct DirectParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
-void MixSend_Neon(struct ALsource*,ALuint,struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
+void MixSend_Neon(struct SendParams*,const ALfloat*RESTRICT,ALuint,ALuint,ALuint,ALuint);
#endif /* MIXER_DEFS_H */
diff --git a/Alc/mixer_inc.c b/Alc/mixer_inc.c
index 6c10a660..ff12026b 100644
--- a/Alc/mixer_inc.c
+++ b/Alc/mixer_inc.c
@@ -192,8 +192,7 @@ void MixDirect(ALsource *Source, ALCdevice *Device, DirectParams *params,
}
-void MixSend(ALsource *Source, ALuint sendidx, SendParams *params,
- const ALfloat *RESTRICT data, ALuint srcchan,
+void MixSend(SendParams *params, const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
ALeffectslot *Slot;
@@ -205,7 +204,7 @@ void MixSend(ALsource *Source, ALuint sendidx, SendParams *params,
ALuint pos;
ALfloat value;
- Slot = Source->Params.Slot[sendidx];
+ Slot = params->Slot;
WetBuffer = Slot->WetBuffer;
WetClickRemoval = Slot->ClickRemoval;
WetPendingClicks = Slot->PendingClicks;