🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
562 B

  1. #include "config.h"
  2. #include "effectslot.h"
  3. #include <stddef.h>
  4. #include "almalloc.h"
  5. #include "context.h"
  6. EffectSlotArray *EffectSlot::CreatePtrArray(size_t count) noexcept
  7. {
  8. /* Allocate space for twice as many pointers, so the mixer has scratch
  9. * space to store a sorted list during mixing.
  10. */
  11. void *ptr{al_calloc(alignof(EffectSlotArray), EffectSlotArray::Sizeof(count*2))};
  12. return al::construct_at(static_cast<EffectSlotArray*>(ptr), count);
  13. }
  14. EffectSlot::~EffectSlot()
  15. {
  16. if(mWetBuffer)
  17. mWetBuffer->mInUse = false;
  18. }