summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-07-09 18:31:40 +0200
committerRobin Gareus <robin@gareus.org>2016-07-09 18:34:27 +0200
commit0c2a5dc0b2d4850748763bc58ff274d8e19d80ad (patch)
tree5b26bb007d8a5f183b78eafc4a7440f071a476d6 /libs/ardour/session.cc
parent0e2ed90cfcfc0062f6b3cbd9feb36b3a0beef4f4 (diff)
better safe than sorry
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 74f20306d2..2073ab5871 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -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);