From b30f387eeaa2f979b825e87ddf9f9b2570e13100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ju=CC=88rgen=20Hock?= Date: Fri, 17 Nov 2023 23:01:53 +0100 Subject: [PATCH] Update realtime.cpp --- examples/realtime.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/realtime.cpp b/examples/realtime.cpp index f958ede..dfae8f9 100644 --- a/examples/realtime.cpp +++ b/examples/realtime.cpp @@ -69,8 +69,8 @@ int main() { std::cout << "processing audio frame " << (i / m + 1) << " of " << (n / m) << std::endl; - std::span input = std::span(x.data(), m); - std::span output = std::span(y.data(), m); + std::span input = std::span(x.data() + i, m); + std::span output = std::span(y.data() + i, m); audio_interface_callback(input, output); } @@ -80,10 +80,10 @@ int main() void audio_interface_callback(std::span input, std::span 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);