13
0
git-svn-id: svn://localhost/ardour2/branches/3.0@4626 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-02-18 20:57:58 +00:00
parent 1f9c3f34d9
commit 3ccd34ec7e

View File

@ -248,9 +248,10 @@ GenericMidiControlProtocol::delete_binding ( PBD::Controllable* control )
controllables.erase (iter);
}
} // end for midi controllables
} // end null check
}
}
}
void
GenericMidiControlProtocol::create_binding (PBD::Controllable* control, int pos, int control_number)
{
@ -260,7 +261,7 @@ GenericMidiControlProtocol::create_binding (PBD::Controllable* control, int pos,
MIDI::channel_t channel = (pos & 0xf);
MIDI::byte value = control_number;
// Create a MIDIControllable::
// Create a MIDIControllable
MIDIControllable* mc = new MIDIControllable (*_port, *control);
// Remove any old binding for this midi channel/type/value pair
@ -276,15 +277,14 @@ GenericMidiControlProtocol::create_binding (PBD::Controllable* control, int pos,
controllables.erase (iter);
}
} // end for midi controllables
}
// Update the MIDI Controllable based on the the pos param
// Here is where a table lookup for user mappings could go; for now we'll just wing it...
mc->bind_midi(channel, MIDI::controller, value);
controllables.insert (mc);
} // end null test
}
}
void
@ -343,7 +343,6 @@ GenericMidiControlProtocol::set_state (const XMLNode& node)
_feedback_interval = 10000;
}
// Are we using the autobinding feature? If so skip this part
if ( !auto_binding ) {
boost::shared_ptr<Controllable> c;
@ -377,13 +376,13 @@ GenericMidiControlProtocol::set_state (const XMLNode& node)
}
} else {
warning << string_compose (_("Generic MIDI control: controllable %1 not found in session (ignored)"),
id)
<< endmsg;
warning << string_compose (
_("Generic MIDI control: controllable %1 not found in session (ignored)"),
id) << endmsg;
}
}
}
}
} // end autobinding check
return 0;
}
@ -400,3 +399,4 @@ GenericMidiControlProtocol::get_feedback () const
{
return do_feedback;
}