summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJosh de Kock <josh@itanimul.li>2016-08-21 22:59:08 +0100
committerwm4 <wm4@nowhere>2016-09-21 12:43:14 +0200
commitaf6126adbe61fb2b6cc780025246d33df93072e6 (patch)
treeda06f8fb3eef6123f74645723e8c91a8d263d55a /audio
parentd080851a3049174fc8a329f5930bc46272b448dc (diff)
downloadmpv-af6126adbe61fb2b6cc780025246d33df93072e6.tar.bz2
mpv-af6126adbe61fb2b6cc780025246d33df93072e6.tar.xz
ao_openal: enable building on OSX
Signed-off-by: Josh de Kock <josh@itanimul.li>
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_openal.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/audio/out/ao_openal.c b/audio/out/ao_openal.c
index 237226e4a5..aba049445d 100644
--- a/audio/out/ao_openal.c
+++ b/audio/out/ao_openal.c
@@ -24,6 +24,19 @@
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
+
+#ifdef __APPLE__
+#ifndef AL_FORMAT_MONO_FLOAT32
+#define AL_FORMAT_MONO_FLOAT32 0x10010
+#endif
+#ifndef AL_FORMAT_STEREO_FLOAT32
+#define AL_FORMAT_STEREO_FLOAT32 0x10011
+#endif
+#ifndef AL_FORMAT_MONO_DOUBLE_EXT
+#define AL_FORMAT_MONO_DOUBLE_EXT 0x10012
+#endif
+#include <OpenAL/MacOSX_OALExtensions.h>
+#else
#ifdef OPENAL_AL_H
#include <OpenAL/alc.h>
#include <OpenAL/al.h>
@@ -33,6 +46,7 @@
#include <AL/al.h>
#include <AL/alext.h>
#endif
+#endif // __APPLE__
#include "common/msg.h"