From 75d315e452b51ff8f0df979b865678173bd8e9da Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 14 Jul 2011 23:29:42 +0000 Subject: [PATCH] Save and restore Latent's _user_latency for IOs (fixes #4186). git-svn-id: svn://localhost/ardour2/branches/3.0@9879 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/io.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index db3bffbe30..b8e92d3472 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -537,6 +537,9 @@ IO::state (bool /*full_state*/) node->add_child_nocopy (*pnode); } + snprintf (buf, sizeof (buf), "%" PRId64, _user_latency); + node->add_property (X_("user-latency"), buf); + return *node; } @@ -597,6 +600,9 @@ IO::set_state (const XMLNode& node, int version) ConnectingLegal.connect_same_thread (connection_legal_c, boost::bind (&IO::connecting_became_legal, this)); } + if ((prop = node.property ("user-latency")) != 0) { + _user_latency = atoi (prop->value ()); + } return 0; }