Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Feb 16, 2024
1 parent c57bc32 commit 0206947
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ TEST_CASE ("Repitched Source Test", "[dsp][sources][resampling]")
sine.prepare (spec);
}

void processRepitched (juce::dsp::AudioBlock<float>& block) override
void processRepitched (const chowdsp::BufferView<float>& buffer) override
{
sine.process (juce::dsp::ProcessContextReplacing<float> { block });
buffer.clear();
sine.processBlock (buffer);
}
};

Expand All @@ -51,9 +52,12 @@ TEST_CASE ("Repitched Source Test", "[dsp][sources][resampling]")
for (int i = 0; i < numSamples; i += blockSize)
{
const auto samplesToProcess = juce::jmin (blockSize, numSamples - i);
auto&& block = sineProc.process (samplesToProcess);
auto resampledBuffer = chowdsp::BufferView<const float> { sineProc.process (samplesToProcess) };

buffer.copyFrom (0, i, block.getChannelPointer (0), samplesToProcess);
buffer.copyFrom (0,
i,
resampledBuffer.getReadPointer (0),
samplesToProcess);
}

tuner.process (buffer.getReadPointer (0));
Expand Down

0 comments on commit 0206947

Please sign in to comment.