13
0
Commit Graph

16156 Commits

Author SHA1 Message Date
d776415d54 DiskReader: always reset file_sample[AUDIO] after an overwrite
In theory we only need to do this if the use of a loop for a given overwrite differs
from the previous refill or overwrite. However, keeping track of this is hard, and
this way effectively enforces the notion that if we do the arithmetic correct,
for cases where there's no change in the use of a loop location, this ends up
being a no-op (i.e. we are resetting it back to its current value)
2020-05-13 23:54:02 -06:00
7660ea29d2 avoid off-by-one error when overwriting w/loop 2020-05-13 18:52:29 -06:00
7232ac2f67 update DiskReader loop delick objects when loop changes 2020-05-13 18:52:29 -06:00
abbcc755c1 reinstate Session::loop_changing to avoid problems when locating to start of loop for loop play 2020-05-13 18:52:29 -06:00
10200f5e29
Fix crash when closing session with VCA slaved solo
Session::destroy() calls drop_references(),
which leads to  InternalSend::send_from_going_away()
calling InternalSend::propagate_solo().

This looks up the SoloControl to test soloed_by_others(), incl.
and VCA maters. Those VCAs however may already have been destroyed,
and (weak pointer) _master.lock() fails.
2020-05-13 17:58:37 +02:00
7289be59c9
Set timecode format from active master only 2020-05-13 17:39:06 +02:00
7a0427201c essentially a no-op to just make conditional clearer more explicit 2020-05-12 12:45:39 -06:00
a9360eb6d6 find a different way to NOT unset play loop when locating to start of loop 2020-05-12 12:45:19 -06:00
ac915d7d55 NO-OP: remove commented line 2020-05-12 11:34:38 -06:00
5b7c20453f DiskReader::overwrite_existing_audio() now only overwrites data that would be read
There's no need to fill the whole buffer, because we do not consider the whole buffer readable.
This uses the recently-added PlaybackBuffer::overwritable_at() API to compute the correct
amount of data to overwrite
2020-05-12 11:34:38 -06:00
af46adc110 NO-OP: expand comments for DiskReader::audio_read() parameters 2020-05-12 11:34:38 -06:00
f5064fa1ca after an overwrite with the loop location set, reset the next sample to be read 2020-05-12 11:34:38 -06:00
156a31ac4f remove Session::loop_changing
Since we now (correctly) do not locate for loop changes, this member
is unnecessary
2020-05-12 11:34:38 -06:00
d39ae0ea92 remove #ifdef'ed code 2020-05-12 11:34:38 -06:00
615b1c4a4a restore mistakenly remove condition for locating 2020-05-12 11:34:38 -06:00
80fb4fe626 NO-OP: remove newline in function definition 2020-05-12 11:34:38 -06:00
e9b9f03499 remove debug/information message 2020-05-12 11:34:38 -06:00
9b3c31f6b9 As in previous commit, never locate because of loop handling 2020-05-12 11:34:38 -06:00
ef1565d2bf We use seamless looping always now. Never any need to locate for loop changes 2020-05-12 11:34:38 -06:00
0326af6f6a make conditional logic fully explicit 2020-05-12 11:34:37 -06:00
98d56d6b21 Add API to PlaybackBuffer to compute amount of data that can overwritten
The distance is between a given offset in the buffer (probably a
read position at some point in time) and the write ptr. Any data after
the write ptr is "old" and not readable, and thus not worth overwriting
since we would not read it anyway.
2020-05-12 11:34:37 -06:00
376d4f2e68 LocateRoll session events should always roll-after locate
Don't rely on ev->locate_transport_disposition
2020-05-12 11:34:37 -06:00
c2e774e99d trivial reorder of variable assigment 2020-05-12 11:34:37 -06:00
27e45e9336 Don't bother even checking let alone doing internal seeks for zero distances 2020-05-12 11:34:37 -06:00
98a3a96d40 use more standard mechanism for "squishing" start of audio read into loop range 2020-05-12 11:34:37 -06:00
7138e76d2d new mechanism to refill pre-loop buffer when loop changes (used for xfading loop ends) 2020-05-12 11:34:37 -06:00
6a542fe5fe Use better method call to determine rolling status when loop is changed 2020-05-12 11:34:37 -06:00
2debf52ef1 remove unused variable 2020-05-12 11:34:37 -06:00
5a7b7b3bfb remove Route::reload_loop() and derivatives
Replacement to follow in subsequent commit
2020-05-12 11:34:37 -06:00
6433647268 use const; style guide (no spaces around conditional parenthesis) 2020-05-12 11:34:37 -06:00
da9b366e63 NO-OP: style guide issues (always use braces; no spaces around conditional parenthesis) 2020-05-12 11:34:37 -06:00
6f6d26d0ef
Fix spacing of engine-delta display 2020-05-12 19:32:27 +02:00
9908419f89
Use byte-offset when reading size at ringbuffer boundary
This likely fixes https://github.com/sfztools/sfizz/issues/221
2020-05-12 19:30:15 +02:00
ab6e274613
Ignore idempotent set_name() calls
These calls are expensive, particularly for ArdourButton, that
triggers a re-layout.
2020-05-12 15:37:23 +02:00
fb203f3df8
Consolidate delta-string format, avoid markup 2020-05-12 14:59:44 +02:00
b36e6b8341
Optimize drawing of buttons with changing text
When a button has a fixed size, there's no need to call queue_resize().
This fixes an issue with the ArdourClock info displays when slaved.
The Timecode and Delta display text changes in small intervals and
caused excessive CPU load due to GUI size-requests + redraws.
2020-05-12 13:22:11 +02:00
ba1a60873a
Fix MTC delta report
This amends a6ffc6213b.
apply the offset before the DLL.
2020-05-12 01:49:45 +02:00
feaf87d200
Dummy Backend: remove hardcoded MTC sequence 2020-05-12 01:49:45 +02:00
7c15ad099f
Dummy Backend: add a MTC generator 2020-05-12 01:49:41 +02:00
80abcc8b2d Transport Masters dialog: use delta symbol in all delta_strings (libardour tweak) 2020-05-11 15:37:40 -05:00
88fc77b4c0
Double dummy MTC sequence duration 2020-05-11 21:35:22 +02:00
5e2755baa1
Slave delta display tweaks
* use left-aligned sign symbol with "sample" unit.
  When the delta value jitters in decimal places (e.g. MTC)
  it's otherwise no possible to discern + vs -.
