From eb7e17164351e0bccfd45c69d9a57c24945fd0e0 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Tue, 14 Jun 2022 17:56:13 +0100 Subject: [PATCH] Further build updates --- otherbuilds/Android.mk | 56 +++++++++++----------------- otherbuilds/Makefile.ios | 1 + otherbuilds/Makefile.linux | 1 + otherbuilds/Makefile.macos | 1 + otherbuilds/Makefile.macos-universal | 1 + otherbuilds/check.sh | 10 ++--- 6 files changed, 30 insertions(+), 40 deletions(-) diff --git a/otherbuilds/Android.mk b/otherbuilds/Android.mk index 8df6faa..f1ef0b2 100644 --- a/otherbuilds/Android.mk +++ b/otherbuilds/Android.mk @@ -11,52 +11,39 @@ RUBBERBAND_JNI_FILES := \ $(RUBBERBAND_SRC_PATH)/jni/RubberBandStretcherJNI.cpp RUBBERBAND_SRC_FILES := \ - $(RUBBERBAND_SRC_PATH)/base/Profiler.cpp \ - $(RUBBERBAND_SRC_PATH)/system/Thread.cpp \ - $(RUBBERBAND_SRC_PATH)/system/Allocators.cpp \ - $(RUBBERBAND_SRC_PATH)/system/sysutils.cpp \ - $(RUBBERBAND_SRC_PATH)/system/VectorOpsComplex.cpp \ - $(RUBBERBAND_SRC_PATH)/StretcherChannelData.cpp \ - $(RUBBERBAND_SRC_PATH)/dsp/AudioCurveCalculator.cpp \ - $(RUBBERBAND_SRC_PATH)/dsp/FFT.cpp \ - $(RUBBERBAND_SRC_PATH)/dsp/Resampler.cpp \ - $(RUBBERBAND_SRC_PATH)/audiocurves/SilentAudioCurve.cpp \ - $(RUBBERBAND_SRC_PATH)/audiocurves/CompoundAudioCurve.cpp \ - $(RUBBERBAND_SRC_PATH)/audiocurves/HighFrequencyAudioCurve.cpp \ - $(RUBBERBAND_SRC_PATH)/audiocurves/SpectralDifferenceAudioCurve.cpp \ - $(RUBBERBAND_SRC_PATH)/audiocurves/ConstantAudioCurve.cpp \ - $(RUBBERBAND_SRC_PATH)/audiocurves/PercussiveAudioCurve.cpp \ - $(RUBBERBAND_SRC_PATH)/StretcherImpl.cpp \ - $(RUBBERBAND_SRC_PATH)/StretcherProcess.cpp \ - $(RUBBERBAND_SRC_PATH)/StretchCalculator.cpp \ - $(RUBBERBAND_SRC_PATH)/RubberBandStretcher.cpp \ - $(RUBBERBAND_SRC_PATH)/rubberband-c.cpp \ - $(RUBBERBAND_SRC_PATH)/speex/resample.c + $(RUBBERBAND_SRC_PATH)/rubberband-c.cpp \ + $(RUBBERBAND_SRC_PATH)/RubberBandStretcher.cpp \ + $(RUBBERBAND_SRC_PATH)/faster/AudioCurveCalculator.cpp \ + $(RUBBERBAND_SRC_PATH)/faster/CompoundAudioCurve.cpp \ + $(RUBBERBAND_SRC_PATH)/faster/HighFrequencyAudioCurve.cpp \ + $(RUBBERBAND_SRC_PATH)/faster/SilentAudioCurve.cpp \ + $(RUBBERBAND_SRC_PATH)/faster/PercussiveAudioCurve.cpp \ + $(RUBBERBAND_SRC_PATH)/faster/StretcherChannelData.cpp \ + $(RUBBERBAND_SRC_PATH)/faster/StretcherImpl.cpp \ + $(RUBBERBAND_SRC_PATH)/faster/StretcherProcess.cpp \ + $(RUBBERBAND_SRC_PATH)/common/BQResampler.cpp \ + $(RUBBERBAND_SRC_PATH)/common/Profiler.cpp \ + $(RUBBERBAND_SRC_PATH)/common/Resampler.cpp \ + $(RUBBERBAND_SRC_PATH)/common/FFT.cpp \ + $(RUBBERBAND_SRC_PATH)/common/Allocators.cpp \ + $(RUBBERBAND_SRC_PATH)/common/StretchCalculator.cpp \ + $(RUBBERBAND_SRC_PATH)/common/sysutils.cpp \ + $(RUBBERBAND_SRC_PATH)/common/Thread.cpp \ + $(RUBBERBAND_SRC_PATH)/finer/R3StretcherImpl.cpp LOCAL_SRC_FILES += \ $(RUBBERBAND_JNI_FILES) \ $(RUBBERBAND_SRC_FILES) -LOCAL_SRC_FILES += \ - $(RUBBERBAND_SRC_PATH)/kissfft/kiss_fft.c \ - $(RUBBERBAND_SRC_PATH)/kissfft/kiss_fftr.c - LOCAL_CFLAGS_DEBUG := \ -g \ - -mfloat-abi=softfp \ -DWANT_TIMING \ -DFFT_MEASUREMENT LOCAL_CFLAGS_RELEASE := \ -O3 \ - -mfpu=neon \ - -mfloat-abi=softfp \ -ffast-math \ -ftree-vectorize \ - -freciprocal-math \ - -fsingle-precision-constant \ - -D__ARM_ARCH_7__ \ - -DUSE_POMMIER_MATHFUN \ -DNO_TIMING \ -DNO_TIMING_COMPLETE_NOOP @@ -64,9 +51,8 @@ LOCAL_CFLAGS := \ -Wall \ -I$(RUBBERBAND_PATH) \ -I$(RUBBERBAND_SRC_PATH) \ - -DUSE_SPEEX \ - -DUSE_KISSFFT \ - -DPROCESS_SAMPLE_TYPE=float \ + -DUSE_BQRESAMPLER \ + -DUSE_BUILTIN_FFT \ -DLACK_POSIX_MEMALIGN \ -DUSE_OWN_ALIGNED_MALLOC \ -DLACK_SINCOS \ diff --git a/otherbuilds/Makefile.ios b/otherbuilds/Makefile.ios index 6a5e67c..938435a 100644 --- a/otherbuilds/Makefile.ios +++ b/otherbuilds/Makefile.ios @@ -47,6 +47,7 @@ LIBRARY_SOURCES := \ src/faster/StretcherChannelData.cpp \ src/faster/StretcherImpl.cpp \ src/faster/StretcherProcess.cpp \ + src/common/BQResampler.cpp \ src/common/Profiler.cpp \ src/common/Resampler.cpp \ src/common/FFT.cpp \ diff --git a/otherbuilds/Makefile.linux b/otherbuilds/Makefile.linux index 7ca5470..e721c4b 100644 --- a/otherbuilds/Makefile.linux +++ b/otherbuilds/Makefile.linux @@ -36,6 +36,7 @@ LIBRARY_SOURCES := \ src/faster/StretcherChannelData.cpp \ src/faster/StretcherImpl.cpp \ src/faster/StretcherProcess.cpp \ + src/common/BQResampler.cpp \ src/common/Profiler.cpp \ src/common/Resampler.cpp \ src/common/FFT.cpp \ diff --git a/otherbuilds/Makefile.macos b/otherbuilds/Makefile.macos index 1bd1184..db68eae 100644 --- a/otherbuilds/Makefile.macos +++ b/otherbuilds/Makefile.macos @@ -36,6 +36,7 @@ LIBRARY_SOURCES := \ src/faster/StretcherChannelData.cpp \ src/faster/StretcherImpl.cpp \ src/faster/StretcherProcess.cpp \ + src/common/BQResampler.cpp \ src/common/Profiler.cpp \ src/common/Resampler.cpp \ src/common/FFT.cpp \ diff --git a/otherbuilds/Makefile.macos-universal b/otherbuilds/Makefile.macos-universal index 0b32b75..69e6180 100644 --- a/otherbuilds/Makefile.macos-universal +++ b/otherbuilds/Makefile.macos-universal @@ -36,6 +36,7 @@ LIBRARY_SOURCES := \ src/faster/StretcherChannelData.cpp \ src/faster/StretcherImpl.cpp \ src/faster/StretcherProcess.cpp \ + src/common/BQResampler.cpp \ src/common/Profiler.cpp \ src/common/Resampler.cpp \ src/common/FFT.cpp \ diff --git a/otherbuilds/check.sh b/otherbuilds/check.sh index 0a3c3e5..ed495a0 100755 --- a/otherbuilds/check.sh +++ b/otherbuilds/check.sh @@ -5,17 +5,17 @@ if [ ! -d /Applications ]; then # Assumed to be Linux echo " *** Building static library using Linux-specific Makefile" -# make -f otherbuilds/Makefile.linux clean + make -f otherbuilds/Makefile.linux clean make -f otherbuilds/Makefile.linux echo " *** Linking against static library" - g++ main/main.cpp lib/librubberband.a -I. -Isrc -o test -lsndfile -lsamplerate -lpthread + g++ main/main.cpp lib/librubberband.a -I. -Isrc -o test -lsndfile -lpthread echo " *** Running build from Linux-specific Makefile" ./test -V echo " *** Building with single-file source" - g++ main/main.cpp single/RubberBandSingle.cpp -o test_single -lsndfile + g++ -O3 main/main.cpp single/RubberBandSingle.cpp -o test_single -lsndfile echo " *** Running build from single-file source" ./test_single -V @@ -29,13 +29,13 @@ else make -f otherbuilds/Makefile.macos echo " *** Linking against static library" - c++ main/main.cpp lib/librubberband.a -I. -Isrc -o test -lsndfile -lsamplerate -framework Accelerate + c++ main/main.cpp lib/librubberband.a -I. -Isrc -o test -lsndfile -framework Accelerate echo " *** Running build from macOS-specific Makefile" ./test -V echo " *** Building with single-file source" -c++ main/main.cpp single/RubberBandSingle.cpp -o test_single -lsndfile -framework Accelerate + c++ -O3 main/main.cpp single/RubberBandSingle.cpp -o test_single -lsndfile -framework Accelerate echo " *** Running build from single-file source" ./test_single -V