diff options
43 files changed, 107 insertions, 62 deletions
diff --git a/configure.ac b/configure.ac index 057d888..e6fd84f 100644 --- a/configure.ac +++ b/configure.ac @@ -273,6 +273,8 @@ fi AC_SUBST(SIZE16) AC_SUBST(SIZE32) +AC_DEFINE([_BUILD_SPEEX], [], [Defined only when Speex itself is build built]) + AC_OUTPUT([Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec include/Makefile include/speex/Makefile speex.pc speexdsp.pc win32/Makefile win32/libspeex/Makefile win32/speexenc/Makefile diff --git a/include/speex/speex.h b/include/speex/speex.h index 82ba016..5fc38c7 100644 --- a/include/speex/speex.h +++ b/include/speex/speex.h @@ -40,8 +40,13 @@ * @{ */ -#include "speex/speex_bits.h" -#include "speex/speex_types.h" +#ifdef _BUILD_SPEEX +# include "speex_types.h" +# include "speex_bits.h" +#else +# include <speex/speex_types.h> +# include <speex/speex_bits.h> +#endif #ifdef __cplusplus extern "C" { diff --git a/include/speex/speex_buffer.h b/include/speex/speex_buffer.h index df56f5f..59632b3 100644 --- a/include/speex/speex_buffer.h +++ b/include/speex/speex_buffer.h @@ -34,7 +34,11 @@ #ifndef SPEEX_BUFFER_H #define SPEEX_BUFFER_H -#include "speex/speex_types.h" +#ifdef _BUILD_SPEEX +# include "speex_types.h" +#else +# include <speex/speex_types.h> +#endif #ifdef __cplusplus extern "C" { diff --git a/include/speex/speex_callbacks.h b/include/speex/speex_callbacks.h index 6f450b3..42bc9c3 100644 --- a/include/speex/speex_callbacks.h +++ b/include/speex/speex_callbacks.h @@ -39,7 +39,11 @@ * @{ */ -#include "speex.h" +#ifdef _BUILD_SPEEX +# include "speex.h" +#else +# include <speex/speex.h> +#endif #ifdef __cplusplus extern "C" { diff --git a/include/speex/speex_echo.h b/include/speex/speex_echo.h index 53bcd28..c01688b 100644 --- a/include/speex/speex_echo.h +++ b/include/speex/speex_echo.h @@ -37,7 +37,11 @@ * This is the acoustic echo canceller module. * @{ */ -#include "speex/speex_types.h" +#ifdef _BUILD_SPEEX +# include "speex_types.h" +#else +# include <speex/speex_types.h> +#endif #ifdef __cplusplus extern "C" { diff --git a/include/speex/speex_header.h b/include/speex/speex_header.h index f85b249..dfd1ce6 100644 --- a/include/speex/speex_header.h +++ b/include/speex/speex_header.h @@ -41,7 +41,11 @@ * @{ */ -#include "speex/speex_types.h" +#ifdef _BUILD_SPEEX +# include "speex_types.h" +#else +# include <speex/speex_types.h> +#endif #ifdef __cplusplus extern "C" { diff --git a/include/speex/speex_jitter.h b/include/speex/speex_jitter.h index d68674b..977916b 100644 --- a/include/speex/speex_jitter.h +++ b/include/speex/speex_jitter.h @@ -41,7 +41,11 @@ * @{ */ -#include "speex/speex_types.h" +#ifdef _BUILD_SPEEX +# include "speex_types.h" +#else +# include <speex/speex_types.h> +#endif #ifdef __cplusplus extern "C" { diff --git a/include/speex/speex_preprocess.h b/include/speex/speex_preprocess.h index f8eef2c..2730595 100644 --- a/include/speex/speex_preprocess.h +++ b/include/speex/speex_preprocess.h @@ -43,7 +43,11 @@ * @{ */ -#include "speex/speex_types.h" +#ifdef _BUILD_SPEEX +# include "speex_types.h" +#else +# include <speex/speex_types.h> +#endif #ifdef __cplusplus extern "C" { diff --git a/include/speex/speex_resampler.h b/include/speex/speex_resampler.h index 54eef8d..eb51d42 100644 --- a/include/speex/speex_resampler.h +++ b/include/speex/speex_resampler.h @@ -84,7 +84,11 @@ #else /* OUTSIDE_SPEEX */ -#include "speex/speex_types.h" +#ifdef _BUILD_SPEEX +# include "speex_types.h" +#else +# include <speex/speex_types.h> +#endif #endif /* OUTSIDE_SPEEX */ diff --git a/include/speex/speex_stereo.h b/include/speex/speex_stereo.h index a259713..6eb6c12 100644 --- a/include/speex/speex_stereo.h +++ b/include/speex/speex_stereo.h @@ -39,8 +39,14 @@ * @{ */ -#include "speex/speex_types.h" -#include "speex/speex_bits.h" +#ifdef _BUILD_SPEEX +# include "speex_types.h" +# include "speex_bits.h" +#else +# include <speex/speex_types.h> +# include <speex/speex_bits.h> +#endif + #ifdef __cplusplus extern "C" { diff --git a/include/speex/speex_types.h b/include/speex/speex_types.h index 852fed8..59bb5b4 100644 --- a/include/speex/speex_types.h +++ b/include/speex/speex_types.h @@ -119,7 +119,11 @@ #else +# ifdef _BUILD_SPEEX +# include "include/speex/speex_config_types.h" +#else # include <speex/speex_config_types.h> +#endif #endif diff --git a/libspeex/Makefile.am b/libspeex/Makefile.am index 3d4e03f..891f15e 100644 --- a/libspeex/Makefile.am +++ b/libspeex/Makefile.am @@ -4,7 +4,7 @@ EXTRA_DIST=echo_diagnostic.m -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@ +INCLUDES = -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@ lib_LTLIBRARIES = libspeex.la libspeexdsp.la diff --git a/libspeex/arch.h b/libspeex/arch.h index d38c36c..1de9f92 100644 --- a/libspeex/arch.h +++ b/libspeex/arch.h @@ -75,7 +75,7 @@ #endif #ifndef OUTSIDE_SPEEX -#include "speex/speex_types.h" +#include "../include/speex/speex_types.h" #endif #define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */ diff --git a/libspeex/bits.c b/libspeex/bits.c index 3ef7c6c..8e5e6b6 100644 --- a/libspeex/bits.c +++ b/libspeex/bits.c @@ -36,7 +36,7 @@ #include "config.h" #endif -#include <speex/speex_bits.h> +#include "../include/speex/speex_bits.h" #include "arch.h" #include "os_support.h" diff --git a/libspeex/buffer.c b/libspeex/buffer.c index 6cfd5a3..e094804 100644 --- a/libspeex/buffer.c +++ b/libspeex/buffer.c @@ -38,7 +38,7 @@ #include "os_support.h" #include "arch.h" -#include <speex/speex_buffer.h> +#include "../include/speex/speex_buffer.h" struct SpeexBuffer_ { char *data; diff --git a/libspeex/cb_search.h b/libspeex/cb_search.h index 7687b45..e4fa60b 100644 --- a/libspeex/cb_search.h +++ b/libspeex/cb_search.h @@ -35,7 +35,7 @@ #ifndef CB_SEARCH_H #define CB_SEARCH_H -#include <speex/speex_bits.h> +#include "../include/speex/speex_bits.h" #include "arch.h" /** Split codebook parameters. */ diff --git a/libspeex/jitter.c b/libspeex/jitter.c index 17bd044..68240f1 100644 --- a/libspeex/jitter.c +++ b/libspeex/jitter.c @@ -55,9 +55,9 @@ TODO: #include "arch.h" -#include <speex/speex.h> -#include <speex/speex_bits.h> -#include <speex/speex_jitter.h> +#include "../include/speex/speex.h" +#include "../include/speex/speex_bits.h" +#include "../include/speex/speex_jitter.h" #include "os_support.h" #ifndef NULL diff --git a/libspeex/ltp.c b/libspeex/ltp.c index 0129c95..551ae0b 100644 --- a/libspeex/ltp.c +++ b/libspeex/ltp.c @@ -38,7 +38,7 @@ #include "ltp.h" #include "stack_alloc.h" #include "filters.h" -#include <speex/speex_bits.h> +#include "../include/speex/speex_bits.h" #include "math_approx.h" #include "os_support.h" diff --git a/libspeex/ltp.h b/libspeex/ltp.h index 1e435bc..7a79882 100644 --- a/libspeex/ltp.h +++ b/libspeex/ltp.h @@ -32,7 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <speex/speex_bits.h> +#include "../include/speex/speex_bits.h" #include "arch.h" /** LTP parameters. */ diff --git a/libspeex/mdf.c b/libspeex/mdf.c index 456ab84..04c1df9 100644 --- a/libspeex/mdf.c +++ b/libspeex/mdf.c @@ -42,7 +42,7 @@ Valin, J.-M., On Adjusting the Learning Rate in Frequency Domain Echo Cancellation With Double-Talk. IEEE Transactions on Audio, - Speech and Language Processing, Vol. 15, No. 3, pp. 1030-1034, 2007. + Speech and Language Processing, V<ol. 15, No. 3, pp. 1030-1034, 2007. http://people.xiph.org/~jm/papers/valin_taslp2006.pdf There is no explicit double-talk detection, but a continuous variation @@ -70,7 +70,7 @@ #endif #include "arch.h" -#include "speex/speex_echo.h" +#include "../include/speex/speex_echo.h" #include "fftwrap.h" #include "pseudofloat.h" #include "math_approx.h" diff --git a/libspeex/modes.h b/libspeex/modes.h index 26e2d86..cc4d064 100644 --- a/libspeex/modes.h +++ b/libspeex/modes.h @@ -36,8 +36,8 @@ #ifndef MODES_H #define MODES_H -#include <speex/speex.h> -#include <speex/speex_bits.h> +#include "../include/speex/speex.h" +#include "../include/speex/speex_bits.h" #include "arch.h" #define NB_SUBMODES 16 diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c index 9dd726a..b13960a 100644 --- a/libspeex/nb_celp.c +++ b/libspeex/nb_celp.c @@ -43,12 +43,12 @@ #include "filters.h" #include "stack_alloc.h" #include "vq.h" -#include <speex/speex_bits.h> +#include "../include/speex/speex_bits.h" #include "vbr.h" #include "arch.h" #include "math_approx.h" #include "os_support.h" -#include <speex/speex_callbacks.h> +#include "../include/speex/speex_callbacks.h" #ifdef VORBIS_PSYCHO #include "vorbis_psy.h" diff --git a/libspeex/nb_celp.h b/libspeex/nb_celp.h index 14c776f..3fecab6 100644 --- a/libspeex/nb_celp.h +++ b/libspeex/nb_celp.h @@ -37,8 +37,8 @@ #define NB_CELP_H #include "modes.h" -#include <speex/speex_bits.h> -#include <speex/speex_callbacks.h> +#include "../include/speex/speex_bits.h" +#include "../include/speex/speex_callbacks.h" #include "vbr.h" #include "filters.h" diff --git a/libspeex/preprocess.c b/libspeex/preprocess.c index 1309adf..9b114a8 100644 --- a/libspeex/preprocess.c +++ b/libspeex/preprocess.c @@ -60,8 +60,8 @@ #endif #include <math.h> -#include "speex/speex_preprocess.h" -#include "speex/speex_echo.h" +#include "../include/speex/speex_preprocess.h" +#include "../include/speex/speex_echo.h" #include "arch.h" #include "fftwrap.h" #include "filterbank.h" diff --git a/libspeex/quant_lsp.h b/libspeex/quant_lsp.h index 3bf4d40..2f89430 100644 --- a/libspeex/quant_lsp.h +++ b/libspeex/quant_lsp.h @@ -35,7 +35,7 @@ #ifndef QUANT_LSP_H #define QUANT_LSP_H -#include <speex/speex_bits.h> +#include "../include/speex/speex_bits.h" #include "arch.h" #define MAX_LSP_SIZE 20 diff --git a/libspeex/resample.c b/libspeex/resample.c index bebd1a8..a61cddf 100644 --- a/libspeex/resample.c +++ b/libspeex/resample.c @@ -70,7 +70,7 @@ static void speex_free (void *ptr) {free(ptr);} #include "arch.h" #else /* OUTSIDE_SPEEX */ -#include "speex/speex_resampler.h" +#include "../include/speex/speex_resampler.h" #include "arch.h" #include "os_support.h" #endif /* OUTSIDE_SPEEX */ diff --git a/libspeex/sb_celp.h b/libspeex/sb_celp.h index e8c3761..0d20142 100644 --- a/libspeex/sb_celp.h +++ b/libspeex/sb_celp.h @@ -37,7 +37,7 @@ #define SB_CELP_H #include "modes.h" -#include <speex/speex_bits.h> +#include "../include/speex/speex_bits.h" #include "nb_celp.h" /**Structure representing the full state of the sub-band encoder*/ diff --git a/libspeex/scal.c b/libspeex/scal.c index c6abfd2..1ddaba2 100644 --- a/libspeex/scal.c +++ b/libspeex/scal.c @@ -44,7 +44,7 @@ The algorithm implemented here is described in: #include "config.h" #endif -#include "speex/speex_echo.h" +#include "../include/speex/speex_echo.h" #include "vorbis_psy.h" #include "arch.h" #include "os_support.h" diff --git a/libspeex/speex_callbacks.c b/libspeex/speex_callbacks.c index 0e077c3..27fd19a 100644 --- a/libspeex/speex_callbacks.c +++ b/libspeex/speex_callbacks.c @@ -36,7 +36,7 @@ #include "config.h" #endif -#include <speex/speex_callbacks.h> +#include "../include/speex/speex_callbacks.h" #include "arch.h" #include "os_support.h" diff --git a/libspeex/speex_header.c b/libspeex/speex_header.c index b743059..979fc9f 100644 --- a/libspeex/speex_header.c +++ b/libspeex/speex_header.c @@ -36,8 +36,8 @@ #endif #include "arch.h" -#include <speex/speex_header.h> -#include <speex/speex.h> +#include "../include/speex/speex_header.h" +#include "../include/speex/speex.h" #include "os_support.h" #ifndef NULL diff --git a/libspeex/stereo.c b/libspeex/stereo.c index db5ea4a..1f29a1c 100644 --- a/libspeex/stereo.c +++ b/libspeex/stereo.c @@ -33,8 +33,8 @@ #include "config.h" #endif -#include <speex/speex_stereo.h> -#include <speex/speex_callbacks.h> +#include "../include/speex/speex_stereo.h" +#include "../include/speex/speex_callbacks.h" #include "math_approx.h" #include "vq.h" #include <math.h> diff --git a/libspeex/testdenoise.c b/libspeex/testdenoise.c index 49f5120..9c5398b 100644 --- a/libspeex/testdenoise.c +++ b/libspeex/testdenoise.c @@ -2,7 +2,7 @@ #include "config.h" #endif -#include <speex/speex_preprocess.h> +#include "../include/speex/speex_preprocess.h" #include <stdio.h> #define NN 160 diff --git a/libspeex/testecho.c b/libspeex/testecho.c index 5ae855f..2eedfac 100644 --- a/libspeex/testecho.c +++ b/libspeex/testecho.c @@ -7,8 +7,8 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include "speex/speex_echo.h" -#include "speex/speex_preprocess.h" +#include "../include/speex/speex_echo.h" +#include "../include/speex/speex_preprocess.h" #define NN 128 diff --git a/libspeex/testenc.c b/libspeex/testenc.c index 44c132f..f4709b4 100644 --- a/libspeex/testenc.c +++ b/libspeex/testenc.c @@ -2,10 +2,10 @@ #include "config.h" #endif -#include <speex/speex.h> +#include "../include/speex/speex.h" #include <stdio.h> #include <stdlib.h> -#include <speex/speex_callbacks.h> +#include "../include/speex/speex_callbacks.h" #ifdef FIXED_DEBUG extern long long spx_mips; diff --git a/libspeex/testenc_uwb.c b/libspeex/testenc_uwb.c index 503b64d..18b51d6 100644 --- a/libspeex/testenc_uwb.c +++ b/libspeex/testenc_uwb.c @@ -2,10 +2,10 @@ #include "config.h" #endif -#include <speex/speex.h> +#include "../include/speex/speex.h" #include <stdio.h> #include <stdlib.h> -#include <speex/speex_callbacks.h> +#include "../include/speex/speex_callbacks.h" #ifdef FIXED_DEBUG extern long long spx_mips; diff --git a/libspeex/testenc_wb.c b/libspeex/testenc_wb.c index 3f13184..843bc24 100644 --- a/libspeex/testenc_wb.c +++ b/libspeex/testenc_wb.c @@ -2,10 +2,10 @@ #include "config.h" #endif -#include <speex/speex.h> +#include "../include/speex/speex.h" #include <stdio.h> #include <stdlib.h> -#include <speex/speex_callbacks.h> +#include "../include/speex/speex_callbacks.h" #ifdef FIXED_DEBUG extern long long spx_mips; diff --git a/libspeex/testjitter.c b/libspeex/testjitter.c index 3bcbe2f..c4894fb 100644 --- a/libspeex/testjitter.c +++ b/libspeex/testjitter.c @@ -2,7 +2,7 @@ #include "config.h" #endif -#include <speex/speex_jitter.h> +#include "../include/speex/speex_jitter.h" #include <stdio.h> union jbpdata { diff --git a/libspeex/testresample.c b/libspeex/testresample.c index 71392cc..8e16dc7 100644 --- a/libspeex/testresample.c +++ b/libspeex/testresample.c @@ -35,7 +35,7 @@ #endif #include <stdio.h> -#include "speex/speex_resampler.h" +#include "../include/speex/speex_resampler.h" #include <math.h> #include <stdlib.h> diff --git a/src/Makefile.am b/src/Makefile.am index e5f7591..d955d06 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,7 +5,7 @@ # Disable automatic dependency tracking if using other tools than gcc and gmake #AUTOMAKE_OPTIONS = no-dependencies -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ +INCLUDES = -I$(top_builddir) @OGG_CFLAGS@ man_MANS = speexenc.1 speexdec.1 diff --git a/src/speexdec.c b/src/speexdec.c index 24a62d4..1ee3a50 100644 --- a/src/speexdec.c +++ b/src/speexdec.c @@ -46,7 +46,7 @@ #include <stdlib.h> #include <string.h> -#include <speex/speex.h> +#include "../include/speex/speex.h" #include <ogg/ogg.h> #if defined WIN32 || defined _WIN32 @@ -81,9 +81,9 @@ #include <string.h> #include "wav_io.h" -#include <speex/speex_header.h> -#include <speex/speex_stereo.h> -#include <speex/speex_callbacks.h> +#include "../include/speex/speex_header.h" +#include "../include/speex/speex_stereo.h" +#include "../include/speex/speex_callbacks.h" #define MAX_FRAME_SIZE 2000 diff --git a/src/speexenc.c b/src/speexenc.c index a2554e1..e6e85a4 100644 --- a/src/speexenc.c +++ b/src/speexenc.c @@ -47,12 +47,12 @@ #include <string.h> #include <time.h> -#include <speex/speex.h> +#include "../include/speex/speex.h" #include <ogg/ogg.h> #include "wav_io.h" -#include <speex/speex_header.h> -#include <speex/speex_stereo.h> -#include <speex/speex_preprocess.h> +#include "../include/speex/speex_header.h" +#include "../include/speex/speex_stereo.h" +#include "../include/speex/speex_preprocess.h" #if defined WIN32 || defined _WIN32 /* We need the following two to set stdout to binary */ diff --git a/src/wav_io.c b/src/wav_io.c index 02931b1..c8f466d 100644 --- a/src/wav_io.c +++ b/src/wav_io.c @@ -36,7 +36,7 @@ #include <stdio.h> #include <string.h> -#include "speex/speex_types.h" +#include "../include/speex/speex_types.h" #include "wav_io.h" diff --git a/src/wav_io.h b/src/wav_io.h index 0755763..b6570a2 100644 --- a/src/wav_io.h +++ b/src/wav_io.h @@ -33,7 +33,7 @@ #define WAV_IO_H #include <stdio.h> -#include "speex/speex_types.h" +#include "../include/speex/speex_types.h" #if !defined(__LITTLE_ENDIAN__) && ( defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__) ) #define le_short(s) ((short) ((unsigned short) (s) << 8) | ((unsigned short) (s) >> 8)) |