Make some structs nested
[openal-soft.git] / core / effectslot.cpp
blob51fb8d468f9445a062706c2fe2b735f69febd065
2 #include "config.h"
4 #include "effectslot.h"
6 #include <stddef.h>
8 #include "almalloc.h"
9 #include "context.h"
12 EffectSlotArray *EffectSlot::CreatePtrArray(size_t count) noexcept
14 /* Allocate space for twice as many pointers, so the mixer has scratch
15 * space to store a sorted list during mixing.
17 void *ptr{al_calloc(alignof(EffectSlotArray), EffectSlotArray::Sizeof(count*2))};
18 return al::construct_at(static_cast<EffectSlotArray*>(ptr), count);
21 EffectSlot::~EffectSlot()
23 if(mWetBuffer)
24 mWetBuffer->mInUse = false;