This commit leaves two issues outstanding:
1. unclear/ugly semantics for drag operations that reset the GUI thread's tempo map to the writable copy
2. undo/redo for the tempo map
These will be addressed in future commits
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
* amend previous commit, fix runtime_error implementation
* Do not copy-construct classes that have a PBD::scoped connection list.
Replace std::map::emplace[C+11], an store shared pointers the std::map.
* Update ArdourMixerStrip is-a ScopedConnectionList (not has-a)
Rename all {object}_n variables and arguments to {object}_id
Parts of code were using the former convention, now use the latter everywhere
Another step towards supporting visual position agnostic identifiers in the future
Use maps instead of vectors for holding strips and plugins
This allows to deal with "holes" after objects are removed
Also paves the way for a future improved way of identifying
individual strips and plugins
Terminology used by server and client was starting to diverge.
C++ classes ArdourStrips and ArdourGlobals classes have been
renamed to ArdourMixer and ArdourTransport respectively.
State node values for transport functionality have been simplified
and prefixed with 'transport_' to match what was done for strips.
Replace previous callback based basic client with an easier
to use object-oriented API that further abstracts the low level
details of the WebSockets Server surface messaging protocol.
All built-in web surface demos were updated to use the new API.
LWS_WITH_EXTERNAL_POLL a new optional define for libwebsocket 4.x.
Earlier versions always supported it, without the compile-time define.
This fixes support for libwesocket 2.x (Debian, Ubuntu), and 3.x.
Also for Windows, LWS_WITH_GLIB is not available.