diff --git a/src/headless/tests/UnitTests.h b/src/headless/tests/UnitTests.h index 79c74447..5cf98d7a 100644 --- a/src/headless/tests/UnitTests.h +++ b/src/headless/tests/UnitTests.h @@ -2,6 +2,7 @@ static inline void runTestForAllProcessors (UnitTest* ut, const std::function& testFunc, const StringArray& procsToSkip = {}) { + PlayheadHelpers playheadHelper; for (auto [name, storeEntry] : ProcessorStore::getStoreMap()) { if (procsToSkip.contains (name)) @@ -11,6 +12,7 @@ static inline void runTestForAllProcessors (UnitTest* ut, const std::functionplayheadHelpers = &playheadHelper; ut->beginTest (proc->getName() + " Test"); testFunc (proc.get()); proc->freeInternalMemory(); diff --git a/src/processors/other/Delay.cpp b/src/processors/other/Delay.cpp index 7955baee..348c4e31 100644 --- a/src/processors/other/Delay.cpp +++ b/src/processors/other/Delay.cpp @@ -237,8 +237,10 @@ void DelayModule::processPingPongDelay (AudioBuffer& buffer, DelayType& d void DelayModule::processAudio (AudioBuffer& buffer) { + jassert (playheadHelpers != nullptr); + feedbackSmoothBuffer.process (std::pow (feedbackParam->getCurrentValue() * 0.67f, 0.9f), buffer.getNumSamples()); - double tempo = playheadHelpers->bpm.load(); + const auto tempo = playheadHelpers->bpm.load(); const auto tempoSync = *tempoSyncOnOffParam == 1.0f; if (! tempoSync) {