go back to include openal headers without OS-specific directory
prefixes.  add OPENAL_INCLUDE_DIR to INCLUDE_DIRECTORIES in the
cmake'ry for openal-enabled builds.  add ALSA_INCLUDE_DIR to
INCLUDE_DIRECTORIES in the cmake'ry for alsa-enabled builds.
FIXME: we need to add XXX_INCLUDE_DIR only to the wildmidi
target in src/CMakeLists.txt using TARGET_INCLUDE_DIRECTORIES(),
but that requires cmake-2.8.11 or newer, so we are doing it in
the top-level CMakeLists.txt fgor now.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b88aa70..dd30f4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,7 +123,7 @@ IF(UNIX AND NOT APPLE)

         FIND_PACKAGE(ALSA)
         FIND_PACKAGE(OSS)
-        FIND_PACKAGE(OpenAL)
+        INCLUDE(FindOpenAL)

         IF(WANT_ALSA)
             IF(NOT ALSA_FOUND)
@@ -131,6 +131,10 @@ IF(UNIX AND NOT APPLE)
             ENDIF()
             SET(AUDIODRV_ALSA 1)
             SET(AUDIO_LIBRARY ${ALSA_LIBRARY})
+            # FIXME: we need to add ALSA_INCLUDE_DIR only to the wildmidi
+            # target in src/CMakeLists.txt using TARGET_INCLUDE_DIRECTORIES()
+            # but that requires cmake-2.8.11 or newer
+            INCLUDE_DIRECTORIES(${ALSA_INCLUDE_DIR})
         ELSEIF(WANT_OSS)
             IF(NOT OSS_FOUND)
                 MESSAGE(FATAL_ERROR "OSS required but not found.")
@@ -143,12 +147,21 @@ IF(UNIX AND NOT APPLE)
             ENDIF()
             SET(AUDIODRV_OPENAL 1)
             SET(AUDIO_LIBRARY ${OPENAL_LIBRARY})
+            INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
+            # FIXME: we need to add OPENAL_INCLUDE_DIR only to the wildmidi
+            # target in src/CMakeLists.txt using TARGET_INCLUDE_DIRECTORIES()
+            # but that requires cmake-2.8.11 or newer
+            INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})

         ELSE() # Try to auto-detect

             IF(ALSA_FOUND)
                 SET(AUDIO_LIBRARY ${ALSA_LIBRARY})
                 SET(AUDIODRV_ALSA 1)
+                # FIXME: we need to add ALSA_INCLUDE_DIR only to the wildmidi
+                # target in src/CMakeLists.txt using TARGET_INCLUDE_DIRECTORIES()
+                # but that requires cmake-2.8.11 or newer
+                INCLUDE_DIRECTORIES(${ALSA_INCLUDE_DIR})

             ELSEIF(OSS_FOUND)
                 SET(AUDIO_LIBRARY ${OSS_LIBRARY})
@@ -157,6 +170,10 @@ IF(UNIX AND NOT APPLE)
             ELSEIF(OPENAL_FOUND)
                 SET(AUDIO_LIBRARY ${OPENAL_LIBRARY})
                 SET(AUDIODRV_OPENAL 1)
+                # FIXME: we need to add OPENAL_INCLUDE_DIR only to the wildmidi
+                # target in src/CMakeLists.txt using TARGET_INCLUDE_DIRECTORIES()
+                # but that requires cmake-2.8.11 or newer
+                INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})

             ELSE()
                 MESSAGE(WARNING "Could not find an audio sub-system!")
@@ -177,7 +194,7 @@ IF(UNIX AND NOT APPLE)
 ENDIF(UNIX AND NOT APPLE)

 IF (APPLE AND WANT_PLAYER)
-    FIND_PACKAGE(OpenAL)
+    INCLUDE(FindOpenAL)

     IF(WANT_OPENAL)
         IF(NOT OPENAL_FOUND)
@@ -189,6 +206,10 @@ IF (APPLE AND WANT_PLAYER)
         IF(OPENAL_FOUND)
             SET(AUDIO_LIBRARY ${OPENAL_LIBRARY})
             SET(AUDIODRV_OPENAL 1)
+            # FIXME: we need to add OPENAL_INCLUDE_DIR only to the wildmidi
+            # target in src/CMakeLists.txt using TARGET_INCLUDE_DIRECTORIES()
+            # but that requires cmake-2.8.11 or newer
+            INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})

         ELSE()
             MESSAGE(WARNING "Could not find an audio sub-system!")
diff --git a/src/wildmidi.c b/src/wildmidi.c
index a348ea9..acf846f 100644
--- a/src/wildmidi.c
+++ b/src/wildmidi.c
@@ -1,6 +1,5 @@
 /*
  wildmidi.c
-
  Midi Player using the WildMidi Midi Processing Library

  Copyright (C) Chris Ison  2001-2011
@@ -77,17 +76,8 @@ static int msleep(unsigned long millisec);
 #   include <machine/soundcard.h>
 #   endif
 # elif defined AUDIODRV_OPENAL
-#   if defined(__APPLE__) && defined(__MACH__)
-    /* Mac OS X framework */
-#     include <OpenAL/al.h>
-#     include <OpenAL/alc.h>
-#   else
-    /* FIXME: Creative OpenAL 1.1 SDK headers aren't under AL/
-     * However with OpenAL-soft, all headers are under the AL/
-     * (http://kcat.strangesoft.net/openal.html) */
-#     include <AL/al.h>
-#     include <AL/alc.h>
-#   endif
+#   include <al.h>
+#   include <alc.h>
 # endif
 #endif
there should be a break here according to chris
constify filename parameter of load_gus_pat()
fix for: Result of 'realloc' is converted to a pointer of type 'struct _patch *', which is incompatible with sizeof operand type 'struct _patch'
fix many issues: "Array access results in a null pointer dereference" and "Null pointer passed as an argument to a nonnull parameter"
handle warning from clang static analyzer:
src/wildmidi_lib.c:3767:16: warning: Value stored to 'note_data' during its initialization is never read
struct _note *note_data = mdi->note;
minor simplifications of line_tokens[1] == NULL to !line_tokens[1]
fix another clang static analyzer warning:
src/wildmidi_lib.c:3789:2: warning: Value stored to 'real_samples_to_mix' is never read
real_samples_to_mix = 0;
another clang static analyzer fix
WM_ParseNewMidi: use a common failure cleanup path by using gotos.
delay Init_MDI call until certain sanity checks pass. fixes clang
static analysis tool warnings.
Fixes binary-file-built-without-LFS-support issue with Debian, effects only wildmidi player
restrict wav_size type to strictly 32 bits
documentation fixes
fix last remaining 'Memory is never released' issue.
backport the changesets cf4f141, 32ff087, 060679b, 8356363, fcb40e1
and 0366cc9 from master to fix the heap abuse, i.e. issue #24.
for consistency, use unsigned long type for events_size and mix_buffer_size, instead of unsigned int
remove return statements from end of functions returning void. some formatting tidy-ups
actually follow Bret's suggestion about using WM_Lock() functions,
and reapply 83563637 in a modified form:  do not initialize gauss
and newton tables unless WM_MO_ENHANCED_RESAMPLING is set, so that
we steal ca. 300k less memory upon library initialization. (I was
possibly half asleep when I said that I can't use WM_Lock() stuff
for this...)
wav_count must be unsigned
Worked around an invalid memory read found by valgrind when playing
Beethoven's Fur Elise.rmi at 44100 Hz using the old MIDIA patch-set
from 1994.  issue #36:  just pad with one more sample in convert_XX
functions of gus_pat.c.