diff --git a/BasicLimiter/source/dsp/limiter.hpp b/BasicLimiter/source/dsp/limiter.hpp index 0a9ddfaa..09830c03 100644 --- a/BasicLimiter/source/dsp/limiter.hpp +++ b/BasicLimiter/source/dsp/limiter.hpp @@ -35,7 +35,7 @@ template class IntDelay { void resize(size_t size) { - buf.resize(size); + buf.resize(size + 1); wptr = 0; rptr = 0; } diff --git a/BasicLimiter/source/version.hpp b/BasicLimiter/source/version.hpp index 6c9af523..5e5d9f48 100644 --- a/BasicLimiter/source/version.hpp +++ b/BasicLimiter/source/version.hpp @@ -29,11 +29,11 @@ #define SUB_VERSION_STR "1" #define SUB_VERSION_INT 1 -#define RELEASE_NUMBER_STR "8" -#define RELEASE_NUMBER_INT 8 +#define RELEASE_NUMBER_STR "9" +#define RELEASE_NUMBER_INT 9 -#define BUILD_NUMBER_STR "9" -#define BUILD_NUMBER_INT 9 +#define BUILD_NUMBER_STR "10" +#define BUILD_NUMBER_INT 10 #define FULL_VERSION_STR \ MAJOR_VERSION_STR "." SUB_VERSION_STR "." RELEASE_NUMBER_STR "." BUILD_NUMBER_STR diff --git a/BasicLimiterAutoMake/source/dsp/limiter.hpp b/BasicLimiterAutoMake/source/dsp/limiter.hpp index c1432d10..aa14a5cc 100644 --- a/BasicLimiterAutoMake/source/dsp/limiter.hpp +++ b/BasicLimiterAutoMake/source/dsp/limiter.hpp @@ -35,7 +35,7 @@ template class IntDelay { void resize(size_t size) { - buf.resize(size); + buf.resize(size + 1); wptr = 0; rptr = 0; } diff --git a/BasicLimiterAutoMake/source/version.hpp b/BasicLimiterAutoMake/source/version.hpp index 9c692cba..5eb33924 100644 --- a/BasicLimiterAutoMake/source/version.hpp +++ b/BasicLimiterAutoMake/source/version.hpp @@ -29,11 +29,11 @@ #define SUB_VERSION_STR "1" #define SUB_VERSION_INT 1 -#define RELEASE_NUMBER_STR "8" -#define RELEASE_NUMBER_INT 8 +#define RELEASE_NUMBER_STR "9" +#define RELEASE_NUMBER_INT 9 -#define BUILD_NUMBER_STR "10" -#define BUILD_NUMBER_INT 10 +#define BUILD_NUMBER_STR "11" +#define BUILD_NUMBER_INT 11 #define FULL_VERSION_STR \ MAJOR_VERSION_STR "." SUB_VERSION_STR "." RELEASE_NUMBER_STR "." BUILD_NUMBER_STR diff --git a/ParallelComb/source/dsp/dspcore.cpp b/ParallelComb/source/dsp/dspcore.cpp index 64d9ac27..549bc43c 100644 --- a/ParallelComb/source/dsp/dspcore.cpp +++ b/ParallelComb/source/dsp/dspcore.cpp @@ -37,7 +37,7 @@ constexpr float feedbackLimiterAttackSeconds = 64.0f / 48000.0f; -template T lerp(T a, T b, T t) { return a + t * (b - a); } +template inline T lerp(T a, T b, T t) { return a + t * (b - a); } void DSPCORE_NAME::setup(double sampleRate) { diff --git a/ParallelComb/source/dsp/parallelcomb.hpp b/ParallelComb/source/dsp/parallelcomb.hpp index 8bce2a81..27e7380c 100644 --- a/ParallelComb/source/dsp/parallelcomb.hpp +++ b/ParallelComb/source/dsp/parallelcomb.hpp @@ -104,6 +104,8 @@ template class ParallelComb { public: ParallelCombSmoother time; + ParallelComb() : buf(4) {} + void setup(Sample sampleRate, Sample maxTime) { auto &&size = size_t(sampleRate * maxTime) + 1; diff --git a/ParallelComb/source/version.hpp b/ParallelComb/source/version.hpp index 50ba77ef..a81057c6 100644 --- a/ParallelComb/source/version.hpp +++ b/ParallelComb/source/version.hpp @@ -29,11 +29,11 @@ #define SUB_VERSION_STR "2" #define SUB_VERSION_INT 2 -#define RELEASE_NUMBER_STR "0" -#define RELEASE_NUMBER_INT 0 +#define RELEASE_NUMBER_STR "1" +#define RELEASE_NUMBER_INT 1 -#define BUILD_NUMBER_STR "1" -#define BUILD_NUMBER_INT 1 +#define BUILD_NUMBER_STR "2" +#define BUILD_NUMBER_INT 2 #define FULL_VERSION_STR \ MAJOR_VERSION_STR "." SUB_VERSION_STR "." RELEASE_NUMBER_STR "." BUILD_NUMBER_STR diff --git a/common/dsp/basiclimiter.hpp b/common/dsp/basiclimiter.hpp index d153b1bb..f98fcbb0 100644 --- a/common/dsp/basiclimiter.hpp +++ b/common/dsp/basiclimiter.hpp @@ -37,7 +37,7 @@ template class IntDelay { void resize(size_t size) { - buf.resize(size); + buf.resize(size + 1); wptr = 0; rptr = 0; } @@ -48,15 +48,15 @@ template class IntDelay { { if (delayFrames >= buf.size()) delayFrames = buf.size(); rptr = wptr - delayFrames; - if (rptr >= buf.size()) rptr += buf.size(); // Unsigned overflow case. + if (rptr >= buf.size()) rptr += buf.size(); // Unsigned negative overflow case. } Sample process(Sample input) { - if (++wptr >= buf.size()) wptr -= buf.size(); + if (++wptr >= buf.size()) wptr = 0; buf[wptr] = input; - if (++rptr >= buf.size()) rptr -= buf.size(); + if (++rptr >= buf.size()) rptr = 0; return buf[rptr]; } };