Added garbage collection in jack

This commit is contained in:
paulfd 2019-09-16 14:51:17 +02:00
parent 95c0ac9aa7
commit f0782bc8a6

View file

@ -35,6 +35,7 @@
#include <ostream>
#include <signal.h>
#include <string_view>
#include <chrono>
#include <thread>
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);