From: Robin Gareus Date: Tue, 29 Aug 2017 15:16:03 +0000 (+0200) Subject: Set Automationwatch thread priority (needs to be higher than GUI) X-Git-Tag: 5.12~61 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=6ab00534c0e8c372d759551e4f90a016918e71a9 Set Automationwatch thread priority (needs to be higher than GUI) This fixes an issue with sparse automation touch/write when the CPU is busy (stationary playhead, waveform rendering, or just high DSP load) --- diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc index a7a7a36eed..c949509d09 100644 --- a/libs/ardour/automation_watch.cc +++ b/libs/ardour/automation_watch.cc @@ -22,6 +22,7 @@ #include #include "pbd/compose.h" +#include "pbd/pthread_utils.h" #include "ardour/automation_control.h" #include "ardour/automation_watch.h" @@ -185,6 +186,7 @@ AutomationWatch::timer () void AutomationWatch::thread () { + pbd_set_thread_priority (pthread_self(), SCHED_FIFO, -25); while (_run_thread) { Glib::usleep ((gulong) floor (Config->get_automation_interval_msecs() * 1000)); timer ();