From ebbefadf6c883b102ffad2967da0f000ccd1e507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 26 Oct 2013 20:33:54 +0200 Subject: [PATCH] Audio: work around issue with different typedef for ALbyte on OSX. In OpenAL-Soft (Linux, Windows) `ALbyte` is defined as `signed char`, while it is defined as `char` on OSX. Don't know why. --- src/Audio/Audio.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Audio/Audio.cpp b/src/Audio/Audio.cpp index 25c70e5e4c..fa382b1009 100644 --- a/src/Audio/Audio.cpp +++ b/src/Audio/Audio.cpp @@ -31,7 +31,12 @@ namespace Magnum { namespace Audio { /* Verify types */ static_assert(std::is_same::value, "ALubyte is not the same as UnsignedByte"); +/** @todo Why `ALbyte` is defined as `char` and not `signed char` on OSX? */ +#ifndef __APPLE__ static_assert(std::is_same::value, "ALbyte is not the same as Byte"); +#else +static_assert(std::is_signed::value && sizeof(ALbyte) == 1, "ALbyte does not have the same characteristics as Byte"); +#endif static_assert(std::is_same::value, "ALushort is not the same as UnsignedShort"); static_assert(std::is_same::value, "ALshort is not the same as Short"); static_assert(std::is_same::value, "ALuint is not the same as UnsignedInt");