blob: 8abac2480fed45935b59413d5db7f8448c2e813e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "config.h"
#include "effectslot.h"
#include <stddef.h>
#include "alcontext.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};
}
EffectSlot::~EffectSlot()
{
if(mWetBuffer)
mWetBuffer->mInUse = false;
}
|