Mercurial > SDL_sound_CoreAudio
changeset 157:fa3e593b6a5e
FLAC decoder added.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 09 Nov 2001 21:43:49 +0000 |
parents | ac46d8db8a8c |
children | f7d65df4383a |
files | SDL_sound.c acconfig.h configure.in decoders/Makefile.am |
diffstat | 4 files changed, 24 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/SDL_sound.c Fri Nov 09 21:43:31 2001 +0000 +++ b/SDL_sound.c Fri Nov 09 21:43:49 2001 +0000 @@ -83,6 +83,10 @@ extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MIDI; #endif +#if (defined SOUND_SUPPORTS_FLAC) +extern const Sound_DecoderFunctions __Sound_DecoderFunctions_FLAC; +#endif + typedef struct @@ -129,6 +133,10 @@ { 0, &__Sound_DecoderFunctions_MIDI }, #endif +#if (defined SOUND_SUPPORTS_FLAC) + { 0, &__Sound_DecoderFunctions_FLAC }, +#endif + { 0, NULL } };
--- a/acconfig.h Fri Nov 09 21:43:31 2001 +0000 +++ b/acconfig.h Fri Nov 09 21:43:49 2001 +0000 @@ -11,3 +11,4 @@ #undef SOUND_SUPPORTS_VOC #undef SOUND_SUPPORTS_WAV #undef SOUND_SUPPORTS_MIDI +#undef SOUND_SUPPORTS_FLAC
--- a/configure.in Fri Nov 09 21:43:31 2001 +0000 +++ b/configure.in Fri Nov 09 21:43:49 2001 +0000 @@ -143,6 +143,19 @@ AC_DEFINE(SOUND_SUPPORTS_MIDI) fi +dnl Check for libFLAC +AC_ARG_ENABLE(flac, +[ --enable-flac enable FLAC decoding via libFLAC [default=yes]], + , enable_flac=yes) +if test x$enable_flac = xyes; then + AC_CHECK_HEADER(FLAC/all.h, have_flac_hdr=yes) + AC_CHECK_LIB(FLAC, FLAC__stream_decoder_new, have_flac_lib=yes) + if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then + LIBS="$LIBS -lFLAC" + AC_DEFINE(SOUND_SUPPORTS_FLAC) + fi +fi + dnl Check for SMPEG AC_ARG_ENABLE(smpeg, [ --enable-smpeg enable MP3 music via smpeg [default=yes]], @@ -173,7 +186,7 @@ dnl Check for vorbis AC_ARG_ENABLE(vorbis, -[ --enable-vorbis enable OGG music via vorbis [default=yes]], +[ --enable-vorbis enable OGG decoding via vorbis [default=yes]], , enable_vorbis=yes) if test x$enable_vorbis = xyes; then AM_PATH_VORBIS @@ -184,7 +197,6 @@ fi fi - # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h])