summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-12-21 15:28:47 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2013-12-21 15:31:28 -0500
commit5ebc8de6cc82e42f1080d99ea3b95fde93523d8b (patch)
treed748abc25d5ce72b32b848401d6d75f6dde96f47
parentea5fde0787d9f291084871ea48fea3c5917b7baf (diff)
conform to new CP API design
-rw-r--r--libs/surfaces/generic_midi/generic_midi_control_protocol.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc
index 9d45a1c890..2ea9079b49 100644
--- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc
+++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc
@@ -464,23 +464,22 @@ GenericMidiControlProtocol::create_binding (PBD::Controllable* control, int pos,
XMLNode&
GenericMidiControlProtocol::get_state ()
{
- XMLNode* node = new XMLNode ("Protocol");
+ XMLNode& node (ControlProtocol::get_state());
char buf[32];
- node->add_property (X_("name"), _name);
- node->add_property (X_("feedback"), do_feedback ? "1" : "0");
+ node.add_property (X_("feedback"), do_feedback ? "1" : "0");
snprintf (buf, sizeof (buf), "%" PRIu64, _feedback_interval);
- node->add_property (X_("feedback_interval"), buf);
+ node.add_property (X_("feedback_interval"), buf);
snprintf (buf, sizeof (buf), "%d", _threshold);
- node->add_property (X_("threshold"), buf);
+ node.add_property (X_("threshold"), buf);
if (!_current_binding.empty()) {
- node->add_property ("binding", _current_binding);
+ node.add_property ("binding", _current_binding);
}
XMLNode* children = new XMLNode (X_("Controls"));
- node->add_child_nocopy (*children);
+ node.add_child_nocopy (*children);
Glib::Threads::Mutex::Lock lm2 (controllables_lock);
for (MIDIControllables::iterator i = controllables.begin(); i != controllables.end(); ++i) {
@@ -495,7 +494,7 @@ GenericMidiControlProtocol::get_state ()
}
}
- return *node;
+ return node;
}
int