Skip to content

Commit

Permalink
Added Speex decoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 13, 2003
1 parent c3514d8 commit d65f85d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SDL_sound.c
Expand Up @@ -103,6 +103,10 @@ extern const Sound_DecoderFunctions __Sound_DecoderFunctions_FLAC;
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;
Expand Down Expand Up @@ -167,6 +171,10 @@ static decoder_element decoders[] =
{ 0, &__Sound_DecoderFunctions_QuickTime },
#endif

#if (defined SOUND_SUPPORTS_SPEEX)
{ 0, &__Sound_DecoderFunctions_SPEEX },
#endif

{ 0, NULL }
};

Expand Down
2 changes: 2 additions & 0 deletions acconfig.h
Expand Up @@ -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

16 changes: 16 additions & 0 deletions configure.in
Expand Up @@ -235,6 +235,22 @@ if test x$enable_ogg = xyes; then
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]],
Expand Down
1 change: 1 addition & 0 deletions decoders/Makefile.am
Expand Up @@ -17,4 +17,5 @@ libdecoders_la_SOURCES = \
voc.c \
midi.c \
flac.c \
speex.c \
wav.c

0 comments on commit d65f85d

Please sign in to comment.