From 86ef115e21cf93d08b2273278b25cae702a86024 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 23 Jan 2012 06:29:03 -0800 Subject: Set the source's slot send parameter to NULL if it's the AL_EFFECT_NULL type --- Alc/ALu.c | 3 +++ Alc/mixer.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index 5b5b6d5c..96a46aeb 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -297,6 +297,8 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) if(!Slot && i == 0) Slot = Device->DefaultSlot; + if(Slot && Slot->effect.type == AL_EFFECT_NULL) + Slot = NULL; ALSource->Params.Send[i].Slot = Slot; ALSource->Params.Send[i].WetGain = WetGain[i] * ListenerGain; } @@ -400,6 +402,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) Slot = Device->DefaultSlot; if(!Slot || Slot->effect.type == AL_EFFECT_NULL) { + Slot = NULL; RoomRolloff[i] = 0.0f; DecayDistance[i] = 0.0f; RoomAirAbsorption[i] = 1.0f; diff --git a/Alc/mixer.c b/Alc/mixer.c index 0181a31a..8b3c754e 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -251,7 +251,7 @@ static void Mix_Hrtf_##T##_##sampler(ALsource *Source, ALCdevice *Device, \ ALfloat *RESTRICT WetPendingClicks; \ FILTER *WetFilter; \ \ - if(!Slot || Slot->effect.type == AL_EFFECT_NULL) \ + if(Slot == NULL) \ continue; \ \ WetBuffer = Slot->WetBuffer; \ @@ -381,7 +381,7 @@ static void Mix_##T##_##sampler(ALsource *Source, ALCdevice *Device, \ ALfloat *WetPendingClicks; \ FILTER *WetFilter; \ \ - if(!Slot || Slot->effect.type == AL_EFFECT_NULL) \ + if(Slot == NULL) \ continue; \ \ WetBuffer = Slot->WetBuffer; \ -- cgit v1.2.3