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:
Paul Davis
2007-02-19 23:09:20 +00:00
parent 6b459529ce
commit f22f22b599
5 changed files with 36 additions and 11 deletions

View File

@@ -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&);

View File

@@ -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);

View File

@@ -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