[pulseaudio-discuss] [PATCH 3/4] Added libsoxr detection and optional build of soxr resampler backend.
Andrey Semashev
andrey.semashev at gmail.com
Wed Jan 7 06:08:54 PST 2015
---
configure.ac | 17 +++++++++++++++++
src/Makefile.am | 6 ++++++
2 files changed, 23 insertions(+)
diff --git a/configure.ac b/configure.ac
index 2ccf094..23144d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1140,6 +1140,21 @@ AS_IF([test "x$with_speex" = "xyes" && test "x$HAVE_SPEEX" = "x0"],
AM_CONDITIONAL([HAVE_SPEEX], [test "x$HAVE_SPEEX" = "x1"])
AS_IF([test "x$HAVE_SPEEX" = "x1"], AC_DEFINE([HAVE_SPEEX], 1, [Have speex]))
+#### soxr (optional) ####
+
+AC_ARG_WITH([soxr],
+ AS_HELP_STRING([--without-soxr],[Omit soxr (resampling)]))
+
+AS_IF([test "x$with_soxr" != "xno"],
+ [PKG_CHECK_MODULES(LIBSOXR, [ soxr >= 0.1.1 ], HAVE_SOXR=1, HAVE_SOXR=0)],
+ HAVE_SOXR=0)
+
+AS_IF([test "x$with_soxr" = "xyes" && test "x$HAVE_SOXR" = "x0"],
+ [AC_MSG_ERROR([*** soxr support not found])])
+
+AM_CONDITIONAL([HAVE_SOXR], [test "x$HAVE_SOXR" = "x1"])
+AS_IF([test "x$HAVE_SOXR" = "x1"], AC_DEFINE([HAVE_SOXR], 1, [Have soxr]))
+
#### Xen support (optional) ####
AC_ARG_ENABLE([xen],
@@ -1528,6 +1543,7 @@ AS_IF([test "x$HAVE_FFTW" = "x1"], ENABLE_FFTW=yes, ENABLE_FFTW=no)
AS_IF([test "x$HAVE_ORC" = "xyes"], ENABLE_ORC=yes, ENABLE_ORC=no)
AS_IF([test "x$HAVE_ADRIAN_EC" = "x1"], ENABLE_ADRIAN_EC=yes, ENABLE_ADRIAN_EC=no)
AS_IF([test "x$HAVE_SPEEX" = "x1"], ENABLE_SPEEX=yes, ENABLE_SPEEX=no)
+AS_IF([test "x$HAVE_SOXR" = "x1"], ENABLE_SOXR=yes, ENABLE_SOXR=no)
AS_IF([test "x$HAVE_WEBRTC" = "x1"], ENABLE_WEBRTC=yes, ENABLE_WEBRTC=no)
AS_IF([test "x$HAVE_TDB" = "x1"], ENABLE_TDB=yes, ENABLE_TDB=no)
AS_IF([test "x$HAVE_GDBM" = "x1"], ENABLE_GDBM=yes, ENABLE_GDBM=no)
@@ -1589,6 +1605,7 @@ echo "
Enable orc: ${ENABLE_ORC}
Enable Adrian echo canceller: ${ENABLE_ADRIAN_EC}
Enable speex (resampler, AEC): ${ENABLE_SPEEX}
+ Enable soxr (resampler): ${ENABLE_SOXR}
Enable WebRTC echo canceller: ${ENABLE_WEBRTC}
Enable gcov coverage: ${ENABLE_GCOV}
Enable unit tests: ${ENABLE_TESTS}
diff --git a/src/Makefile.am b/src/Makefile.am
index 88a824e..5a88531 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1021,6 +1021,12 @@ libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS += $(LIBSPEEX_CFLAGS)
libpulsecore_ at PA_MAJORMINOR@_la_LIBADD += $(LIBSPEEX_LIBS)
endif
+if HAVE_SOXR
+libpulsecore_ at PA_MAJORMINOR@_la_SOURCES += pulsecore/resampler/soxr.c
+libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS += $(LIBSOXR_CFLAGS)
+libpulsecore_ at PA_MAJORMINOR@_la_LIBADD += $(LIBSOXR_LIBS)
+endif
+
if HAVE_LIBSAMPLERATE
libpulsecore_ at PA_MAJORMINOR@_la_SOURCES += pulsecore/resampler/libsamplerate.c
libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS += $(LIBSAMPLERATE_CFLAGS)
--
2.1.0
More information about the pulseaudio-discuss
mailing list