Browse Source

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.
pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
ebbefadf6c
  1. 5
      src/Audio/Audio.cpp

5
src/Audio/Audio.cpp

@ -31,7 +31,12 @@ namespace Magnum { namespace Audio {
/* Verify types */
static_assert(std::is_same<ALubyte, UnsignedByte>::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<ALbyte, Byte>::value, "ALbyte is not the same as Byte");
#else
static_assert(std::is_signed<ALbyte>::value && sizeof(ALbyte) == 1, "ALbyte does not have the same characteristics as Byte");
#endif
static_assert(std::is_same<ALushort, UnsignedShort>::value, "ALushort is not the same as UnsignedShort");
static_assert(std::is_same<ALshort, Short>::value, "ALshort is not the same as Short");
static_assert(std::is_same<ALuint, UnsignedInt>::value, "ALuint is not the same as UnsignedInt");

Loading…
Cancel
Save