# HG changeset patch # User Ryan C. Gordon # Date 1063484919 0 # Node ID 6d328f00c20da8084273e384cff53badadf4dd18 # Parent daeb71a3f1eddeb43090330b4cdb35bd25059729 Added Speex decoder. diff -r daeb71a3f1ed -r 6d328f00c20d SDL_sound.c --- a/SDL_sound.c Sat Sep 13 20:27:33 2003 +0000 +++ b/SDL_sound.c Sat Sep 13 20:28:39 2003 +0000 @@ -103,6 +103,10 @@ extern const Sound_DecoderFunctions __Sound_DecoderFunctions_QuickTime; #endif +#if (defined SOUND_SUPPORTS_SPEEX) +extern const Sound_DecoderFunctions __Sound_DecoderFunctions_SPEEX; +#endif + typedef struct { int available; @@ -167,6 +171,10 @@ { 0, &__Sound_DecoderFunctions_QuickTime }, #endif +#if (defined SOUND_SUPPORTS_SPEEX) + { 0, &__Sound_DecoderFunctions_SPEEX }, +#endif + { 0, NULL } }; diff -r daeb71a3f1ed -r 6d328f00c20d acconfig.h --- a/acconfig.h Sat Sep 13 20:27:33 2003 +0000 +++ b/acconfig.h Sat Sep 13 20:28:39 2003 +0000 @@ -15,5 +15,7 @@ #undef SOUND_SUPPORTS_FLAC #undef SOUND_SUPPORTS_SMPEG #undef SOUND_SUPPORTS_MPGLIB +#undef SOUND_SUPPORTS_QUICKTIME +#undef SOUND_SUPPORTS_SPEEX #undef SOUND_USE_ALTCVT diff -r daeb71a3f1ed -r 6d328f00c20d configure.in --- a/configure.in Sat Sep 13 20:27:33 2003 +0000 +++ b/configure.in Sat Sep 13 20:28:39 2003 +0000 @@ -235,6 +235,22 @@ fi fi +dnl Check for speex +AC_ARG_ENABLE(speex, +[ --enable-speex enable SPX decoding via libspeex [default=yes]], + , enable_speex=yes) +if test x$enable_speex = xyes; then + AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes) + AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes) + AC_CHECK_HEADER(speex.h, have_speex_hdr=yes) + AC_CHECK_LIB(speex, speex_bits_init, have_speex_lib=yes) + if test "x$have_ogg_hdr" = "xyes" -a "x$have_ogg_lib" = "xyes" -a "x$have_speex_hdr" = "xyes" -a "x$have_speex_lib" = "xyes"; then + LIBS="$LIBS -logg -lspeex" + AC_DEFINE(SOUND_SUPPORTS_SPEEX) + fi +fi + + dnl Check for PhysicsFS http://icculus.org/physfs/ AC_ARG_ENABLE(physfs, [ --enable-physfs enable PhysicsFS in playsound [default=yes]], diff -r daeb71a3f1ed -r 6d328f00c20d decoders/Makefile.am --- a/decoders/Makefile.am Sat Sep 13 20:27:33 2003 +0000 +++ b/decoders/Makefile.am Sat Sep 13 20:28:39 2003 +0000 @@ -17,4 +17,5 @@ voc.c \ midi.c \ flac.c \ + speex.c \ wav.c