From 8fa3f6da64c4cf18b5ea19fd28fada10ed275da9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 13 Jul 2017 23:13:02 -0700 Subject: Add the default auxiliary slot to the active slot array --- Alc/ALc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index ece66273..ccad718b 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -2549,8 +2549,17 @@ static ALvoid InitContext(ALCcontext *Context) InitUIntMap(&Context->SourceMap, Context->Device->SourcesMax); InitUIntMap(&Context->EffectSlotMap, Context->Device->AuxiliaryEffectSlotMax); - auxslots = al_calloc(DEF_ALIGN, sizeof(struct ALeffectslotArray)); - auxslots->count = 0; + if(Context->DefaultSlot) + { + auxslots = al_calloc(DEF_ALIGN, FAM_SIZE(struct ALeffectslotArray, slot, 1)); + auxslots->count = 1; + auxslots->slot[0] = Context->DefaultSlot; + } + else + { + auxslots = al_calloc(DEF_ALIGN, sizeof(struct ALeffectslotArray)); + auxslots->count = 0; + } ATOMIC_INIT(&Context->ActiveAuxSlots, auxslots); //Set globals -- cgit v1.2.3