mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 18:09:59 +00:00
Merge Ogg/Annodex stuff from Conrad Parker.
Patches applied: * conrad@annodex.net--2004/libsndfile--fishsound--1.0--base-0 tag of erikd@mega-nerd.com--2004/libsndfile--devel--1.0--patch-1 * conrad@annodex.net--2004/libsndfile--fishsound--1.0--patch-1 * erikd@mega-nerd.com--2004/libsndfile--devel--1.0--patch-2 Merge changes from --mdev branch.
This commit is contained in:
parent
c6b4bde02d
commit
d09ab86ff9
@ -1,3 +1,10 @@
|
||||
2004-06-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac src/common.h src/ogg.c src/sndfile.c src/sndfile.h.in
|
||||
src/Makefile.am
|
||||
Apply large patch from Conrad Parker implementing Ogg Vorbis, Ogg Speex and
|
||||
Annodex support via liboggz and libfishsound. Thanks Conrad.
|
||||
|
||||
2004-06-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/avr.c src/ircam.c src/nist.c src/paf.c src/xi.c
|
||||
|
63
configure.ac
63
configure.ac
@ -3,7 +3,7 @@
|
||||
dnl Require autoconf version
|
||||
AC_PREREQ(2.53)
|
||||
|
||||
AC_INIT(libsndfile,1.0.10,erikd@mega-nerd.com)
|
||||
AC_INIT(libsndfile,1.0.10pre1,erikd@mega-nerd.com)
|
||||
AC_CONFIG_SRCDIR([src/sndfile.c])
|
||||
AC_CANONICAL_TARGET([])
|
||||
AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)
|
||||
@ -243,6 +243,65 @@ case "$target_os" in
|
||||
;;
|
||||
esac
|
||||
|
||||
#====================================================================================
|
||||
# Check for libraries
|
||||
|
||||
PKG_CHECK_MODULES(OGGZ, oggz >= 0.8.2, HAVE_OGGZ="yes", HAVE_OGGZ="no")
|
||||
|
||||
if test "x$HAVE_OGGZ" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_OGGZ, [1], [Define to 1 if liboggz is installed])
|
||||
AC_SUBST(OGGZ_LIBS)
|
||||
else
|
||||
AC_CHECK_LIB(oggz, oggz_open, HAVE_OGGZ="maybe")
|
||||
if test "x$HAVE_OGGZ" = "maybe" ; then
|
||||
AC_MSG_ERROR([
|
||||
***
|
||||
*** liboggz seems to exist on your system, however the pkg-config tool
|
||||
*** cannot find its build information.
|
||||
***
|
||||
*** Please set your PKG_CONFIG_PATH environment variable to include the
|
||||
*** directory in which oggz.pc was installed. For example, oggz.pc
|
||||
*** is installed in /usr/local/lib/pkgconfig by default; if that is the
|
||||
*** case do:
|
||||
***
|
||||
*** export PKG_CONFIG_PATH="\$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
|
||||
***
|
||||
*** then run this ./configure again. If you configured liboggz with a
|
||||
*** different --prefix option, replace /usr/local above with that prefix.
|
||||
***
|
||||
])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_OGGZ, [test "x$HAVE_OGGZ" = "xyes"])
|
||||
|
||||
PKG_CHECK_MODULES(FISHSOUND, fishsound >= 0.6.0, HAVE_FISHSOUND="yes", HAVE_FISHSOUND="no")
|
||||
|
||||
if test "x$HAVE_FISHSOUND" = "xyes" ; then
|
||||
AC_DEFINE(HAVE_FISHSOUND, [1], [Define to 1 if libfishsound is installed])
|
||||
AC_SUBST(FISHSOUND_LIBS)
|
||||
else
|
||||
AC_CHECK_LIB(fishsound, fish_sound_open, HAVE_FISHSOUND="maybe")
|
||||
if test "x$HAVE_FISHSOUND" = "maybe" ; then
|
||||
AC_MSG_ERROR([
|
||||
***
|
||||
*** libfishsound seems to exist on your system, however the pkg-config tool
|
||||
*** cannot find its build information.
|
||||
***
|
||||
*** Please set your PKG_CONFIG_PATH environment variable to include the
|
||||
*** directory in which fishsound.pc was installed. For example, fishsound.pc
|
||||
*** is installed in /usr/local/lib/pkgconfig by default; if that is the
|
||||
*** case do:
|
||||
***
|
||||
*** export PKG_CONFIG_PATH="\$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
|
||||
***
|
||||
*** then run this ./configure again. If you configured libfishsound with a
|
||||
*** different --prefix option, replace /usr/local above with that prefix.
|
||||
***
|
||||
])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_FISHSOUND, [test "x$HAVE_FISHSOUND" = "xyes"])
|
||||
|
||||
#====================================================================================
|
||||
# Determine if the processor can do clipping on float to int conversions.
|
||||
|
||||
@ -391,7 +450,7 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
|
||||
AC_DEFINE_UNQUOTED([GCC_MAJOR_VERSION],${GCC_MAJOR_VERSION}, [Major version of GCC or 3 otherwise.])
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS $OS_SPECIFIC_CFLAGS"
|
||||
CFLAGS="$CFLAGS $OGGZ_CFLAGS $FISHSOUND_CFLAGS $OS_SPECIFIC_CFLAGS"
|
||||
|
||||
if test x"$CFLAGS" = x ; then
|
||||
echo "Error in configure script. CFLAGS has been screwed up."
|
||||
|
@ -25,7 +25,7 @@ FILESPECIFIC = aiff.c au.c au_g72x.c avr.c ircam.c macbinary3.c macos.c mat4.c \
|
||||
|
||||
libsndfile_la_SOURCES = $(COMMON) $(FILESPECIFIC) $(noinst_HEADERS) sndfile.h
|
||||
libsndfile_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ @SHLIB_VERSION_ARG@
|
||||
libsndfile_la_LIBADD = GSM610/libgsm.la G72x/libg72x.la -lm
|
||||
libsndfile_la_LIBADD = GSM610/libgsm.la G72x/libg72x.la -lm $(OGGZ_LIBS) $(FISHSOUND_LIBS)
|
||||
|
||||
test_file_io_CFLAGS = $(AM_CFLAGS)
|
||||
test_file_io_SOURCES = file_io.c test_file_io.c
|
||||
|
@ -85,8 +85,6 @@ enum
|
||||
SF_FORMAT_DWD = 0x4040000, /* DiamondWare Digirized */
|
||||
|
||||
/* Following are detected but not supported. */
|
||||
SF_FORMAT_OGG = 0x4090000,
|
||||
|
||||
SF_FORMAT_REX = 0x40A0000, /* Propellorheads Rex/Rcy */
|
||||
SF_FORMAT_SD2 = 0x40C0000, /* Sound Designer 2 */
|
||||
SF_FORMAT_REX2 = 0x40D0000, /* Propellorheads Rex2 */
|
||||
@ -96,8 +94,6 @@ enum
|
||||
SF_FORMAT_FLAC = 0x4120000,
|
||||
|
||||
/* Unsupported encodings. */
|
||||
SF_FORMAT_VORBIS = 0x1001,
|
||||
|
||||
SF_FORMAT_SVX_FIB = 0x1020, /* SVX Fibonacci Delta encoding. */
|
||||
SF_FORMAT_SVX_EXP = 0x1021, /* SVX Exponential Delta encoding. */
|
||||
|
||||
|
@ -673,6 +673,12 @@ sf_format_check (const SF_INFO *info)
|
||||
return 1 ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_OGG :
|
||||
case SF_FORMAT_ANX :
|
||||
if (subformat == SF_FORMAT_VORBIS || subformat == SF_FORMAT_SPEEX)
|
||||
return 1 ;
|
||||
break ;
|
||||
|
||||
/*-
|
||||
case SF_FORMAT_SD2 :
|
||||
/+* SD2 is strictly big endian. *+/
|
||||
@ -2006,7 +2012,7 @@ guess_file_type (SF_PRIVATE *psf, const char *filename)
|
||||
buffer [2] == MAKE_MARKER (' ', 'I', 'n', 's'))
|
||||
return SF_FORMAT_XI ;
|
||||
|
||||
if (ENABLE_EXPERIMENTAL_CODE && buffer [0] == MAKE_MARKER ('O', 'g', 'g', 'S'))
|
||||
if (buffer [0] == MAKE_MARKER ('O', 'g', 'g', 'S'))
|
||||
return SF_FORMAT_OGG ;
|
||||
|
||||
if (buffer [0] == MAKE_MARKER ('A', 'L', 'a', 'w') && buffer [1] == MAKE_MARKER ('S', 'o', 'u', 'n')
|
||||
@ -2289,101 +2295,102 @@ psf_open_file (SF_PRIVATE *psf, int mode, SF_INFO *sfinfo)
|
||||
|
||||
/* Call the initialisation function for the relevant file type. */
|
||||
switch (psf->sf.format & SF_FORMAT_TYPEMASK)
|
||||
{ case SF_FORMAT_WAV :
|
||||
case SF_FORMAT_WAVEX :
|
||||
{ case SF_FORMAT_WAV :
|
||||
case SF_FORMAT_WAVEX :
|
||||
error = wav_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_AIFF :
|
||||
case SF_FORMAT_AIFF :
|
||||
error = aiff_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_AU :
|
||||
case SF_FORMAT_AU :
|
||||
error = au_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_AU | SF_FORMAT_ULAW :
|
||||
case SF_FORMAT_AU | SF_FORMAT_ULAW :
|
||||
error = au_nh_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_RAW :
|
||||
case SF_FORMAT_RAW :
|
||||
error = raw_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_W64 :
|
||||
case SF_FORMAT_W64 :
|
||||
error = w64_open (psf) ;
|
||||
break ;
|
||||
|
||||
/* Lite remove start */
|
||||
case SF_FORMAT_PAF :
|
||||
case SF_FORMAT_PAF :
|
||||
error = paf_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_SVX :
|
||||
case SF_FORMAT_SVX :
|
||||
error = svx_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_NIST :
|
||||
case SF_FORMAT_NIST :
|
||||
error = nist_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_IRCAM :
|
||||
case SF_FORMAT_IRCAM :
|
||||
error = ircam_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_VOC :
|
||||
case SF_FORMAT_VOC :
|
||||
error = voc_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_SDS :
|
||||
case SF_FORMAT_SDS :
|
||||
error = sds_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_OGG :
|
||||
case SF_FORMAT_OGG :
|
||||
case SF_FORMAT_ANX :
|
||||
error = ogg_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_TXW :
|
||||
case SF_FORMAT_TXW :
|
||||
error = txw_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_WVE :
|
||||
case SF_FORMAT_WVE :
|
||||
error = wve_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_DWD :
|
||||
case SF_FORMAT_DWD :
|
||||
error = dwd_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_MAT4 :
|
||||
case SF_FORMAT_MAT4 :
|
||||
error = mat4_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_MAT5 :
|
||||
case SF_FORMAT_MAT5 :
|
||||
error = mat5_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_PVF :
|
||||
case SF_FORMAT_PVF :
|
||||
error = pvf_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_XI :
|
||||
case SF_FORMAT_XI :
|
||||
error = xi_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_HTK :
|
||||
case SF_FORMAT_HTK :
|
||||
error = htk_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_SD2 :
|
||||
case SF_FORMAT_SD2 :
|
||||
error = sd2_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_REX2 :
|
||||
case SF_FORMAT_REX2 :
|
||||
error = rx2_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_AVR :
|
||||
case SF_FORMAT_AVR :
|
||||
error = avr_open (psf) ;
|
||||
break ;
|
||||
|
||||
|
@ -70,6 +70,8 @@ enum
|
||||
SF_FORMAT_SDS = 0x110000, /* Midi Sample Dump Standard */
|
||||
SF_FORMAT_AVR = 0x120000, /* Audio Visual Research */
|
||||
SF_FORMAT_WAVEX = 0x130000, /* MS WAVE with WAVEFORMATEX */
|
||||
SF_FORMAT_OGG = 0x140000, /* Ogg encapsulation */
|
||||
SF_FORMAT_ANX = 0x150000, /* Annodex.net encapsulation */
|
||||
|
||||
/* Subtypes from here on. */
|
||||
|
||||
@ -102,6 +104,8 @@ enum
|
||||
|
||||
SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */
|
||||
SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
|
||||
SF_FORMAT_VORBIS = 0x0060, /* Vorbis encoding */
|
||||
SF_FORMAT_SPEEX = 0x0061, /* Speex encoding */
|
||||
|
||||
|
||||
/* Endian-ness options. */
|
||||
|
Loading…
Reference in New Issue
Block a user