From 930715c76c60c8ffcde45df8669a6b03acbb6dbe Mon Sep 17 00:00:00 2001 From: jatin Date: Wed, 8 Nov 2023 10:01:15 -0800 Subject: [PATCH] More unit test fixes --- src/headless/tests/UnitTests.h | 2 ++ src/processors/other/Delay.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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) {