Old and new strings are compared before sending to keep traffic down. To
ensure that we send all the required characters be sure to init the last
value to characters that are never going to appear in a real string.
Space is a bad choice since it is a valid character. Use NUL instead.
The device info file allows key names and values to be configured in each
device file. Use that information when building the Functions Keys tab in
the Mackie protocol setup dialog.
While surfaces are being created it is possible to have surfaces, but
not have a master surface yet. This happens when the config calls
for extenders to the left of the master section. Don't assume that
if we have surfaces, the master surface is available.
* remove unused variables in session.h
* move default play speed (varispeed(sic)) into fsm
* request_transport_speed should -never- set the default_play_speed
This resolves a PBD vs ARDOUR namespace error for some compilers:
```
error: reference to 'microseconds_t' is ambiguous
libs/pbd/pbd/microseconds.h:29:19: error: candidates are: typedef uint64_t PBD::microseconds_t
libs/ardour/ardour/types.h:81:29: error: typedef PBD::microseconds_t ARDOUR::microseconds_t
```
* remove unused variables in session.h
* move default play speed (varispeed(sic)) into fsm
* request_transport_speed should -never- set the default_play_speed
MidiControlUI drops the reference to a given controllable in
its own thread. This can happen after the plugin is already
destroyed (even though the PBD::Controllable still exists).
There is no need to connect signals twice, can connect them directly to the
helper UI loop and skip the surface loop. Then let the server decide if it is
necessary to call lws_cancel_service() or not.
Also rename WebsocketsServer::should_request_write() to read_blocks_event_loop()
it makes more sense for the caller now on-demand write logic is completely
implemented by the server class.
This is an update to the surface ArdourFeedback class that is needed to support
the new event loop integration method.
The various session event callbacks cannot be queued in the surface event loop
because that would create a delay between the time such events are fired and
the time for writing to clients arrive, due to lws_service() blocking while
it waits to read. To solve this issue a helper AbstractUI is created for
catching events as soon as possible and issuing a call to lws_cancel_service().
See WebsocketsServer::glib_idle_callback()
Some distro repositories offer versions of libwebsockets that have not been
compiled with LWS_WITH_GLIB or LWS_WITH_EXTERNAL_POLL enabled. For such cases
a different event loop integration method is needed.
True for Ubuntu 20.04 as of Jun '21