Skip to content

Commit

Permalink
Update realtime.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
jurihock committed Nov 17, 2023
1 parent 61a768b commit b30f387
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/realtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ int main()
{
std::cout << "processing audio frame " << (i / m + 1) << " of " << (n / m) << std::endl;

std::span<float> input = std::span(x.data(), m);
std::span<float> output = std::span(y.data(), m);
std::span<float> input = std::span(x.data() + i, m);
std::span<float> output = std::span(y.data() + i, m);

audio_interface_callback(input, output);
}
Expand All @@ -80,10 +80,10 @@ int main()

void audio_interface_callback(std::span<float> input, std::span<float> output)
{
const auto analysis_window_size = std::get<0>(framesize);
const auto analysis_window_size = std::get<0>(framesize);
const auto synthesis_window_size = std::get<1>(framesize);

// this is the expected input and output frame size
// these are the expected input and output frame sizes
assert(input.size() == synthesis_window_size);
assert(output.size() == synthesis_window_size);

Expand Down

0 comments on commit b30f387

Please sign in to comment.