Merge from default branch
This commit is contained in:
1
.hgtags
1
.hgtags
@@ -10,3 +10,4 @@ efbc861f9b9460068c48a250232d343ffa7d5726 v1.7
|
|||||||
77466ee7ffb5b07efda9b1dbed858379c987a9da v1.8.1
|
77466ee7ffb5b07efda9b1dbed858379c987a9da v1.8.1
|
||||||
d4911a276d96f6232a68c6b8448056d3946043b9 v1.8.1
|
d4911a276d96f6232a68c6b8448056d3946043b9 v1.8.1
|
||||||
fa6a54be7e6bf0c5adffd19ccec622481a8140a5 v1.8.2
|
fa6a54be7e6bf0c5adffd19ccec622481a8140a5 v1.8.2
|
||||||
|
37b18c17c042eafc39483ffb58837de844ba3289 v1.9
|
||||||
|
|||||||
11
.travis.yml
11
.travis.yml
@@ -19,7 +19,16 @@ addons:
|
|||||||
- libfftw3-dev
|
- libfftw3-dev
|
||||||
- vamp-plugin-sdk
|
- vamp-plugin-sdk
|
||||||
- ladspa-sdk
|
- ladspa-sdk
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/Library/Caches/Homebrew
|
||||||
|
- /usr/local/Homebrew
|
||||||
|
|
||||||
|
before_cache:
|
||||||
|
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
|
||||||
|
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ "$TRAVIS_OS_NAME" = "osx" ]] ; then brew update ; brew install libsndfile ; fi
|
- if [[ "$TRAVIS_OS_NAME" = "osx" ]] ; then brew update ; brew install libsndfile ; fi
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ CC := clang
|
|||||||
OPTFLAGS := -ffast-math -freciprocal-math -O3 -ftree-vectorize
|
OPTFLAGS := -ffast-math -freciprocal-math -O3 -ftree-vectorize
|
||||||
|
|
||||||
# For the device
|
# For the device
|
||||||
ARCHFLAGS_DEV := -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=6 -stdlib=libc++ -arch armv7 -arch arm64
|
ARCHFLAGS_DEV := -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=6 -stdlib=libc++ -arch armv7 -arch arm64 -fembed-bitcode
|
||||||
|
|
||||||
# Or for the simulator
|
# Or for the simulator
|
||||||
ARCHFLAGS_SIM := -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -miphoneos-version-min=6 -stdlib=libc++ -arch i386 -arch x86_64
|
ARCHFLAGS_SIM := -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -miphoneos-version-min=6 -stdlib=libc++ -arch i386 -arch x86_64 -fembed-bitcode
|
||||||
|
|
||||||
CXXFLAGS_ANY := $(OPTFLAGS) -I. -Isrc -Irubberband -DMALLOC_IS_ALIGNED -DHAVE_VDSP -DUSE_SPEEX -DUSE_POMMIER_MATHFUN -DNO_THREADING -DNO_THREAD_CHECKS -DNO_TIMING -DNO_TIMING_COMPLETE_NOOP -DNDEBUG
|
CXXFLAGS_ANY := $(OPTFLAGS) -I. -Isrc -Irubberband -DMALLOC_IS_ALIGNED -DHAVE_VDSP -DUSE_SPEEX -DUSE_POMMIER_MATHFUN -DNO_THREADING -DNO_THREAD_CHECKS -DNO_TIMING -DNO_TIMING_COMPLETE_NOOP -DNDEBUG
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ DYNAMIC_EXTENSION := .dylib
|
|||||||
DYNAMIC_FULL_VERSION := 2.1.2
|
DYNAMIC_FULL_VERSION := 2.1.2
|
||||||
DYNAMIC_ABI_VERSION := 2
|
DYNAMIC_ABI_VERSION := 2
|
||||||
DYNAMIC_LDFLAGS := -dynamiclib -install_name $(INSTALL_LIBDIR)/$(LIBNAME).$(DYNAMIC_ABI_VERSION)$(DYNAMIC_EXTENSION) -current_version $(DYNAMIC_FULL_VERSION) -compatibility_version $(DYNAMIC_ABI_VERSION)
|
DYNAMIC_LDFLAGS := -dynamiclib -install_name $(INSTALL_LIBDIR)/$(LIBNAME).$(DYNAMIC_ABI_VERSION)$(DYNAMIC_EXTENSION) -current_version $(DYNAMIC_FULL_VERSION) -compatibility_version $(DYNAMIC_ABI_VERSION)
|
||||||
|
VAMP_LDFLAGS := -dynamiclib -install_name vamp-rubberband.dylib -exported_symbols_list vamp/vamp-plugin.list
|
||||||
|
LADSPA_LDFLAGS := -dynamiclib -install_name ladspa-rubberband.dylib -exported_symbols_list ladspa/ladspa-plugin.list
|
||||||
|
|
||||||
PROGRAM_TARGET := bin/rubberband
|
PROGRAM_TARGET := bin/rubberband
|
||||||
STATIC_TARGET := lib/$(LIBNAME).a
|
STATIC_TARGET := lib/$(LIBNAME).a
|
||||||
|
|||||||
@@ -12,6 +12,13 @@ tempo and pitch of an audio recording independently of one another.
|
|||||||
|
|
||||||
* About Rubber Band: https://breakfastquay.com/rubberband/
|
* About Rubber Band: https://breakfastquay.com/rubberband/
|
||||||
* Code repository: https://hg.sr.ht/~breakfastquay/rubberband
|
* Code repository: https://hg.sr.ht/~breakfastquay/rubberband
|
||||||
|
* Issue tracker: https://todo.sr.ht/~breakfastquay/rubberband
|
||||||
|
* Github mirror: https://github.com/breakfastquay/rubberband
|
||||||
|
|
||||||
|
CI builds:
|
||||||
|
|
||||||
|
* [](https://travis-ci.org/breakfastquay/rubberband) (Linux, macOS, iOS)
|
||||||
|
* [](https://ci.appveyor.com/project/breakfastquay/rubberband) (Windows)
|
||||||
|
|
||||||
|
|
||||||
## Licence
|
## Licence
|
||||||
@@ -193,6 +200,8 @@ Name Flags required Notes
|
|||||||
---- -------------- -----
|
---- -------------- -----
|
||||||
|
|
||||||
libsamplerate -DHAVE_LIBSAMPLERATE GPL until v0.1.8, BSD for v0.1.9 and later.
|
libsamplerate -DHAVE_LIBSAMPLERATE GPL until v0.1.8, BSD for v0.1.9 and later.
|
||||||
|
This is the preferred choice in almost
|
||||||
|
all cases.
|
||||||
|
|
||||||
libresample -DHAVE_LIBRESAMPLE LGPL.
|
libresample -DHAVE_LIBRESAMPLE LGPL.
|
||||||
|
|
||||||
|
|||||||
1
ladspa/ladspa-plugin.list
Normal file
1
ladspa/ladspa-plugin.list
Normal file
@@ -0,0 +1 @@
|
|||||||
|
_ladspa_descriptor
|
||||||
@@ -466,6 +466,10 @@ RubberBandStretcher::Impl::calculateSizes()
|
|||||||
outputIncrement /= 2;
|
outputIncrement /= 2;
|
||||||
inputIncrement = int(outputIncrement / r);
|
inputIncrement = int(outputIncrement / r);
|
||||||
}
|
}
|
||||||
|
while (inputIncrement < 1) {
|
||||||
|
outputIncrement *= 2;
|
||||||
|
inputIncrement = int(outputIncrement / r);
|
||||||
|
}
|
||||||
size_t minwin = roundUp(lrint(outputIncrement * windowIncrRatio));
|
size_t minwin = roundUp(lrint(outputIncrement * windowIncrRatio));
|
||||||
if (windowSize < minwin) windowSize = minwin;
|
if (windowSize < minwin) windowSize = minwin;
|
||||||
|
|
||||||
@@ -501,6 +505,10 @@ RubberBandStretcher::Impl::calculateSizes()
|
|||||||
outputIncrement /= 2;
|
outputIncrement /= 2;
|
||||||
inputIncrement = int(outputIncrement / r);
|
inputIncrement = int(outputIncrement / r);
|
||||||
}
|
}
|
||||||
|
while (inputIncrement < 1) {
|
||||||
|
outputIncrement *= 2;
|
||||||
|
inputIncrement = int(outputIncrement / r);
|
||||||
|
}
|
||||||
windowSize = std::max(windowSize, roundUp(outputIncrement * 6));
|
windowSize = std::max(windowSize, roundUp(outputIncrement * 6));
|
||||||
if (r > 5) while (windowSize < 8192) windowSize *= 2;
|
if (r > 5) while (windowSize < 8192) windowSize *= 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ HighFrequencyAudioCurve::reset()
|
|||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
HighFrequencyAudioCurve::processFloat(const float *R__ mag, int increment)
|
HighFrequencyAudioCurve::processFloat(const float *R__ mag, int)
|
||||||
{
|
{
|
||||||
float result = 0.0;
|
float result = 0.0;
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ HighFrequencyAudioCurve::processFloat(const float *R__ mag, int increment)
|
|||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
HighFrequencyAudioCurve::processDouble(const double *R__ mag, int increment)
|
HighFrequencyAudioCurve::processDouble(const double *R__ mag, int)
|
||||||
{
|
{
|
||||||
float result = 0.0;
|
float result = 0.0;
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ PercussiveAudioCurve::setFftSize(int newSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
PercussiveAudioCurve::processFloat(const float *R__ mag, int increment)
|
PercussiveAudioCurve::processFloat(const float *R__ mag, int)
|
||||||
{
|
{
|
||||||
static float threshold = powf(10.f, 0.15f); // 3dB rise in square of magnitude
|
static float threshold = powf(10.f, 0.15f); // 3dB rise in square of magnitude
|
||||||
static float zeroThresh = powf(10.f, -8);
|
static float zeroThresh = powf(10.f, -8);
|
||||||
@@ -84,7 +84,7 @@ PercussiveAudioCurve::processFloat(const float *R__ mag, int increment)
|
|||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
PercussiveAudioCurve::processDouble(const double *R__ mag, int increment)
|
PercussiveAudioCurve::processDouble(const double *R__ mag, int)
|
||||||
{
|
{
|
||||||
static double threshold = pow(10., 0.15); // 3dB rise in square of magnitude
|
static double threshold = pow(10., 0.15); // 3dB rise in square of magnitude
|
||||||
static double zeroThresh = pow(10., -8);
|
static double zeroThresh = pow(10., -8);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ SpectralDifferenceAudioCurve::setFftSize(int newSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
SpectralDifferenceAudioCurve::processFloat(const float *R__ mag, int increment)
|
SpectralDifferenceAudioCurve::processFloat(const float *R__ mag, int)
|
||||||
{
|
{
|
||||||
double result = 0.0;
|
double result = 0.0;
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ SpectralDifferenceAudioCurve::processFloat(const float *R__ mag, int increment)
|
|||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
SpectralDifferenceAudioCurve::processDouble(const double *R__ mag, int increment)
|
SpectralDifferenceAudioCurve::processDouble(const double *R__ mag, int)
|
||||||
{
|
{
|
||||||
double result = 0.0;
|
double result = 0.0;
|
||||||
|
|
||||||
|
|||||||
@@ -718,7 +718,7 @@ D_SRC::resampleInterleaved(const float *const R__ in,
|
|||||||
{
|
{
|
||||||
SRC_DATA data;
|
SRC_DATA data;
|
||||||
|
|
||||||
int outcount = lrintf(ceilf(incount * ratio));
|
int outcount = lrintf(ceilf(incount * ratio) + 10);
|
||||||
|
|
||||||
data.data_in = const_cast<float *>(in);
|
data.data_in = const_cast<float *>(in);
|
||||||
data.data_out = out;
|
data.data_out = out;
|
||||||
@@ -1209,11 +1209,11 @@ Resampler::Resampler(Resampler::Quality quality, int channels,
|
|||||||
#ifdef HAVE_LIBRESAMPLE
|
#ifdef HAVE_LIBRESAMPLE
|
||||||
m_method = 3;
|
m_method = 3;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBSAMPLERATE
|
|
||||||
m_method = 1;
|
|
||||||
#endif
|
|
||||||
#ifdef USE_SPEEX
|
#ifdef USE_SPEEX
|
||||||
m_method = 2;
|
m_method = 2;
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBSAMPLERATE
|
||||||
|
m_method = 1;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -271,9 +271,13 @@ T **reallocate_channels(T **ptr,
|
|||||||
{
|
{
|
||||||
T **newptr = allocate_channels<T>(channels, count);
|
T **newptr = allocate_channels<T>(channels, count);
|
||||||
if (oldcount && ptr) {
|
if (oldcount && ptr) {
|
||||||
v_copy_channels(newptr, ptr, channels, oldcount < count ? oldcount : count);
|
for (size_t c = 0; c < oldchannels && c < channels; ++c) {
|
||||||
|
for (size_t i = 0; i < oldcount && i < count; ++i) {
|
||||||
|
newptr[c][i] = ptr[c][i];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ptr) deallocate_channels<T>(ptr, channels);
|
if (ptr) deallocate_channels<T>(ptr, oldchannels);
|
||||||
return newptr;
|
return newptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,9 +288,13 @@ T **reallocate_and_zero_extend_channels(T **ptr,
|
|||||||
{
|
{
|
||||||
T **newptr = allocate_and_zero_channels<T>(channels, count);
|
T **newptr = allocate_and_zero_channels<T>(channels, count);
|
||||||
if (oldcount && ptr) {
|
if (oldcount && ptr) {
|
||||||
v_copy_channels(newptr, ptr, channels, oldcount < count ? oldcount : count);
|
for (size_t c = 0; c < oldchannels && c < channels; ++c) {
|
||||||
|
for (size_t i = 0; i < oldcount && i < count; ++i) {
|
||||||
|
newptr[c][i] = ptr[c][i];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ptr) deallocate_channels<T>(ptr, channels);
|
if (ptr) deallocate_channels<T>(ptr, oldchannels);
|
||||||
return newptr;
|
return newptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,11 @@ Mutex::trylock()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Condition::Condition(string name) :
|
Condition::Condition(string
|
||||||
|
#ifdef DEBUG_CONDITION
|
||||||
|
name
|
||||||
|
#endif
|
||||||
|
) :
|
||||||
m_locked(false)
|
m_locked(false)
|
||||||
#ifdef DEBUG_CONDITION
|
#ifdef DEBUG_CONDITION
|
||||||
, m_name(name)
|
, m_name(name)
|
||||||
@@ -456,7 +460,11 @@ Mutex::trylock()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Condition::Condition(string name) :
|
Condition::Condition(string
|
||||||
|
#ifdef DEBUG_CONDITION
|
||||||
|
name
|
||||||
|
#endif
|
||||||
|
) :
|
||||||
m_locked(false)
|
m_locked(false)
|
||||||
#ifdef DEBUG_CONDITION
|
#ifdef DEBUG_CONDITION
|
||||||
, m_name(name)
|
, m_name(name)
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_VDSP
|
#ifdef HAVE_VDSP
|
||||||
#include <Accelerate/Accelerate.h>
|
#include <Accelerate/Accelerate.h>
|
||||||
|
#include <alloca.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@@ -521,7 +522,7 @@ template<>
|
|||||||
inline void v_log(float *const R__ dst,
|
inline void v_log(float *const R__ dst,
|
||||||
const int count)
|
const int count)
|
||||||
{
|
{
|
||||||
float tmp[count];
|
float *tmp = (float *)alloca(count * sizeof(float));
|
||||||
vvlogf(tmp, dst, &count);
|
vvlogf(tmp, dst, &count);
|
||||||
v_copy(dst, tmp, count);
|
v_copy(dst, tmp, count);
|
||||||
}
|
}
|
||||||
@@ -529,7 +530,7 @@ template<>
|
|||||||
inline void v_log(double *const R__ dst,
|
inline void v_log(double *const R__ dst,
|
||||||
const int count)
|
const int count)
|
||||||
{
|
{
|
||||||
double tmp[count];
|
double *tmp = (double *)alloca(count * sizeof(double));
|
||||||
vvlog(tmp, dst, &count);
|
vvlog(tmp, dst, &count);
|
||||||
v_copy(dst, tmp, count);
|
v_copy(dst, tmp, count);
|
||||||
}
|
}
|
||||||
@@ -566,7 +567,7 @@ template<>
|
|||||||
inline void v_exp(float *const R__ dst,
|
inline void v_exp(float *const R__ dst,
|
||||||
const int count)
|
const int count)
|
||||||
{
|
{
|
||||||
float tmp[count];
|
float *tmp = (float *)alloca(count * sizeof(float));
|
||||||
vvexpf(tmp, dst, &count);
|
vvexpf(tmp, dst, &count);
|
||||||
v_copy(dst, tmp, count);
|
v_copy(dst, tmp, count);
|
||||||
}
|
}
|
||||||
@@ -574,7 +575,7 @@ template<>
|
|||||||
inline void v_exp(double *const R__ dst,
|
inline void v_exp(double *const R__ dst,
|
||||||
const int count)
|
const int count)
|
||||||
{
|
{
|
||||||
double tmp[count];
|
double *tmp = (double *)alloca(count * sizeof(double));
|
||||||
vvexp(tmp, dst, &count);
|
vvexp(tmp, dst, &count);
|
||||||
v_copy(dst, tmp, count);
|
v_copy(dst, tmp, count);
|
||||||
}
|
}
|
||||||
@@ -611,7 +612,7 @@ template<>
|
|||||||
inline void v_sqrt(float *const R__ dst,
|
inline void v_sqrt(float *const R__ dst,
|
||||||
const int count)
|
const int count)
|
||||||
{
|
{
|
||||||
float tmp[count];
|
float *tmp = (float *)alloca(count * sizeof(float));
|
||||||
vvsqrtf(tmp, dst, &count);
|
vvsqrtf(tmp, dst, &count);
|
||||||
v_copy(dst, tmp, count);
|
v_copy(dst, tmp, count);
|
||||||
}
|
}
|
||||||
@@ -619,7 +620,7 @@ template<>
|
|||||||
inline void v_sqrt(double *const R__ dst,
|
inline void v_sqrt(double *const R__ dst,
|
||||||
const int count)
|
const int count)
|
||||||
{
|
{
|
||||||
double tmp[count];
|
double *tmp = (double *)alloca(count * sizeof(double));
|
||||||
vvsqrt(tmp, dst, &count);
|
vvsqrt(tmp, dst, &count);
|
||||||
v_copy(dst, tmp, count);
|
v_copy(dst, tmp, count);
|
||||||
}
|
}
|
||||||
@@ -676,8 +677,10 @@ template<>
|
|||||||
inline void v_abs(float *const R__ dst,
|
inline void v_abs(float *const R__ dst,
|
||||||
const int count)
|
const int count)
|
||||||
{
|
{
|
||||||
float tmp[count];
|
float *tmp = (float *)alloca(count * sizeof(float));
|
||||||
#if (defined(MACOSX_DEPLOYMENT_TARGET) && MACOSX_DEPLOYMENT_TARGET <= 1070 && MAC_OS_X_VERSION_MIN_REQUIRED <= 1070)
|
#if TARGET_OS_IPHONE
|
||||||
|
vvfabsf(tmp, dst, &count);
|
||||||
|
#elif (defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
|
||||||
vvfabf(tmp, dst, &count);
|
vvfabf(tmp, dst, &count);
|
||||||
#else
|
#else
|
||||||
vvfabsf(tmp, dst, &count);
|
vvfabsf(tmp, dst, &count);
|
||||||
|
|||||||
1
vamp/vamp-plugin.list
Normal file
1
vamp/vamp-plugin.list
Normal file
@@ -0,0 +1 @@
|
|||||||
|
_vampGetPluginDescriptor
|
||||||
Reference in New Issue
Block a user