diff options
author | Chris Robinson <[email protected]> | 2013-10-06 10:11:01 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-10-06 10:11:01 -0700 |
commit | 6425480d40e2a1b150c208db0421eabb51fe0624 (patch) | |
tree | 51e7c60d51b3a34f96f46237c6925017173cd32d /Alc/ALu.c | |
parent | 8448b94c0bf3f0ddbd040b25a68ff0ca2dcc37bd (diff) |
Don't store the effect slot in SendParams
This makes it much more like DirectParams.
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 29 |
1 files changed, 24 insertions, 5 deletions
@@ -437,12 +437,20 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) for(i = 0;i < NumSends;i++) { ALeffectslot *Slot = ALSource->Send[i].Slot; - if(!Slot && i == 0) Slot = Device->DefaultSlot; - if(Slot && Slot->EffectType == AL_EFFECT_NULL) - Slot = NULL; - ALSource->Params.Send[i].Slot = Slot; + if(!Slot || Slot->EffectType == AL_EFFECT_NULL) + { + ALSource->Params.Send[i].OutBuffer = NULL; + ALSource->Params.Send[i].ClickRemoval = NULL; + ALSource->Params.Send[i].PendingClicks = NULL; + } + else + { + ALSource->Params.Send[i].OutBuffer = Slot->WetBuffer; + ALSource->Params.Send[i].ClickRemoval = Slot->ClickRemoval; + ALSource->Params.Send[i].PendingClicks = Slot->PendingClicks; + } ALSource->Params.Send[i].Gain = WetGain[i]; } @@ -574,7 +582,18 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) RoomAirAbsorption[i] = AIRABSORBGAINHF; } - ALSource->Params.Send[i].Slot = Slot; + if(!Slot || Slot->EffectType == AL_EFFECT_NULL) + { + ALSource->Params.Send[i].OutBuffer = NULL; + ALSource->Params.Send[i].ClickRemoval = NULL; + ALSource->Params.Send[i].PendingClicks = NULL; + } + else + { + ALSource->Params.Send[i].OutBuffer = Slot->WetBuffer; + ALSource->Params.Send[i].ClickRemoval = Slot->ClickRemoval; + ALSource->Params.Send[i].PendingClicks = Slot->PendingClicks; + } } /* Transform source to listener space (convert to head relative) */ |