From 60785eab8e7c893b652ca8ebfa031a70588c6683 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 15 Feb 2012 21:47:35 -0800 Subject: Move the endian test macro to alMain.h --- OpenAL32/Include/alMain.h | 7 +++++++ OpenAL32/alBuffer.c | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 22220dff..8427f83b 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -99,6 +99,13 @@ typedef ptrdiff_t ALsizeiptrEXT; #endif +static const union { + ALuint u; + ALubyte b[sizeof(ALuint)]; +} EndianTest = { 1 }; +#define IS_LITTLE_ENDIAN (EndianTest.b[0] == 1) + + #ifdef _WIN32 #include diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 2d75a24e..6a3bb114 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -1245,11 +1245,6 @@ static void EncodeIMA4Block(ALima4 *dst, const ALshort *src, ALint *sample, ALin } } -static const union { - ALuint u; - ALubyte b[sizeof(ALuint)]; -} EndianTest = { 1 }; -#define IS_LITTLE_ENDIAN (EndianTest.b[0] == 1) static __inline ALint DecodeByte3(ALbyte3 val) { -- cgit v1.2.3