Skip to content

Commit 7ce936a

Browse files
committed
Use new SDL_ALIGNED macro.
1 parent e1816a2 commit 7ce936a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

mojoal.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,6 @@ The locking strategy for this OpenAL implementation:
205205
#define restrict __restrict
206206
#endif
207207

208-
#ifdef _MSC_VER
209-
#define SIMDALIGNEDSTRUCT __declspec(align(16)) struct
210-
#elif (defined(__GNUC__) || defined(__clang__))
211-
#define SIMDALIGNEDSTRUCT struct __attribute__((aligned(16)))
212-
#else
213-
#define SIMDALIGNEDSTRUCT struct
214-
#endif
215-
216208
#if defined(SDL_SSE_INTRINSICS) /* we assume you always have this on x86/x86-64 chips. SSE1 is 20+ years old! */
217209
#define has_sse 1
218210
#endif
@@ -510,7 +502,7 @@ typedef struct PitchState
510502

511503
typedef struct ALsource ALsource;
512504

513-
SIMDALIGNEDSTRUCT ALsource
505+
struct SDL_ALIGNED(16) ALsource /* aligned to 16 bytes for SIMD support */
514506
{
515507
/* keep these first to help guarantee that its elements are aligned for SIMD */
516508
ALfloat position[4];
@@ -594,7 +586,7 @@ struct ALCdevice_struct
594586
struct ALCcontext_struct
595587
{
596588
/* keep these first to help guarantee that its elements are aligned for SIMD */
597-
SIMDALIGNEDSTRUCT {
589+
struct SDL_ALIGNED(16) {
598590
ALfloat position[4];
599591
ALfloat velocity[4];
600592
ALfloat orientation[8];

0 commit comments

Comments
 (0)