* Use white text by default (not green)
2020-05-11 21:34:01 +02:00
58c5f75fc9
Fix TCM requiring port-reconnect when engine restarts
An engine restart sends dis-connect messages for the reverse
port-mapping (after making the connection):

Connect: system:midi_capture_41a56f90 -> ardour:MTC in
Connect: system:capture_1 -> ardour:LTC in
DisConnect: ardour:MTC in -> system:midi_capture_41a56f90
DisConnect: ardour:LTC in -> system:capture_1

This lead to TransportMaster being marked as inactive.
This is likely an issue that should be fixed elsewhere, but in
case of JACK, we likely do not have control over this.
2020-05-11 03:42:21 +02:00
a6ffc6213b
Fix MTC latency compensation
Offset the detected timecode instead of the detection time.
The latter is used by the DLL and later also used to calculate
delta times which lead to a constant offset.
2020-05-11 02:04:40 +02:00
f69a395893
Fix MTC slave port latency 2020-05-11 00:37:32 +02:00
4ff6fbe6b8
ALSA: Use same period for in+out #8075
Since the input is never flushed, capture latency is still
only one cycle.
2020-05-10 22:28:40 +02:00
e9401934c1
LTC: sync-lock is only relevant when clock is synced 2020-05-10 22:28:37 +02:00
52ae134efb
Fix initial sync to external time source
TransportMasterStart needs to be set when this cycle's delta
can reach _remaining_latency_preroll.

This allows to directly catch the master-position and start
rolling without initial vari-speed.
2020-05-09 23:43:04 +02:00
3ca33c07dc
Update LTC reader port latency on connection change
This mechanism adds infrastructure that can later also be used
for MTC and MIDIClock.

PS. The LTC Generator port's latency is queried after the port
is created, and later kept in sync via LatencyUpdated signal.
2020-05-09 05:10:04 +02:00
a46091b86a
Fix subtle bug breaking vari-speed (from d9caa7fd9a) 2020-05-09 02:20:15 +02:00
abe23b5885
ALSA backend: ignore idempotent latency settings 2020-05-09 01:22:18 +02:00
ace8a0d7b9
LTC Generator: prefer LatencyUpdated signal 2020-05-09 00:34:15 +02:00
ecd55f9fec
LTC Slave: subscribe to LatencyUpdated signal
This uses a recently introduce Signal instead of the generic
GraphReordered, which was used in the past since it usually
happened after the latency was changed.
2020-05-08 23:51:40 +02:00
a2094d97ad
NO-OP: clang-format/whitespace 2020-05-08 23:30:04 +02:00
21f2c01fcd
Fix aux-send solo propagation
* Do not allow new send to change implicit solo (no propagation)
* Propagate changes to due aux-send removal upstream
  to tracks or busses connected to the source route.
