Added garbage collection in jack
This commit is contained in:
parent
95c0ac9aa7
commit
f0782bc8a6
1 changed files with 5 additions and 2 deletions
|
|
@ -35,6 +35,7 @@
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
|
|
||||||
|
|
@ -253,8 +254,10 @@ int main(int argc, char** argv)
|
||||||
signal(SIGTERM, done);
|
signal(SIGTERM, done);
|
||||||
signal(SIGQUIT, done);
|
signal(SIGQUIT, done);
|
||||||
|
|
||||||
while (!shouldClose)
|
while (!shouldClose){
|
||||||
sleep(1);
|
synth.garbageCollect();
|
||||||
|
std::this_thread::sleep_for(1s);
|
||||||
|
}
|
||||||
|
|
||||||
std::cout << "Closing..." << '\n';
|
std::cout << "Closing..." << '\n';
|
||||||
jack_client_close(client);
|
jack_client_close(client);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue