make transport buttons and shuttle controller work with MIDI CC's
git-svn-id: svn://localhost/ardour2/trunk@1477 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -582,7 +582,7 @@ class Session : public PBD::StatefulDestructible
|
||||
|
||||
struct cleanup_report {
|
||||
vector<string> paths;
|
||||
int32_t space;
|
||||
int64_t space;
|
||||
};
|
||||
|
||||
int cleanup_sources (cleanup_report&);
|
||||
|
||||
@@ -126,7 +126,18 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
|
||||
return false;
|
||||
}
|
||||
|
||||
MIDIControllable* mc = new MIDIControllable (*_port, *c);
|
||||
MIDIControllable* mc = 0;
|
||||
|
||||
for (MIDIControllables::iterator i = controllables.begin(); i != controllables.end(); ++i) {
|
||||
if ((*i)->get_controllable().id() == c->id()) {
|
||||
mc = *i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mc) {
|
||||
mc = new MIDIControllable (*_port, *c);
|
||||
}
|
||||
|
||||
{
|
||||
Glib::Mutex::Lock lm (pending_lock);
|
||||
|
||||
@@ -99,6 +99,8 @@ MIDIControllable::stop_learning ()
|
||||
void
|
||||
MIDIControllable::drop_external_control ()
|
||||
{
|
||||
cerr << "Dropping existing control using " << connections << " connections\n";
|
||||
|
||||
if (connections > 0) {
|
||||
midi_sense_connection[0].disconnect ();
|
||||
}
|
||||
@@ -279,6 +281,8 @@ MIDIControllable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
cerr << "MIDI bound with " << connections << endl;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user