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
Port_connect must be called with correct order (src, dst),
and may only be called after the client is active.
jack2 reported errors:
> Destination port in attempted (dis)connection of ardour:physical_input_monitor_enable and system:capture_1 is not an input port
> Cannot connect ports owned by inactive clients: "ardour" is not active
Bounce (Session::write_one_track) uses bounce_chunk_size = 8192
to process data. This requires gain_automation_buffer, and
scratch buffers that can hold 8k samples.
Previously the buffers were not allocated when bounding MIDI
(no synth), leading to a crash when automation was used.
Previously there was only a PostDisconnect() signal.
When a port connection is made directly e.g. recorder_ui.cc
r->input()->audio(..)->connect(...), or when connecting
using an external jack control app, Ardour::IO is not informed.
no IOChange::ConnectionsChanged signal is emitted and
Track::set_align_choice_from_io() is not called. This leads to
incorrec capture alignment.
To minimize signal emission the static global PostDisconnect
is changed into a per port ConnectedOrDisconnected signal.
IOs subscribes to signals from owned ports only.