From f0782bc8a6cb03e49d0e58ef6e37eb40f7654fa1 Mon Sep 17 00:00:00 2001 From: paulfd Date: Mon, 16 Sep 2019 14:51:17 +0200 Subject: [PATCH] Added garbage collection in jack --- clients/jack_client.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/jack_client.cpp b/clients/jack_client.cpp index c6bc369e..7495b643 100644 --- a/clients/jack_client.cpp +++ b/clients/jack_client.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include using namespace std::literals; @@ -253,8 +254,10 @@ int main(int argc, char** argv) signal(SIGTERM, done); signal(SIGQUIT, done); - while (!shouldClose) - sleep(1); + while (!shouldClose){ + synth.garbageCollect(); + std::this_thread::sleep_for(1s); + } std::cout << "Closing..." << '\n'; jack_client_close(client);