From 2cb3b919139ca51d23d1ee12b5536c954808f7f0 Mon Sep 17 00:00:00 2001
From: Ray <raysan5@gmail.com>
Date: Tue, 23 Jul 2019 23:08:29 +0200
Subject: [PATCH] Try to avoid collision with CoreAudio on macOS

---
 src/raudio.c | 2 ++
 src/raylib.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/raudio.c b/src/raudio.c
index b03ca8a6..12141091 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -214,6 +214,8 @@ struct rAudioBuffer {
     unsigned char *buffer;
 };
 
+#define AudioBuffer rAudioBuffer    // HACK: To avoid CoreAudio (macOS) symbol collision
+
 // miniaudio global variables
 static ma_context context;
 static ma_device device;
diff --git a/src/raylib.h b/src/raylib.h
index 3dfcd2eb..31c5cb4d 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -423,7 +423,7 @@ typedef struct AudioStream {
     unsigned int sampleSize;        // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
     unsigned int channels;          // Number of channels (1-mono, 2-stereo)
 
-    AudioBuffer *buffer;            // Pointer to internal data used by the audio system
+    rAudioBuffer *buffer;           // Pointer to internal data used by the audio system
 } AudioStream;
 
 // Sound source type