# HG changeset patch # User Ryan C. Gordon # Date 1002140268 0 # Node ID 5e5adbe0f215c5e1f193b97d7971d77135f65bf5 # Parent 2aec53e68049e93ccb945b91558c4b7fa825ece7 Added Midi decoder. diff -r 2aec53e68049 -r 5e5adbe0f215 SDL_sound.c --- 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 }; diff -r 2aec53e68049 -r 5e5adbe0f215 acconfig.h --- 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 diff -r 2aec53e68049 -r 5e5adbe0f215 configure.in --- 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 diff -r 2aec53e68049 -r 5e5adbe0f215 decoders/Makefile.am --- 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