Save and restore Latent's _user_latency for IOs (fixes #4186).
authorCarl Hetherington <carl@carlh.net>
Thu, 14 Jul 2011 23:29:42 +0000 (23:29 +0000)
committerCarl Hetherington <carl@carlh.net>
Thu, 14 Jul 2011 23:29:42 +0000 (23:29 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9879 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/io.cc

index db3bffbe30aa4915823170c850e594c1a1d7002c..b8e92d3472a252fc28f69bfb942ce5c27fac397c 100644 (file)
@@ -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;
 }