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
removed one layer of if
allocate a big enough buffer for tokenizer
added some debugging code, will delete when ready
made event memory pool checker, with this we reduce our memory footprint by 75%, same with out allocs and frees, more work to do
cleanup debug code
(*pointer != NULL) is the same as saying (*pointer), because either a pointer has an address or is 0 or NULL.
few missed expects
removed need for strdup in wildmidi, still need to do that in wildmidi_lib.c
Revert "removed need for strdup in wildmidi, still need to do that in wildmidi_lib.c"

This reverts commit 74293c021ddb4f4d9f46a770a99b1201dc51c65f.
remember to free our config_file when finished
initialize array to 0, removed some magic numbers and now only use gauss when asked for gauss
put our mix_buffer into mdi struct, realloc as necessary, saves lots of memory as a result, win
minor cleanup, update README file.
use stdint.h types.
there should be a break here according to chris
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;
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;