2 * Copyright (C) 2018 Robin Gareus <robin@gareus.org>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #include "pbd/xml++.h"
21 #include "ardour/latent.h"
23 using namespace ARDOUR;
25 bool ARDOUR::Latent::_zero_latency = false;
29 , _use_user_latency (false)
33 Latent::Latent (Latent const& other)
35 , _use_user_latency (other._use_user_latency)
36 , _user_latency (other._user_latency)
41 Latent::set_state (const XMLNode& node, int version)
43 node.get_property ("user-latency", _user_latency);
44 if (!node.get_property ("use-user-latency", _use_user_latency)) {
45 _use_user_latency = _user_latency > 0;
51 Latent::add_state (XMLNode* node) const
53 node->set_property ("user-latency", _user_latency);
54 node->set_property ("use-user-latency", _use_user_latency);