Skip to content

Commit

Permalink
Added Midi decoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 3, 2001
1 parent 04b3355 commit 15150e0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 15 deletions.
8 changes: 8 additions & 0 deletions SDL_sound.c
Expand Up @@ -79,6 +79,10 @@ extern const Sound_DecoderFunctions __Sound_DecoderFunctions_RAW;
extern const Sound_DecoderFunctions __Sound_DecoderFunctions_SHN;
#endif

#if (defined SOUND_SUPPORTS_MIDI)
extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MIDI;
#endif



typedef struct
Expand Down Expand Up @@ -120,6 +124,10 @@ static decoder_element decoders[] =
#if (defined SOUND_SUPPORTS_SHN)
{ 0, &__Sound_DecoderFunctions_SHN },
#endif

#if (defined SOUND_SUPPORTS_MIDI)
{ 0, &__Sound_DecoderFunctions_MIDI },
#endif
};


Expand Down
1 change: 1 addition & 0 deletions acconfig.h
Expand Up @@ -10,3 +10,4 @@
#undef SOUND_SUPPORTS_SHN
#undef SOUND_SUPPORTS_VOC
#undef SOUND_SUPPORTS_WAV
#undef SOUND_SUPPORTS_MIDI
37 changes: 22 additions & 15 deletions configure.in
Expand Up @@ -70,6 +70,7 @@ if test x$enable_debug = xyes; then
else
CFLAGS="-O0"
fi
CFLAGS="$CFLAGS -Werror"
AC_DEFINE(DEBUG)
AC_DEFINE(DEBUG_CHATTER)
else
Expand Down Expand Up @@ -134,6 +135,27 @@ if test x$enable_shn = xyes; then
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,
Expand Down Expand Up @@ -162,21 +184,6 @@ if test x$enable_vorbis = xyes; then
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
Expand Down
1 change: 1 addition & 0 deletions decoders/Makefile.am
Expand Up @@ -10,4 +10,5 @@ libdecoders_la_SOURCES = \
raw.c \
shn.c \
voc.c \
midi.c \
wav.c

0 comments on commit 15150e0

Please sign in to comment.