aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-18 17:09:08 -0800
committerChris Robinson <[email protected]>2012-02-18 17:09:08 -0800
commit6ac16867b43ae039a19f9967294f47d6cc311de0 (patch)
treeea1b1fb3b8e447d78412ffe943c8021a32648841 /Alc
parentbbc679a5db2e000c8638295d58ce97df2695b6c5 (diff)
Only set a default slot for non-NULL effect types
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index b399b692..a08419a9 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2589,9 +2589,12 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
device->NumStereoSources = 1;
device->NumMonoSources = device->MaxNoOfSources - device->NumStereoSources;
- device->DefaultSlot = (ALeffectslot*)(device+1);
- if(InitEffectSlot(device->DefaultSlot) != AL_NO_ERROR)
- device->DefaultSlot = NULL;
+ if(ForcedEffect.type != AL_EFFECT_NULL)
+ {
+ device->DefaultSlot = (ALeffectslot*)(device+1);
+ if(InitEffectSlot(device->DefaultSlot) != AL_NO_ERROR)
+ device->DefaultSlot = NULL;
+ }
// Find a playback device to open
LockLists();