diff --git a/examples/stream/stream.cpp b/examples/stream/stream.cpp index 833c240e..19d42138 100644 --- a/examples/stream/stream.cpp +++ b/examples/stream/stream.cpp @@ -244,6 +244,11 @@ int main(int argc, char ** argv) { if (!use_vad) { while (true) { + // handle Ctrl + C + is_running = sdl_poll_events(); + if (!is_running) { + break; + } audio.get(params.step_ms, pcmf32_new); if ((int) pcmf32_new.size() > 2*n_samples_step) {