summaryrefslogtreecommitdiff
path: root/libs/ardour/audioengine.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r--libs/ardour/audioengine.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index cbdd1fda1c..a4ce5f291d 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -931,6 +931,27 @@ AudioEngine::get_port_total_latency (const Port& port)
return jack_port_get_total_latency (_jack, port._port);
}
+
+void
+AudioEngine::update_total_latency (const Port& port)
+{
+ if (!_jack) {
+ fatal << _("update_total_latency() called with no JACK client connection") << endmsg;
+ /*NOTREACHED*/
+ }
+
+ if (!_running) {
+ if (!_has_run) {
+ fatal << _("update_total_latency() called before engine was started") << endmsg;
+ /*NOTREACHED*/
+ }
+ }
+
+#ifdef HAVE_JACK_RECOMPUTE_LATENCY
+ jack_recompute_total_latency (_jack, port._port);
+#endif
+}
+
void
AudioEngine::transport_stop ()
{