aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effectslot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/effectslot.cpp')
-rw-r--r--alc/effectslot.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/alc/effectslot.cpp b/alc/effectslot.cpp
new file mode 100644
index 00000000..f3324858
--- /dev/null
+++ b/alc/effectslot.cpp
@@ -0,0 +1,18 @@
+
+#include "config.h"
+
+#include "effectslot.h"
+
+#include <stddef.h>
+
+#include "almalloc.h"
+
+
+EffectSlotArray *EffectSlot::CreatePtrArray(size_t count) noexcept
+{
+ /* Allocate space for twice as many pointers, so the mixer has scratch
+ * space to store a sorted list during mixing.
+ */
+ void *ptr{al_calloc(alignof(EffectSlotArray), EffectSlotArray::Sizeof(count*2))};
+ return new(ptr) EffectSlotArray{count};
+}