X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fphase_control.cc;h=a42888f103412c8150e84b779586efec1171ad08;hb=88c82aeb56c62d9d0c0acff51e360492ad9b8d23;hp=96d0d375b6b7aca65854affa2fa1c2a661c56139;hpb=c104c9d4726f3ba1ecd352d13b88a57f2f964510;p=ardour.git diff --git a/libs/ardour/phase_control.cc b/libs/ardour/phase_control.cc index 96d0d375b6..a42888f103 100644 --- a/libs/ardour/phase_control.cc +++ b/libs/ardour/phase_control.cc @@ -32,12 +32,12 @@ PhaseControl::PhaseControl (Session& session, std::string const & name) { } -bool +void PhaseControl::actually_set_value (double val, Controllable::GroupControlDisposition gcd) { _phase_invert = boost::dynamic_bitset<> (std::numeric_limits::digits, (unsigned long) val); - return AutomationControl::actually_set_value (val, gcd); + AutomationControl::actually_set_value (val, gcd); } /** @param c Audio channel index. @@ -48,8 +48,7 @@ PhaseControl::set_phase_invert (uint32_t c, bool yn) { if (_phase_invert[c] != yn) { _phase_invert[c] = yn; - (void) AutomationControl::actually_set_value (_phase_invert.to_ulong(), Controllable::NoGroup); - _session.set_dirty (); + AutomationControl::actually_set_value (_phase_invert.to_ulong(), Controllable::NoGroup); } } @@ -58,9 +57,7 @@ PhaseControl::set_phase_invert (boost::dynamic_bitset<> p) { if (_phase_invert != p) { _phase_invert = p; - (void) AutomationControl::actually_set_value (_phase_invert.to_ulong(), Controllable::NoGroup); - Changed (true, Controllable::NoGroup); /* EMIT SIGNAL */ - _session.set_dirty (); + AutomationControl::actually_set_value (_phase_invert.to_ulong(), Controllable::NoGroup); } } @@ -77,7 +74,7 @@ PhaseControl::get_state () string p; boost::to_string (_phase_invert, p); - node.add_property("phase-invert", p); + node.set_property ("phase-invert", p); return node; } @@ -87,10 +84,9 @@ PhaseControl::set_state (XMLNode const & node, int version) { AutomationControl::set_state (node, version); - const XMLProperty* prop; - - if ((prop = node.property (X_("phase-invert"))) != 0) { - set_phase_invert (boost::dynamic_bitset<> (prop->value ())); + std::string str; + if (node.get_property (X_("phase-invert"), str)) { + set_phase_invert (boost::dynamic_bitset<> (str)); } return 0;