diff options
-rw-r--r-- | core/hrtf.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/hrtf.cpp b/core/hrtf.cpp index d56c364e..80e38709 100644 --- a/core/hrtf.cpp +++ b/core/hrtf.cpp @@ -382,6 +382,10 @@ std::unique_ptr<HrtfStore> CreateHrtfStore(uint rate, uint8_t irSize, const al::span<const HrtfStore::Elevation> elevs, const HrirArray *coeffs, const ubyte2 *delays, const char *filename) { + static_assert(alignof(HrtfStore::Field) <= alignof(HrtfStore)); + static_assert(alignof(HrtfStore::Elevation) <= alignof(HrtfStore)); + static_assert(16 <= alignof(HrtfStore)); + const size_t irCount{size_t{elevs.back().azCount} + elevs.back().irOffset}; size_t total{sizeof(HrtfStore)}; total = RoundUp(total, alignof(HrtfStore::Field)); /* Align for field infos */ |