mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
add some comments
This commit is contained in:
parent
50b25571bc
commit
7daf620a8d
1 changed files with 14 additions and 0 deletions
|
|
@ -341,6 +341,10 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
|
||||||
Glib::Threads::Mutex::Lock lm2 (controllables_lock);
|
Glib::Threads::Mutex::Lock lm2 (controllables_lock);
|
||||||
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Learn binding: Controlable number: %1\n", c));
|
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Learn binding: Controlable number: %1\n", c));
|
||||||
|
|
||||||
|
/* drop any existing mappings for the same controllable for which
|
||||||
|
* learning has just started.
|
||||||
|
*/
|
||||||
|
|
||||||
MIDIControllables::iterator tmp;
|
MIDIControllables::iterator tmp;
|
||||||
for (MIDIControllables::iterator i = controllables.begin(); i != controllables.end(); ) {
|
for (MIDIControllables::iterator i = controllables.begin(); i != controllables.end(); ) {
|
||||||
tmp = i;
|
tmp = i;
|
||||||
|
|
@ -352,6 +356,10 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
|
||||||
i = tmp;
|
i = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check pending controllables (those for which a learn is underway) to
|
||||||
|
* see if it is for the same one for which learning has just started.
|
||||||
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock lm (pending_lock);
|
Glib::Threads::Mutex::Lock lm (pending_lock);
|
||||||
|
|
||||||
|
|
@ -386,6 +394,8 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
|
||||||
own_mc = true;
|
own_mc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* stuff the new controllable into pending */
|
||||||
|
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock lm (pending_lock);
|
Glib::Threads::Mutex::Lock lm (pending_lock);
|
||||||
|
|
||||||
|
|
@ -419,6 +429,10 @@ GenericMidiControlProtocol::learning_stopped (MIDIControllable* mc)
|
||||||
i = tmp;
|
i = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* add the controllable for which learning stopped to our list of
|
||||||
|
* controllables
|
||||||
|
*/
|
||||||
|
|
||||||
controllables.push_back (mc);
|
controllables.push_back (mc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue