diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-24 19:25:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-24 19:25:57 +0000 |
commit | 2171bba037810d3e4294b64a664b6b8e083890b6 (patch) | |
tree | 3a773fb119b15bd28819fb9664c086989bdddc8d | |
parent | 4e9173ff6293fc1c57129f9318aaacf31dbf13fa (diff) |
make generic MIDI support handle SendFeedback() in process()-context, not in the MIDIControlUI event loop
git-svn-id: svn://localhost/ardour2/branches/3.0@12083 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/surfaces/generic_midi/generic_midi_control_protocol.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index bf3221b0b2..ae962feddc 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -75,7 +75,15 @@ GenericMidiControlProtocol::GenericMidiControlProtocol (Session& s) Controllable::CreateBinding.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::create_binding, this, _1, _2, _3)); Controllable::DeleteBinding.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::delete_binding, this, _1)); - Session::SendFeedback.connect (*this, MISSING_INVALIDATOR, ui_bind (&GenericMidiControlProtocol::send_feedback, this), midi_ui_context());; + /* this signal is emitted by the process() callback, and if + * send_feedback() is going to do anything, it should do it in the + * context of the process() callback itself. + */ + + Session::SendFeedback.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::send_feedback, this)); + + /* this one is cross-thread */ + Route::RemoteControlIDChange.connect (*this, MISSING_INVALIDATOR, ui_bind (&GenericMidiControlProtocol::reset_controllables, this), midi_ui_context()); reload_maps (); |