aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-06-07 14:53:22 -0700
committerChris Robinson <[email protected]>2009-06-07 14:53:22 -0700
commit0fac1e911565791e50c0d23ce515042a64c40696 (patch)
treeaf409aec23212d14ce917ba5ecacdf2e01f3da41 /Alc/ALc.c
parentf3a3358e63d5481fdfcb75856ae485b252767c47 (diff)
Store the max number of auxiliary slots in the device
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 905ac6e8..8812cdea 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -482,7 +482,6 @@ static ALvoid InitContext(ALCcontext *pContext)
pContext->lNumStereoSources = 1;
pContext->lNumMonoSources = pContext->Device->MaxNoOfSources - pContext->lNumStereoSources;
- pContext->AuxiliaryEffectSlotMax = GetConfigValueInt(NULL, "slots", 4);
pContext->NumSends = GetConfigValueInt(NULL, "sends", MAX_SENDS);
if(pContext->NumSends > MAX_SENDS)
pContext->NumSends = MAX_SENDS;
@@ -1288,6 +1287,10 @@ ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(const ALCchar *deviceName)
if((ALint)device->MaxNoOfSources <= 0)
device->MaxNoOfSources = 256;
+ device->AuxiliaryEffectSlotMax = GetConfigValueInt(NULL, "slots", 4);
+ if((ALint)device->AuxiliaryEffectSlotMax <= 0)
+ device->AuxiliaryEffectSlotMax = 4;
+
// Find a playback device to open
SuspendContext(NULL);
for(i = 0;BackendList[i].Init;i++)