aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-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();