diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-13 23:00:24 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-13 23:00:24 -0400 |
commit | f00b3b7f111e36537d773daef0ae77b03d11f82f (patch) | |
tree | 4bfdd432199a7d4a4cbfc7769493e6bedaa5e51f /libs/surfaces/generic_midi/generic_midi_control_protocol.cc | |
parent | 31d234b48c36bddb4d5228a3abee9c4419403879 (diff) | |
parent | 80a13145f398e1c4ea22b3f8a25a5b38d3c5e328 (diff) |
merge with master
Diffstat (limited to 'libs/surfaces/generic_midi/generic_midi_control_protocol.cc')
-rw-r--r-- | libs/surfaces/generic_midi/generic_midi_control_protocol.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index b524e2f2a0..6da0192a8f 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -472,6 +472,8 @@ GenericMidiControlProtocol::get_state () node->add_property (X_("feedback"), do_feedback ? "1" : "0"); snprintf (buf, sizeof (buf), "%" PRIu64, _feedback_interval); node->add_property (X_("feedback_interval"), buf); + snprintf (buf, sizeof (buf), "%d", _threshold); + node->add_property (X_("threshold"), buf); if (!_current_binding.empty()) { node->add_property ("binding", _current_binding); @@ -518,6 +520,14 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version) _feedback_interval = 10000; } + if ((prop = node.property ("threshold")) != 0) { + if (sscanf (prop->value().c_str(), "%d", &_threshold) != 1) { + _threshold = 10; + } + } else { + _threshold = 10; + } + boost::shared_ptr<Controllable> c; { |