diff --git a/sonar-project.properties b/sonar-project.properties index 1c93df7d..b9de58f7 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,3 +4,4 @@ sonar.sources=src sonar.cfamily.build-wrapper-output=build/bw-output sonar.cpp.std=c++17 sonar.exclusions=3rdparty/** +sonar.cfamily.threads=4 diff --git a/src/pulseaudio.cc b/src/pulseaudio.cc index 6688acf2..738471c1 100644 --- a/src/pulseaudio.cc +++ b/src/pulseaudio.cc @@ -222,11 +222,12 @@ void init_pulseaudio(struct text_object *obj) { pa_threaded_mainloop_start(pulseaudio->mainloop); while (pulseaudio->cstate != PULSE_CONTEXT_READY) { - struct timespec tim, tim2; - tim.tv_sec = 1; - tim.tv_nsec = 200000; + struct timespec req; + struct timespec rem; + req.tv_sec = 1; + req.tv_nsec = 200000; - nanosleep(&tim, &tim2); + nanosleep(&req, &rem); } // Initial parameters update