a more reliable/robust/less complex version of previous commit

This commit is contained in:
Paul Davis 2016-07-21 14:00:18 -04:00
parent 3bf7c4ef49
commit d53d0faf93
2 changed files with 25 additions and 13 deletions

View file

@ -125,7 +125,16 @@ class GenericMidiControlProtocol : public ARDOUR::ControlProtocol {
typedef std::list<MIDIAction*> MIDIActions;
MIDIActions actions;
typedef std::pair<MIDIControllable*,PBD::ScopedConnection> MIDIPendingControllable;
struct MIDIPendingControllable {
MIDIControllable* mc;
bool own_mc;
PBD::ScopedConnection connection;
MIDIPendingControllable (MIDIControllable* c, bool omc)
: mc (c)
, own_mc (omc)
{}
};
typedef std::list<MIDIPendingControllable* > MIDIPendingControllables;
MIDIPendingControllables pending_controllables;
Glib::Threads::Mutex controllables_lock;