Mercurial > hg > sonic-visualiser
changeset 2210:a7da61b09a59
Merge from branch rubberband-static. This actually undoes the source inclusion of Rubber Band and just switches to static linkage for the .deb package.
author | Chris Cannam |
---|---|
date | Thu, 31 Jan 2019 13:17:28 +0000 |
parents | d25951da2422 (current diff) 07e957f5d3d8 (diff) |
children | ba22d9c5d898 |
files | rubberband-all.cpp |
diffstat | 9 files changed, 166 insertions(+), 61 deletions(-) [+] |
line wrap: on
line diff
--- a/base.pri Wed Jan 30 15:00:48 2019 +0000 +++ b/base.pri Thu Jan 31 13:17:28 2019 +0000 @@ -20,9 +20,7 @@ svcore/plugin/api/alsa \ svgui \ svapp \ - vamp-plugin-sdk \ - rubberband \ - rubberband/src + vamp-plugin-sdk DEPENDPATH += $$SV_INCLUDEPATH INCLUDEPATH += $$SV_INCLUDEPATH @@ -36,8 +34,4 @@ # Defines for Dataquay DEFINES += USE_SORD -# Defines for Rubber Band -linux*: DEFINES += USE_PTHREADS -macx*: DEFINES += USE_PTHREADS - CONFIG += qt thread warn_on stl rtti exceptions
--- a/bq-files.pri Wed Jan 30 15:00:48 2019 +0000 +++ b/bq-files.pri Thu Jan 31 13:17:28 2019 +0000 @@ -27,8 +27,7 @@ bqaudiostream/bqaudiostream/AudioReadStream.h \ bqaudiostream/bqaudiostream/AudioReadStreamFactory.h \ bqaudiostream/bqaudiostream/Exceptions.h \ - bqthingfactory/bqthingfactory/ThingFactory.h \ - rubberband/rubberband/RubberBandStretcher.h + bqthingfactory/bqthingfactory/ThingFactory.h BQ_SOURCES += \ bqvec/src/Allocators.cpp \ @@ -46,6 +45,5 @@ bqaudioio/src/SystemRecordSource.cpp \ bqaudiostream/src/AudioReadStream.cpp \ bqaudiostream/src/AudioReadStreamFactory.cpp \ - bqaudiostream/src/AudioStreamExceptions.cpp \ - rubberband-all.cpp + bqaudiostream/src/AudioStreamExceptions.cpp
--- a/configure Wed Jan 30 15:00:48 2019 +0000 +++ b/configure Thu Jan 31 13:17:28 2019 +0000 @@ -658,6 +658,8 @@ serd_CFLAGS sord_LIBS sord_CFLAGS +rubberband_LIBS +rubberband_CFLAGS libsamplerate_LIBS libsamplerate_CFLAGS sndfile_LIBS @@ -758,6 +760,8 @@ sndfile_LIBS libsamplerate_CFLAGS libsamplerate_LIBS +rubberband_CFLAGS +rubberband_LIBS sord_CFLAGS sord_LIBS serd_CFLAGS @@ -1427,6 +1431,10 @@ C compiler flags for libsamplerate, overriding pkg-config libsamplerate_LIBS linker flags for libsamplerate, overriding pkg-config + rubberband_CFLAGS + C compiler flags for rubberband, overriding pkg-config + rubberband_LIBS + linker flags for rubberband, overriding pkg-config sord_CFLAGS C compiler flags for sord, overriding pkg-config sord_LIBS linker flags for sord, overriding pkg-config serd_CFLAGS C compiler flags for serd, overriding pkg-config @@ -5275,6 +5283,157 @@ fi +SV_MODULE_MODULE=rubberband +SV_MODULE_VERSION_TEST="rubberband" +SV_MODULE_HEADER=rubberband/RubberBandStretcher.h +SV_MODULE_LIB=rubberband +SV_MODULE_FUNC=rubberband_new +SV_MODULE_HAVE=HAVE_$(echo rubberband | tr 'a-z' 'A-Z') +SV_MODULE_FAILED=1 +if test -n "$rubberband_LIBS" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE" >&5 +$as_echo "$as_me: User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE" >&6;} + CXXFLAGS="$CXXFLAGS $rubberband_CFLAGS" + LIBS="$LIBS $rubberband_LIBS" + SV_MODULE_FAILED="" +fi +if test -z "$SV_MODULE_VERSION_TEST" ; then + SV_MODULE_VERSION_TEST=$SV_MODULE_MODULE +fi +if test -n "$SV_MODULE_FAILED" && test -n "$PKG_CONFIG"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rubberband" >&5 +$as_echo_n "checking for rubberband... " >&6; } + +if test -n "$rubberband_CFLAGS"; then + pkg_cv_rubberband_CFLAGS="$rubberband_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_rubberband_CFLAGS=`$PKG_CONFIG --cflags "$SV_MODULE_VERSION_TEST" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$rubberband_LIBS"; then + pkg_cv_rubberband_LIBS="$rubberband_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$SV_MODULE_VERSION_TEST\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$SV_MODULE_VERSION_TEST") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_rubberband_LIBS=`$PKG_CONFIG --libs "$SV_MODULE_VERSION_TEST" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + rubberband_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$SV_MODULE_VERSION_TEST" 2>&1` + else + rubberband_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$SV_MODULE_VERSION_TEST" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$rubberband_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5 +$as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;} +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&5 +$as_echo "$as_me: Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means" >&6;} +else + rubberband_CFLAGS=$pkg_cv_rubberband_CFLAGS + rubberband_LIBS=$pkg_cv_rubberband_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVES="$HAVES $SV_MODULE_HAVE";CXXFLAGS="$CXXFLAGS $rubberband_CFLAGS";LIBS="$LIBS $rubberband_LIBS";SV_MODULE_FAILED="" +fi +fi +if test -n "$SV_MODULE_FAILED"; then + as_ac_Header=`$as_echo "ac_cv_header_$SV_MODULE_HEADER" | $as_tr_sh` +ac_fn_cxx_check_header_mongrel "$LINENO" "$SV_MODULE_HEADER" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + HAVES="$HAVES $SV_MODULE_HAVE" +else + as_fn_error $? "Failed to find header $SV_MODULE_HEADER for required module $SV_MODULE_MODULE" "$LINENO" 5 +fi + + + if test -n "$SV_MODULE_LIB"; then + as_ac_Lib=`$as_echo "ac_cv_lib_$SV_MODULE_LIB''_$SV_MODULE_FUNC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SV_MODULE_FUNC in -l$SV_MODULE_LIB" >&5 +$as_echo_n "checking for $SV_MODULE_FUNC in -l$SV_MODULE_LIB... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$SV_MODULE_LIB $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $SV_MODULE_FUNC (); +int +main () +{ +return $SV_MODULE_FUNC (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + LIBS="$LIBS -l$SV_MODULE_LIB" +else + as_fn_error $? "Failed to find library $SV_MODULE_LIB for required module $SV_MODULE_MODULE" "$LINENO" 5 +fi + + fi +fi + + SV_MODULE_MODULE=sord SV_MODULE_VERSION_TEST="sord-0 >= 0.5" SV_MODULE_HEADER=sord/sord.h
--- a/configure.ac Wed Jan 30 15:00:48 2019 +0000 +++ b/configure.ac Thu Jan 31 13:17:28 2019 +0000 @@ -94,6 +94,7 @@ SV_MODULE_REQUIRED([fftw3f],[fftw3f >= 3.0.0],[fftw3.h],[fftw3f],[fftwf_execute]) SV_MODULE_REQUIRED([sndfile],[sndfile >= 1.0.16],[sndfile.h],[sndfile],[sf_open]) SV_MODULE_REQUIRED([libsamplerate],[samplerate >= 0.1.2],[samplerate.h],[samplerate],[src_new]) +SV_MODULE_REQUIRED([rubberband],[rubberband],[rubberband/RubberBandStretcher.h],[rubberband],[rubberband_new]) SV_MODULE_REQUIRED([sord],[sord-0 >= 0.5],[sord/sord.h],[sord-0],[sord_world_new]) SV_MODULE_REQUIRED([serd],[serd-0 >= 0.5],[serd/serd.h],[serd-0],[serd_reader_read_file])
--- a/deploy/linux/docker/Dockerfile_deb.in Wed Jan 30 15:00:48 2019 +0000 +++ b/deploy/linux/docker/Dockerfile_deb.in Thu Jan 31 13:17:28 2019 +0000 @@ -53,6 +53,8 @@ RUN echo '{"accounts": {"bitbucket": "cannam"}}' > .repoint.json RUN ( echo '[ui]' ; echo 'ssh = ssh -i /root/.ssh/id_dsa_build' ) > .hgrc +RUN rm -f /usr/lib/x86_64-linux-gnu/librubberband.so* + WORKDIR /sonic-visualiser RUN ./configure RUN make -j3
--- a/noconfig.pri Wed Jan 30 15:00:48 2019 +0000 +++ b/noconfig.pri Thu Jan 31 13:17:28 2019 +0000 @@ -33,6 +33,7 @@ LIBS += \ -lbase \ -lbz2 \ + -lrubberband \ -lfftw3 \ -lfftw3f \ -lsndfile \
--- a/repoint-lock.json Wed Jan 30 15:00:48 2019 +0000 +++ b/repoint-lock.json Thu Jan 31 13:17:28 2019 +0000 @@ -42,9 +42,6 @@ "bqthingfactory": { "pin": "7686116dcdd5" }, - "rubberband": { - "pin": "6990f06c9f49" - }, "sv-dependency-builds": { "pin": "2f2b27544483" },
--- a/repoint-project.json Wed Jan 30 15:00:48 2019 +0000 +++ b/repoint-project.json Thu Jan 31 13:17:28 2019 +0000 @@ -76,11 +76,6 @@ "service": "bitbucket", "owner": "breakfastquay" }, - "rubberband": { - "vcs": "hg", - "service": "bitbucket", - "owner": "breakfastquay" - }, "sv-dependency-builds": { "vcs": "hg", "service": "soundsoftware"
--- a/rubberband-all.cpp Wed Jan 30 15:00:48 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ - -#pragma GCC diagnostic ignored "-Wconversion" -#pragma GCC diagnostic ignored "-Wfloat-conversion" -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-variable" -#pragma GCC diagnostic ignored "-Wunused-value" -#pragma GCC diagnostic ignored "-Wsign-compare" - -#define USE_KISSFFT 1 -#define USE_SPEEX 1 - -#define SV_PROFILER_H 1 // Include guard - avoid reading two Profiler.h files. - // Yes, it's gross - -#ifdef _MSC_VER -#define __MSVC__ -#endif - -#include "rubberband/src/rubberband-c.cpp" -#include "rubberband/src/RubberBandStretcher.cpp" -#include "rubberband/src/StretcherProcess.cpp" -#include "rubberband/src/StretchCalculator.cpp" -#include "rubberband/src/dsp/AudioCurveCalculator.cpp" -#include "rubberband/src/base/Profiler.cpp" -#include "rubberband/src/audiocurves/CompoundAudioCurve.cpp" -#include "rubberband/src/audiocurves/SpectralDifferenceAudioCurve.cpp" -#include "rubberband/src/audiocurves/HighFrequencyAudioCurve.cpp" -#include "rubberband/src/audiocurves/SilentAudioCurve.cpp" -#include "rubberband/src/audiocurves/ConstantAudioCurve.cpp" -#include "rubberband/src/audiocurves/PercussiveAudioCurve.cpp" -#include "rubberband/src/dsp/Resampler.cpp" -#include "rubberband/src/dsp/FFT.cpp" -#include "rubberband/src/system/Allocators.cpp" -#include "rubberband/src/system/sysutils.cpp" -#include "rubberband/src/system/Thread.cpp" -#include "rubberband/src/StretcherChannelData.cpp" -#include "rubberband/src/StretcherImpl.cpp" -#include "rubberband/src/kissfft/kiss_fft.c" -#include "rubberband/src/kissfft/kiss_fftr.c" -#include "rubberband/src/speex/resample.c" - -