Skip to content

Commit

Permalink
Added ModPlug support.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 10, 2002
1 parent 5ff4ff7 commit 78ce3d1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 7 deletions.
16 changes: 12 additions & 4 deletions SDL_sound.c
Expand Up @@ -51,8 +51,12 @@
extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MP3;
#endif

#if (defined SOUND_SUPPORTS_MOD)
extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MOD;
#if (defined SOUND_SUPPORTS_MIKMOD)
extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MIKMOD;
#endif

#if (defined SOUND_SUPPORTS_MODPLUG)
extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MODPLUG;
#endif

#if (defined SOUND_SUPPORTS_WAV)
Expand Down Expand Up @@ -101,8 +105,12 @@ static decoder_element decoders[] =
{ 0, &__Sound_DecoderFunctions_MP3 },
#endif

#if (defined SOUND_SUPPORTS_MOD)
{ 0, &__Sound_DecoderFunctions_MOD },
#if (defined SOUND_SUPPORTS_MIKMOD)
{ 0, &__Sound_DecoderFunctions_MIKMOD },
#endif

#if (defined SOUND_SUPPORTS_MODPLUG)
{ 0, &__Sound_DecoderFunctions_MODPLUG },
#endif

#if (defined SOUND_SUPPORTS_WAV)
Expand Down
3 changes: 2 additions & 1 deletion acconfig.h
Expand Up @@ -3,7 +3,8 @@
#undef DEBUG_CHATTER
#undef NDEBUG
#undef SOUND_SUPPORTS_AIFF
#undef SOUND_SUPPORTS_MOD
#undef SOUND_SUPPORTS_MIKMOD
#undef SOUND_SUPPORTS_MODPLUG
#undef SOUND_SUPPORTS_MP3
#undef SOUND_SUPPORTS_OGG
#undef SOUND_SUPPORTS_RAW
Expand Down
15 changes: 14 additions & 1 deletion configure.in
Expand Up @@ -180,7 +180,20 @@ if test x$enable_mikmod = xyes; then
CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS"
LIBS="$LIBS $LIBMIKMOD_LIBS"
LDADD="$LDADD $LIBMIKMOD_LDADD"
AC_DEFINE(SOUND_SUPPORTS_MOD)
AC_DEFINE(SOUND_SUPPORTS_MIKMOD)
fi
fi

dnl Check for libmodplug
AC_ARG_ENABLE(modplug,
[ --enable-modplug enable MOD decoding via modplug [default=yes]],
, enable_modplug=yes)
if test x$enable_modplug = xyes; then
AC_CHECK_HEADER(modplug.h, have_modplug_hdr=yes)
AC_CHECK_LIB(modplug, ModPlug_Load, have_modplug_lib=yes)
if test x$have_modplug_hdr = xyes -a x$have_modplug_lib = xyes; then
LIBS="$LIBS -lmodplug"
AC_DEFINE(SOUND_SUPPORTS_MODPLUG)
fi
fi

Expand Down
3 changes: 2 additions & 1 deletion decoders/Makefile.am
Expand Up @@ -6,7 +6,8 @@ INCLUDES = -I$(top_srcdir) -Itimidity

libdecoders_la_SOURCES = \
aiff.c \
mod.c \
mikmod.c \
modplug.c \
mp3.c \
ogg.c \
raw.c \
Expand Down

0 comments on commit 78ce3d1

Please sign in to comment.