From 4417c437213e5c40f34e69c4ab4b23f439453873 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Apr 2020 22:12:35 -0400 Subject: [PATCH] AudioMatrix: Use alignas(16) for Coefs --- lib/audiodev/AudioMatrix.hpp | 8 ++++---- lib/audiodev/AudioMatrixSSE.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/audiodev/AudioMatrix.hpp b/lib/audiodev/AudioMatrix.hpp index 931295d..ccc31f1 100644 --- a/lib/audiodev/AudioMatrix.hpp +++ b/lib/audiodev/AudioMatrix.hpp @@ -34,8 +34,8 @@ class AudioMatrixMono { union Coefs { float v[8]; #if __SSE__ - __m128 q[2]; - __m64 d[4]; + alignas(16) __m128 q[2]; + alignas(16) __m64 d[4]; #endif }; Coefs m_coefs = {}; @@ -88,8 +88,8 @@ class AudioMatrixStereo { union Coefs { float v[8][2]; #if __SSE__ - __m128 q[4]; - __m64 d[8]; + alignas(16) __m128 q[4]; + alignas(16) __m64 d[8]; #endif }; Coefs m_coefs = {}; diff --git a/lib/audiodev/AudioMatrixSSE.cpp b/lib/audiodev/AudioMatrixSSE.cpp index ac8b6de..11a1616 100644 --- a/lib/audiodev/AudioMatrixSSE.cpp +++ b/lib/audiodev/AudioMatrixSSE.cpp @@ -8,8 +8,8 @@ namespace boo { union TVectorUnion { float v[4]; #if __SSE__ - __m128 q; - __m64 d[2]; + alignas(16) __m128 q; + alignas(16) __m64 d[2]; #endif };