diff options
author | Chris Robinson <[email protected]> | 2017-07-13 23:13:02 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-07-13 23:13:02 -0700 |
commit | 8fa3f6da64c4cf18b5ea19fd28fada10ed275da9 (patch) | |
tree | e845a1586189b468e4c8011a63765eb48830a3b2 /Alc/ALc.c | |
parent | 249afde5f9363384649fc3993bde9dc26c75df4c (diff) |
Add the default auxiliary slot to the active slot array
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 |