aboutsummaryrefslogtreecommitdiffstats
path: root/core/hrtf.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/hrtf.h')
-rw-r--r--core/hrtf.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/hrtf.h b/core/hrtf.h
index 7a1a8b69..882724b8 100644
--- a/core/hrtf.h
+++ b/core/hrtf.h
@@ -18,7 +18,7 @@
#include "mixer/hrtfdefs.h"
-struct HrtfStore {
+struct alignas(16) HrtfStore {
std::atomic<uint> mRef;
uint mSampleRate : 24;
@@ -47,7 +47,14 @@ struct HrtfStore {
void add_ref();
void dec_ref();
- DEF_PLACE_NEWDEL
+ void *operator new(size_t) = delete;
+ void *operator new[](size_t) = delete;
+ void operator delete[](void*) noexcept = delete;
+
+ void operator delete(gsl::owner<void*> block, void*) noexcept
+ { ::operator delete[](block, std::align_val_t{alignof(HrtfStore)}); }
+ void operator delete(gsl::owner<void*> block) noexcept
+ { ::operator delete[](block, std::align_val_t{alignof(HrtfStore)}); }
};
using HrtfStorePtr = al::intrusive_ptr<HrtfStore>;