Commit Graph

32064 Commits

Author SHA1 Message Date
Luciano Iam
cef81b8c23 WebSockets: minor update in JS code style
Use anonymous blocks { } instead of anonymous functions as the outermost scope
in some files.

Also fix incorrect wording for a comment
2021-06-14 10:36:10 +02:00
Luciano Iam
f1d7e1759a WebSockets: repeat 8baf275 for JS files
Like ec131fc does
2021-06-14 10:25:45 +02:00
Luciano Iam
ebee3a8010 WebSockets: remove unnecessary code
Leftovers from copy and pasting from test_ui.cc
2021-06-14 10:02:25 +02:00
Luciano Iam
cb73eb350d WebSockets: less invasive version of 5407232
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.
2021-06-14 10:02:25 +02:00
fc6fd7973f
Reset performance counters along with xrun count
This is mainly relevant after session export, which uses
freewheeling and processing take much longer than running realtime.
2021-06-14 03:14:07 +02:00
80c11a763a
Notify GUI of x-run counter resets 2021-06-14 03:09:46 +02:00
c06553c2de
Reset x-run counter after disabling freewheeling 2021-06-14 03:09:42 +02:00
d6a1a64398 remove debug output 2021-06-13 18:36:44 -06:00
6553d5adfc small tweak to perf display if timing stats are not available 2021-06-13 18:35:33 -06:00
c15e6fd7db fix condition-variable race caused by not holding the request lock when signalling the var 2021-06-13 18:35:33 -06:00
21f4598395
Fix DR refill when exporting multiple timespans #8742
In between timespans Ardour disables freewheeling and
only later resumes freewheel. It can happen that
Session::process can summon the butler while start_audio_export()
calls Track::seek.

Just waiting for an earlier Butler::wait_until_finished() does
not prevent the butler from running again later.

This can lead to concurrent calls of DR::refill_audio from both
the butler and start_audio_export(), leading to garbled buffers.
2021-06-14 02:18:54 +02:00
ec131fcb70
Set Thread name to aid debugging 2021-06-14 01:29:16 +02:00
95f8a3aace
Explicitly prevent unsigned int wrap-around
This is a NOOP (0 - 1) + 2 == (0 + 2) - 1 but avoids
a unsigned int wrap-wrap around for good measure.
2021-06-14 00:43:08 +02:00
c8205cc6d9
Fix final export-timespan count
ExportHandler::start_timespan() is also used to stop export
when there are no more timespans to be processed.

This is done because freewheeling has to be stopped from
outside the process cycle.
2021-06-14 00:40:23 +02:00
Luciano Iam
e3569b6469
WebSockets: notify server there are pending client updates
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()
2021-06-13 22:00:29 +02:00
Luciano Iam
b3661af92a
WebSockets: additional method for event loop integration
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
2021-06-13 22:00:29 +02:00
Luciano Iam
5f504f23ac
WebSockets: reduce server log verbosity 2021-06-13 22:00:28 +02:00
Luciano Iam
373d905a93
Update websockets surface author email in source files 2021-06-13 22:00:28 +02:00
Luciano Iam
12a7480ea3
Move #include inside header guard 2021-06-13 22:00:28 +02:00
86e00471d9 use library function to reset meters 2021-06-13 12:21:21 -06:00
8d1e999be4 libardour: reset perf meters after warmup period is over 2021-06-13 12:21:08 -06:00
b939b2e68d libardour: provide a global function for resetting performance meters 2021-06-13 12:20:42 -06:00
86325ef89b perfmeters: adjust sizing 2021-06-13 11:21:59 -06:00
e511cd2cb7 JACK backend: "fix" RunLoop timing 2021-06-13 11:11:03 -06:00
3df49bad7d performance meters: worst case for all 2021-06-13 11:05:19 -06:00
56d9d5376c continued tweaks to DSP performance meters window 2021-06-13 10:28:51 -06:00
a5f7c793e3 add a new "Run Loop" timing stats for ALSA and JACK backends 2021-06-13 10:28:51 -06:00
a89ad7a265 add queue-reset method to PBD::TimingStats 2021-06-13 10:28:51 -06:00
f196256604
Fix jack2 input-port monitoring
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
2021-06-13 17:41:41 +02:00
95215ff405 JACK backend: avoid deadlock if a port is unregistered that is not known to Ardour 2021-06-13 07:59:14 -06:00
7980ea4d27 add a method to SerializedRCUManager to release the lock when no update is required 2021-06-13 07:58:45 -06:00
e1495100a8 continuing work on presenting useful data in perf meter window 2021-06-12 15:00:46 -06:00
4c76ff503f measure backend process callback duration in ALSA backend 2021-06-12 15:00:46 -06:00
Mathias Buhr
c5abb7ecda Fix Upsampler new/delete mismatch 2021-06-12 21:16:18 +02:00
434bd2486e start showing some DSP stats in the perf meter window
Lots of work to be done to decide what data to show and how to best present it
2021-06-12 09:20:58 -06:00
8afc994177 add some DSP stats to the JACK backend 2021-06-12 09:20:28 -06:00
Desidiosus
d8e2f2fcad Fix incorrect call in request_roll 2021-06-12 07:56:00 -06:00
Edgar Aichinger
f81d3ce333
minor german translation update 2021-06-12 15:14:43 +02:00
John Emmas
87e295fc7e Add MSVC support for the upcoming dsp stats window 2021-06-12 10:42:27 +01:00
a47348f2a2 integration of new dsp stats window with window proxy system, part 3 2021-06-11 21:17:44 -06:00
081c2525fd integration of new dsp stats window with window proxy system, part 2 2021-06-11 21:10:20 -06:00
dcee5067f5 integration of new dsp stats window with window proxy system 2021-06-11 21:07:47 -06:00
51df20796b skeleton for dsp stats window 2021-06-11 21:02:06 -06:00
182801b8d7 complete manual reversion of 7bce9899c0 2021-06-11 20:56:33 -06:00
f643e231f5 NOOP: add comment as a reminder for post-nutempo merge 2021-06-11 19:13:13 -06:00
78738ec5a1 skeleton for DSP stats GUI 2021-06-11 18:55:25 -06:00
1b505ddcb1 Revert "modify PBD::TimingStats to discard the first 1000 recorded values to avoid too much influence from chaotic startup conditions"
This reverts commit 7bce9899c0.

1000 at 8192 samples @ 44.1 is > 3 mins; counter may have overflowed. Not a necessary change.
2021-06-11 18:55:25 -06:00
1777cf8f69 add some initial timing points for dsp stats 2021-06-11 18:55:24 -06:00
462352102c add a new update() method to PBD::TimingStats to allow use of an already-computed interval 2021-06-11 18:55:24 -06:00
0f6b9e759c fix out-of-order initialization 2021-06-11 18:55:24 -06:00