2 * Copyright (C) 2019 Robin Gareus <robin@gareus.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (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 along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 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;
26 PBD::Signal0<void> Latent::DisableSwitchChanged;
30 , _use_user_latency (false)
34 Latent::Latent (Latent const& other)
36 , _use_user_latency (other._use_user_latency)
37 , _user_latency (other._user_latency)
42 Latent::set_state (const XMLNode& node, int version)
44 node.get_property ("user-latency", _user_latency);
45 if (!node.get_property ("use-user-latency", _use_user_latency)) {
46 _use_user_latency = _user_latency > 0;
52 Latent::add_state (XMLNode* node) const
54 node->set_property ("user-latency", _user_latency);
55 node->set_property ("use-user-latency", _use_user_latency);