Browse Source

Corrected issue with OpenAL being 'keg only' on OSX

Also reviewed issue with stdbool when compiling with clang
pull/229/head
raysan5 8 years ago
parent
commit
05f039f85f
4 changed files with 14 additions and 14 deletions
  1. +1
    -1
      examples/Makefile
  2. +9
    -4
      src/audio.c
  3. +1
    -2
      src/external/jar_mod.h
  4. +3
    -7
      src/raylib.h

+ 1
- 1
examples/Makefile View File

@ -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

+ 9
- 4
src/audio.c View File

@ -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
#endif

+ 1
- 2
src/external/jar_mod.h View File

@ -83,8 +83,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
//#include <stdbool.h>
#ifdef __cplusplus

+ 3
- 7
src/raylib.h View File

@ -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 <stdbool.h>
#if !defined(_STDBOOL_H)
typedef enum { false, true } bool;
#define _STDBOOL_H
#endif
#endif

Loading…
Cancel
Save