* Forward solo-isolate
2020-05-08 14:59:44 +02:00
caf057f06d
Experiment: propagate solo-state with internal-sends
So far internal-sends were explicitly special-cased, and implicit
solo-state only was only forwarded for direct up/down-stream
connections.  ...and nobody can remember why :)

This restriction is removed, so far mainly with commenting-out
code, as experiment.

Internal sends are not only more convenient, but also required
in cases where direct connections result in ambiguous latency.
2020-05-08 06:35:08 +02:00
3f6764f276
Fix 6afcb350c5, internal backends don't report externally_connected() 2020-05-08 04:01:24 +02:00
10df041421
Fix LTC generator alignment
When rolling forward the LTC generator needs to send future
a timestamp, so that when it matches the current time when
the signal arrives at the output port.

(A6 aligns transport playhead to output)
2020-05-08 03:17:28 +02:00
21bb10238e required header inclusiong 2020-05-07 17:40:20 -06:00
0da5dcd49f make LTC transport master safe against the absence of a session
For example, when opening a new one, there will momentarily be no session
2020-05-07 17:40:20 -06:00
df89fc9bba fix definition of templateed foreach_track() methods 2020-05-07 17:40:20 -06:00
490fac1632 add new template methods for "foreach {route,track}" and use them
Also remove redundant double call to Track::set_block_size(). This dates back to 2010
when there used be an additional traversal of the Diskstream RCU-managed list, before
they became owned by Tracks
2020-05-07 17:40:20 -06:00
95d9f60035 fix comment typo 2020-05-07 17:40:20 -06:00
07aa203a92
Fix comment in previous commit 2020-05-08 01:37:24 +02:00
6afcb350c5
Fix capture alignment when using JACK
In case of JACK all ports not owned by Ardour may be re-sampled,
and latency is added. External JACK ports need to be treated
like physical ports: I/O latency needs to be taken into account.

When not using JACK, all external ports are physical ports
so this is a NO-OP for other backends.
2020-05-08 01:26:47 +02:00
d363a1740d
Reset external connection count when ports are reestablished 2020-05-08 00:20:54 +02:00
a5faef9379
Remove unused variable 2020-05-07 20:43:26 +02:00
8ffcdc9d02
Send LTC timecode from engine context 2020-05-07 20:43:22 +02:00
7b28aabb43
Change LTC Generator from IO to Port
This is done in order to set the TransportGenerator flag
2020-05-07 20:43:04 +02:00
d9caa7fd9a
Prepare timecode-generator direct-out
Generator ports (like TransportMaster slaves), should not be
re-sampled when vari-speeding. Instead the Timecode/Clock should
directly use the engine-speed.

For this to happen, they need to be special-cased: no re-sampler
latency, direct access to engine-buffers.
2020-05-07 20:42:53 +02:00
9604e64c35
Fix initial disk-reader fade-in
Since 4508d5bab this only happened after a fade-out.

Currently there is no fade when transport is stopped and monitor
mode changes MonitoringDisk <-> MonitoringInput.
DiskReader::DeclickAmp is only used for data from disk.
Fading live-input data passing through will likely need another
Amp.
2020-05-07 16:12:52 +02:00
4fa955baf2
Fix Latency information of TransportMasterPort ports
PortManager::cycle_start() excludes these ports from being
resampled. They're directly handled by the TSM, outside of
the session.
2020-05-07 15:12:57 +02:00
8967df460a
Auditioner: ignore dis/connections during init/shutdown 2020-05-07 15:12:57 +02:00
c75b2355c1
Fix potential malloc(0) issue 2020-05-05 17:13:18 +02:00
a0f05e6dda updated libardour czech translations from pavel frich 2020-05-05 08:48:39 -06:00
350051569f remove empty API and usage
This went away when we added RTMidiBuffer. Getting data from MIDI playlists is now
completed in one pass, without note trackers
2020-05-04 18:54:40 -06:00
9b070eefb1 fix note-tracking in Editor::write_one_track()
We need a MidiStateTracker to determine notes whose end is not reached
during the call to ::write_one_track(), so that we can resolve them
in the output (SMF) source. This required some changes to the ::export_stuff()
API for tracks.

