midi surfaces fixes (partially for PR #898)

1. do more to ensure that we do not call MidiSurface::begin_using_device()
multiple times without ::stop_using_device() in between. This reduces the risk
of duplicate signal handler connections being made (it might even eliminate it).

2. Notify all control surfaces when MIDI connectivity is established AND
disestablished. This gives them a chance to update their notion of their
current connection state. This can be important with JACK across zombification,
but also likely across backend stop&start.

These changes currntly only impact classes derived from MidiSurface but
something equivalent is required for all control surfaces
This commit is contained in:
Paul Davis 2024-07-16 11:12:41 -06:00
parent f8f6c89136
commit e175410f54
7 changed files with 43 additions and 17 deletions

View file

@ -85,6 +85,7 @@ class MIDISurface : public ARDOUR::ControlProtocol
CONTROL_PROTOCOL_THREADS_NEED_TEMPO_MAP_DECL();
virtual bool midi_input_handler (Glib::IOCondition ioc, MIDI::Port* port);
void midi_connectivity_established (bool);
protected:
bool with_pad_filter;