diff --git a/src/audio/al-util.h b/src/audio/al-util.h index 0789db32..1aacfb1f 100644 --- a/src/audio/al-util.h +++ b/src/audio/al-util.h @@ -22,11 +22,8 @@ #ifndef ALUTIL_H #define ALUTIL_H -#ifdef MKXPZ_BUILD_XCODE -#include -#else #include -#endif +#include #include #include @@ -210,9 +207,13 @@ inline uint8_t formatSampleSize(int sdlFormat) case AUDIO_S16LSB : case AUDIO_S16MSB : return 2; + + case AUDIO_F32LSB : + case AUDIO_F32MSB : + return 4; default : - assert(!"Unhandled sample format"); + assert(!"Unhandled sample format"); } return 0; @@ -234,6 +235,12 @@ inline ALenum chooseALFormat(int sampleSize, int channelCount) case 1 : return AL_FORMAT_MONO16; case 2 : return AL_FORMAT_STEREO16; } + case 4 : + switch (channelCount) + { + case 1 : return AL_FORMAT_MONO_FLOAT32; + case 2 : return AL_FORMAT_STEREO_FLOAT32; + } default : assert(!"Unhandled sample size / channel count"); } diff --git a/src/eventthread.cpp b/src/eventthread.cpp index a5cb2916..4242957d 100644 --- a/src/eventthread.cpp +++ b/src/eventthread.cpp @@ -30,16 +30,10 @@ #include -#ifdef MKXPZ_BUILD_XCODE -#include -#include -#else + #include #include -#ifndef USE_MAC_OPENAL #include -#endif -#endif #include "sharedstate.h" #include "graphics.h" diff --git a/src/main.mm b/src/main.mm index 977afd7d..6616f4d4 100644 --- a/src/main.mm +++ b/src/main.mm @@ -20,13 +20,13 @@ */ #ifdef MKXPZ_BUILD_XCODE -#include #include "CocoaHelpers.hpp" #else -#include #import "icon.png.xxd" #endif +#include + #import #import #import diff --git a/src/meson.build b/src/meson.build index cf63a91e..e37baefb 100644 --- a/src/meson.build +++ b/src/meson.build @@ -5,7 +5,7 @@ vorbisfile = dependency('vorbisfile', static: build_static) sdl2 = dependency('sdl2', static: build_static) sdl2_ttf = dependency('SDL2_ttf', static: build_static) sdl2_image = dependency('SDL2_image', static: build_static) -openal = dependency('openal', static: build_static) +openal = dependency('openal', static: build_static, method: 'pkg-config') zlib = dependency('zlib', static: build_static)