In addition, we now take the source "lock" just once during ::write_one_track()
rather than every time we write. This isn't an integral part of the
note tracking, but fell out along the way.

Finally, note that although we use a vector to handle MIDI "sources" here,
it is expected that there is only 1 MIDI source at present. Leave vectors in
place since it is possible that ::write_one_track() could be modified
in the future to change that.
2020-05-04 18:48:17 -06:00
7644168536 add some (commented/ifdef'ed) debugging for RTMidiBuffer::read() 2020-05-04 18:48:17 -06:00
47e83d2799 no need for return value 2020-05-04 18:48:17 -06:00
3ac96d3b24 add explanatory comment 2020-05-04 18:48:17 -06:00
447b473a1d slight better warning/debug message for a stuck note to-be-deleted 2020-05-04 18:48:17 -06:00
520ccd8ff2 use RTMidiBuffer API correctly when reading for MidiTrack::export_stuff() 2020-05-04 18:48:17 -06:00
4508d5bab1
Set de-click reason monitor vs. start/stop.
Previously use-monitor-fades was unused in A6, and transition
between monitoring states used the use-transport-fades preference.
2020-05-04 21:51:53 +02:00
a6f95b21fc
Fix alignment and de-click when monitoring changes while playing
Previously it was possible that
 * declick_out = true,
 * target_gain == 0, cur_gain != 0 (fade out active)
 * speed != 0, disk_samples_to_consume > 0.

So the disk-reader advanced the playback_sample, but since
declick_out is active, the read from the ringbuffer was not committed.
2020-05-04 21:48:47 +02:00
27f26f5cfd
Cont'd work on ALSA nperiods (amend 2326fb163) 2020-05-03 00:19:56 +02:00
2326fb1638
ALSA: only read/clear user-requested nperiods before snd_pcm_start
This should fix excessive latency with the RayDay that
has a fixed buffersize of 16384 samples.
2020-05-01 23:17:31 +02:00
b258ad792e force provision of "menu-name" for all WindowProxy objects, and thus Tabbables
Actions for hide/show/attach/detach tabbables use hard-coded names which are not
translated. Using Tabbable/WindowProxy::name() to lookup the action will fail,
since the name can be translated. This changes just removes the option to not
provide a menu-name when creating these objects, and uses the name menu-name
when looking up an action by name
2020-05-01 14:33:47 -06:00
1e814d2573 remove debug output 2020-04-30 13:13:48 -06:00
106315071a update other .po files 2020-04-30 13:03:46 -06:00
b95cd280f1 use PROGRAM_NAME to name GUI thread 2020-04-30 11:03:49 -06:00
70da4ad893 fix 52b9066511 (incorrect logic). Restores audio playback from disk 2020-04-30 10:36:01 -06:00
68cb914959
Set Arodur's main thread name to include "Ardour"
This is helpful when debugging by PID (adevices.sh most notably),
just "gui" is not usually helpful.
2020-04-30 18:24:22 +02:00
8fa0049d28
ALSA: set start threshold to zero 2020-04-30 04:16:17 +02:00
11f68a02cd
Another step towards nperiod fixes for the RayDay 2020-04-30 02:05:14 +02:00
3a6a9cfa6c
Tweak ALSA nperiod setting, fallback to nearest
This is mainly for RME RayDAT that has a fixed buffersize of 16k:

  dev_name : hw:HDSPMxc2f6c5,0
  channels : 36
  min_rate : 32000
  max_rate : 192000
  min_bufz : 16384
  max_bufz : 16384
  min_nper : 4
  max_nper : 512

However nperiod configuration determines the effective latency
regardless.

This is similar to https://github.com/jackaudio/jack1/blob/master/drivers/alsa/alsa_driver.c#L476-L486
2020-04-29 23:56:24 +02:00
6eb48e40a0 do not set declick_amp's gain for declick out during export of MIDI-only tracks
When export is done, nothing a MIDI-only track will reduce the gain ("goto midi" inside
DiskReader::run() and the "declick-in-progress" state will be permanent
2020-04-29 15:36:07 -06:00
551be058f2
NO-OP: whitespace 2020-04-29 15:12:23 +02:00
John Emmas
6144de5bf0 Add/remove source(s) in our MSVC project (midi++2) 2020-04-29 10:20:34 +01:00
47bb331bfa
Allow to refresh ALSA device list - #8051 2020-04-29 02:19:38 +02:00
3d5ea7dfab
ALSA: set min/max sizes before the debug message 2020-04-29 01:16:23 +02:00