DEADSOFTWARE

sdl2: fix building with sdl2 on linux
[flatwaifu.git] / src / openal / sound.c
index d046803dc4d0f0018d6039b5e73e3b91726160bb..73d36a42968a46e87f3548c900257a0dd84635a8 100644 (file)
@@ -6,9 +6,15 @@
 #include "misc.h" // int2host
 #include "error.h" // logo
 
-#include <OpenAL/al.h>
-#include <OpenAL/alc.h>
-#include <SDL.h> // SDL_BuildAudioCVT SDL_ConvertAudio
+#ifdef __APPLE__
+#  include <OpenAL/al.h>
+#  include <OpenAL/alc.h>
+#else
+#  include <AL/al.h>
+#  include <AL/alc.h>
+#endif
+
+#include "SDL.h" // SDL_BuildAudioCVT SDL_ConvertAudio
 #include <assert.h>
 #include <stdlib.h> // malloc
 #include <string.h> // memcpy
@@ -177,7 +183,7 @@ void S_free (snd_t *s) {
   ALint h;
   openal_snd *snd = (openal_snd*)s;
   if (snd != NULL) {
-    assert(snd->base.tag = TAG_OAL1);
+    assert(snd->base.tag == TAG_OAL1);
     if (context != NULL) {
       for (i = 0; i < MAX_CHANNELS; i++) {
         alGetSourcei(sources[i], AL_BUFFER, &h);