From 05f039f85fb43f9ae4598747a4d9c6770ec5774b Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sat, 11 Feb 2017 23:34:41 +0100 Subject: [PATCH] Corrected issue with OpenAL being 'keg only' on OSX Also reviewed issue with stdbool when compiling with clang --- examples/Makefile | 2 +- src/audio.c | 13 +++++++++---- src/external/jar_mod.h | 3 +-- src/raylib.h | 10 +++------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 80437590..bef0fa11 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -153,7 +153,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for OS X 10.9 desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -framework OpenGL -framework OpenAl -framework Cocoa + LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAL -framework Cocoa else # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed diff --git a/src/audio.c b/src/audio.c index eb5e65d6..58699035 100644 --- a/src/audio.c +++ b/src/audio.c @@ -59,9 +59,14 @@ #include "utils.h" // Required for: fopen() Android mapping, TraceLog() #endif -#include "AL/al.h" // OpenAL basic header -#include "AL/alc.h" // OpenAL context header (like OpenGL, OpenAL requires a context to work) -//#include "AL/alext.h" // OpenAL extensions header, required for AL_EXT_FLOAT32 and AL_EXT_MCFORMATS +#ifdef __APPLE__ + #include "OpenAL/al.h" // OpenAL basic header + #include "OpenAL/alc.h" // OpenAL context header (like OpenGL, OpenAL requires a context to work) +#else + #include "AL/al.h" // OpenAL basic header + #include "AL/alc.h" // OpenAL context header (like OpenGL, OpenAL requires a context to work) + //#include "AL/alext.h" // OpenAL extensions header, required for AL_EXT_FLOAT32 and AL_EXT_MCFORMATS +#endif // OpenAL extension: AL_EXT_FLOAT32 - Support for 32bit float samples // OpenAL extension: AL_EXT_MCFORMATS - Support for multi-channel formats (Quad, 5.1, 6.1, 7.1) @@ -1252,4 +1257,4 @@ void TraceLog(int msgType, const char *text, ...) if (msgType == ERROR) exit(1); // If ERROR message, exit program } -#endif \ No newline at end of file +#endif diff --git a/src/external/jar_mod.h b/src/external/jar_mod.h index bee9f6ee..c17130a6 100644 --- a/src/external/jar_mod.h +++ b/src/external/jar_mod.h @@ -83,8 +83,7 @@ #include #include -#include - +//#include #ifdef __cplusplus diff --git a/src/raylib.h b/src/raylib.h index a5849180..800ab2be 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -296,13 +296,9 @@ //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef __APPLE__ - #if !defined(_STDBOOL_H) - typedef enum { false, true } bool; - #define _STDBOOL_H - #endif - #else - #include + #if !defined(_STDBOOL_H) + typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif