mirror of
https://github.com/love2d/megasource.git
synced 2026-08-18 03:34:25 +02:00
Update OpenAL-soft to 1.21.1
This commit is contained in:
@@ -0,0 +1,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;
|
||||
}
|
||||
Reference in New Issue
Block a user