Skip to content

Commit

Permalink
More unit test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Nov 8, 2023
1 parent ec3674b commit 930715c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/headless/tests/UnitTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

static inline void runTestForAllProcessors (UnitTest* ut, const std::function<void (BaseProcessor*)>& testFunc, const StringArray& procsToSkip = {})
{
PlayheadHelpers playheadHelper;
for (auto [name, storeEntry] : ProcessorStore::getStoreMap())
{
if (procsToSkip.contains (name))
Expand All @@ -11,6 +12,7 @@ static inline void runTestForAllProcessors (UnitTest* ut, const std::function<vo
}

auto proc = storeEntry.factory (nullptr);
proc->playheadHelpers = &playheadHelper;
ut->beginTest (proc->getName() + " Test");
testFunc (proc.get());
proc->freeInternalMemory();
Expand Down
4 changes: 3 additions & 1 deletion src/processors/other/Delay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ void DelayModule::processPingPongDelay (AudioBuffer<float>& buffer, DelayType& d

void DelayModule::processAudio (AudioBuffer<float>& 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)
{
Expand Down

0 comments on commit 930715c

Please sign in to comment.