amend 3afe3f32df (remove unused global feedback option)
authorRobin Gareus <robin@gareus.org>
Sat, 31 Dec 2016 03:35:41 +0000 (04:35 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 31 Dec 2016 14:20:07 +0000 (15:20 +0100)
That commit accidentally removed unrelated code in generic-midi surface
which just happened to have the same name (get/set_midi_feedback) as the
unused preference.

Regardless, there was more cruft there. GMCP midicontrollables now use
the control surfaces' feedback option.

libs/surfaces/generic_midi/midicontrollable.cc
libs/surfaces/generic_midi/midicontrollable.h

index b42c9f7b1bb05a4fef9960f5e61bed1807eabbe1..6afd9d4d8ab2cd2938a01a038c14bcdd267afb5a 100644 (file)
@@ -63,7 +63,6 @@ MIDIControllable::MIDIControllable (GenericMidiControlProtocol* s, MIDI::Parser&
        control_nrpn = -1;
        _control_description = "MIDI Control: none";
        control_additional = (MIDI::byte) -1;
-       feedback = true; // for now
 }
 
 MIDIControllable::MIDIControllable (GenericMidiControlProtocol* s, MIDI::Parser& p, Controllable& c, bool m)
@@ -84,7 +83,6 @@ MIDIControllable::MIDIControllable (GenericMidiControlProtocol* s, MIDI::Parser&
        control_nrpn = -1;
        _control_description = "MIDI Control: none";
        control_additional = (MIDI::byte) -1;
-       feedback = true; // for now
 }
 
 MIDIControllable::~MIDIControllable ()
@@ -610,7 +608,7 @@ MIDIControllable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional)
 MIDI::byte*
 MIDIControllable::write_feedback (MIDI::byte* buf, int32_t& bufsize, bool /*force*/)
 {
-       if (!controllable || !feedback) {
+       if (!controllable || !_surface->get_feedback ()) {
                return buf;
        }
 
@@ -738,12 +736,6 @@ MIDIControllable::set_state (const XMLNode& node, int /*version*/)
                return -1;
        }
 
-       if ((prop = node.property ("feedback")) != 0) {
-               feedback = (prop->value() == "yes");
-       } else {
-               feedback = true; // default
-       }
-
        bind_midi (control_channel, control_type, control_additional);
 
        return 0;
@@ -769,7 +761,6 @@ MIDIControllable::get_state ()
                node->add_property ("channel", buf);
                snprintf (buf, sizeof(buf), "0x%x", (int) control_additional);
                node->add_property ("additional", buf);
-               node->add_property ("feedback", (feedback ? "yes" : "no"));
        }
 
        return *node;
index a2d96b783069efce39700cadb6361c5f0e26f330..d07924b9360c435f16b1668141fdca620976e629 100644 (file)
@@ -134,7 +134,6 @@ class MIDIControllable : public PBD::Stateful
        std::string     _control_description;
        int16_t          control_rpn;
        int16_t          control_nrpn;
-       bool             feedback;
        uint32_t        _rid;
        std::string     _what;
        bool            _bank_relative;