Skip to content

Commit

Permalink
Fix span
Browse files Browse the repository at this point in the history
  • Loading branch information
jurihock committed Dec 8, 2023
1 parent 9a4b827 commit f098789
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/StftPitchShiftPlugin/Core/DelayedCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ void DelayedCore::process(const std::span<const float> input, const std::span<fl
// start processing as soon as enough samples are buffered
if ((samples += minsamples) >= maxsamples)
{
const auto x = buffer.input.data() + buffer.input.size();
const auto y = buffer.output.data() + buffer.output.size();

InstantCore::process(
std::span(buffer.input.end() - samples, maxsamples),
std::span(buffer.output.end() - samples, maxsamples));
std::span(x - samples, maxsamples),
std::span(y - samples, maxsamples));

samples %= maxsamples;
}
Expand Down

0 comments on commit f098789

Please sign in to comment.