]> git.tdb.fi Git - ext/openal.git/blob - core/effectslot.cpp
Tweak some types to work around an MSVC compile error
[ext/openal.git] / core / effectslot.cpp
1
2 #include "config.h"
3
4 #include "effectslot.h"
5
6 #include <stddef.h>
7
8 #include "almalloc.h"
9 #include "context.h"
10
11
12 EffectSlotArray *EffectSlot::CreatePtrArray(size_t count) noexcept
13 {
14     /* Allocate space for twice as many pointers, so the mixer has scratch
15      * space to store a sorted list during mixing.
16      */
17     void *ptr{al_calloc(alignof(EffectSlotArray), EffectSlotArray::Sizeof(count*2))};
18     return al::construct_at(static_cast<EffectSlotArray*>(ptr), count);
19 }