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

@ -57,7 +57,7 @@ public:
virtual int set_feedback (bool /*yn*/) { return 0; }
virtual bool get_feedback () const { return false; }
virtual void midi_connectivity_established () {}
virtual void midi_connectivity_established (bool) {}
virtual void stripable_selection_changed () = 0;