better safe than sorry
authorRobin Gareus <robin@gareus.org>
Sat, 9 Jul 2016 16:31:40 +0000 (18:31 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 9 Jul 2016 16:34:27 +0000 (18:34 +0200)
libs/ardour/session.cc

index 74f20306d2e54a9e6133d69c1b1a828a46b69a1d..2073ab58714de3a6cef0f2847fb28c1268bf9a31 100644 (file)
@@ -7015,8 +7015,18 @@ Session::auto_connect_thread_run ()
                        }
                }
 
-               while (g_atomic_int_and (&_latency_recompute_pending, 0)) {
-                       update_latency_compensation ();
+               if (!actively_recording ()) { // might not be needed,
+                       /* this is only used for updating plugin latencies, the
+                        * graph does not change. so it's safe in general.
+                        * BUT..
+                        * .. update_latency_compensation () entails set_capture_offset()
+                        * which calls Diskstream::set_capture_offset () which
+                        * modifies the capture offset... which can be a proplem
+                        * in "prepare_to_stop"
+                        */
+                       while (g_atomic_int_and (&_latency_recompute_pending, 0)) {
+                               update_latency_compensation ();
+                       }
                }
 
                pthread_cond_wait (&_auto_connect_cond, &_auto_connect_mutex);