changeset 110:5e5adbe0f215

Added Midi decoder.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 03 Oct 2001 20:17:48 +0000
parents 2aec53e68049
children b99770def077
files SDL_sound.c acconfig.h configure.in decoders/Makefile.am
diffstat 4 files changed, 32 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/SDL_sound.c	Wed Oct 03 20:17:34 2001 +0000
+++ b/SDL_sound.c	Wed Oct 03 20:17:48 2001 +0000
@@ -79,6 +79,10 @@
 extern const Sound_DecoderFunctions  __Sound_DecoderFunctions_SHN;
 #endif
 
+#if (defined SOUND_SUPPORTS_MIDI)
+extern const Sound_DecoderFunctions  __Sound_DecoderFunctions_MIDI;
+#endif
+
 
 
 typedef struct
@@ -120,6 +124,10 @@
 #if (defined SOUND_SUPPORTS_SHN)
     { 0, &__Sound_DecoderFunctions_SHN },
 #endif
+
+#if (defined SOUND_SUPPORTS_MIDI)
+    { 0, &__Sound_DecoderFunctions_MIDI },
+#endif
 };
 
 
--- a/acconfig.h	Wed Oct 03 20:17:34 2001 +0000
+++ b/acconfig.h	Wed Oct 03 20:17:48 2001 +0000
@@ -10,3 +10,4 @@
 #undef SOUND_SUPPORTS_SHN
 #undef SOUND_SUPPORTS_VOC
 #undef SOUND_SUPPORTS_WAV
+#undef SOUND_SUPPORTS_MIDI
--- a/configure.in	Wed Oct 03 20:17:34 2001 +0000
+++ b/configure.in	Wed Oct 03 20:17:48 2001 +0000
@@ -70,6 +70,7 @@
   else
     CFLAGS="-O0"
   fi
+  CFLAGS="$CFLAGS -Werror"
   AC_DEFINE(DEBUG)
   AC_DEFINE(DEBUG_CHATTER)
 else
@@ -134,6 +135,27 @@
     AC_DEFINE(SOUND_SUPPORTS_SHN)
 fi
 
+dnl Check for the MIDI pipe decoder...
+AC_ARG_ENABLE(midi,
+[  --enable-midi              enable MIDI music via a pipe [default=no]],
+              , enable_midi=no)
+if test x$enable_midi = xyes; then
+  AC_DEFINE(SOUND_SUPPORTS_MIDI)
+fi
+
+dnl Check for SMPEG
+AC_ARG_ENABLE(smpeg,
+[  --enable-smpeg             enable MP3 music via smpeg [default=yes]],
+              , enable_smpeg=yes)
+if test x$enable_smpeg = xyes; then
+  SMPEG_VERSION=0.4.3
+  AM_PATH_SMPEG($SMPEG_VERSION, , no_smpeg=yes)
+  if test "x$no_smpeg" = "x" ; then
+    CFLAGS="$CFLAGS $SMPEG_CFLAGS"
+    LIBS="$LIBS $SMPEG_LIBS"
+    AC_DEFINE(SOUND_SUPPORTS_MP3)
+  fi
+fi
 
 dnl Check for libmikmod
 AC_ARG_ENABLE(mikmod,
@@ -162,21 +184,6 @@
   fi
 fi
 
-dnl Check for SMPEG
-AC_ARG_ENABLE(smpeg,
-[  --enable-smpeg             enable MP3 music via smpeg [default=yes]],
-              , enable_smpeg=yes)
-if test x$enable_smpeg = xyes; then
-  SMPEG_VERSION=0.4.3
-  AM_PATH_SMPEG($SMPEG_VERSION, , no_smpeg=yes)
-  if test "x$no_smpeg" = "x" ; then
-    CFLAGS="$CFLAGS $SMPEG_CFLAGS"
-    LIBS="$LIBS $SMPEG_LIBS"
-    AC_DEFINE(SOUND_SUPPORTS_MP3)
-  fi
-fi
-
-
 
 # Checks for header files.
 AC_HEADER_STDC
--- a/decoders/Makefile.am	Wed Oct 03 20:17:34 2001 +0000
+++ b/decoders/Makefile.am	Wed Oct 03 20:17:48 2001 +0000
@@ -10,4 +10,5 @@
 	raw.c		\
     shn.c		\
 	voc.c		\
+	midi.c		\
 	wav.c