13
0
Commit Graph

32104 Commits

Author SHA1 Message Date
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
c01f68cfca
Fix MIDI bounce w/processing (event times + latency compensation)
see also 8f9c1df183
2021-06-12 02:34:22 +02:00
1c4323e32f
Fix crash on MIDI bounce w/processing
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.
2021-06-12 02:34:22 +02:00
76f30fe74e
NO-OP: whitespace (clang-format) 2021-06-12 02:34:22 +02:00
1ed0e88e23
NO-OP: whitespace 2021-06-12 02:34:22 +02:00
ef72afb963 add PBD::TimerRAII class for easy management of TimingStats in scope contexts with multiple return points 2021-06-11 13:09:52 -06:00
7bce9899c0 modify PBD::TimingStats to discard the first 1000 recorded values to avoid too much influence from chaotic startup conditions 2021-06-11 13:09:52 -06:00
3f6bf2c451
Overhaul connection events, fix capture alignment
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.
2021-06-11 20:02:39 +02:00
a67a475480 dramtically improve performance of ::get_port_by_name() for JACK backend 2021-06-11 10:41:41 -06:00
11798f7e86 fix crash caused by not explicitly deleting the line component of a Marker (#8737) 2021-06-11 10:24:49 -06:00
47b06afc9d
Leave cpu_dma_latency alone by default (prevent overheating) 2021-06-11 14:29:34 +02:00