Commit graph

13741 commits

Author SHA1 Message Date
Robin Gareus
dec10f2f3c First part of consolidating ::roll(), ::no_roll()
This moves common code (get and fill buffers) into ::passthru()
and renames ::passthru() to ::run_route().

passthru_silence() is no longer used (it was only needed A5 style
Track::no_roll_unlocked for no-roll + disk-monitoring)
2017-09-30 18:53:02 +02:00
Robin Gareus
0fc3bbddb2 remove unused Route::_silent 2017-09-30 18:46:24 +02:00
Robin Gareus
de4c0eb27c Remove Input-meter special-case
Now that disk is no longer topper-most but a processor, the special
case is no longer needed.
2017-09-30 18:01:45 +02:00
Robin Gareus
45336723f9 Re-initialize MMC devices when the preference is enabled 2017-09-30 16:48:30 +02:00
Robin Gareus
5fa9f8b399 Towards fixing no_roll()
Currently ::roll() may actually be a ::no_roll() under some circumstances.

This can also happen during count-in:
  transport_stopped () == transport_rolling()

and during latency-preroll:
   Global session-transport speed != 0, some tracks already roll,
   read data from disk and feed latent plugins.
   but other non-latent tracks or busses don't roll and still have to
   behave like the switch from no_roll() to roll() has not yet happened.

This changes the game WRT to monitoring as well, previously, Route:roll()
called Route::no_roll_unlocked () for conditions outlined above.
Now Track::no_roll_unlocked is called and in some cases wrongly clears
the buffers before the signal hits the disk-writer. (more work is needed
related to 61f8e53b)

On the upside this also fixes an issue with MidiTrack::no_roll not keeping
a lock while pushing data into the step-edit-ringbuffer.

This is also a step towards consolidating all entry points:
::roll(), ::no_roll(), ::silent_roll() in the Route class.
2017-09-30 16:45:45 +02:00
Robin Gareus
697d29cdc2 Fix thinko in 8139becb -- route split cycle
Individual Routes cannot split the process-cycle in no_roll(); roll()
by themselves. Each of the calls will flush output buffers (and offset
port-buffers). If a route feeds another route the inputs of the other
route will only see partial data.
2017-09-30 13:10:17 +02:00
Robin Gareus
61f8e53b7e Disk-reader don't silence buffers when not rolling
Doing so may clear out-of-band data which is injected into the
data-stream.
2017-09-30 05:35:12 +02:00
Robin Gareus
5ada17eba0 Fix MIDI port offsets.
AudioPort::get_audio_buffer() can offset the buffer simply by offsetting
a pointer. This allows to get an offset buffer for a given port.

For MIDI there's no such concept. A method writing to a MIDI buffer
which is backed by a Port can at best offset it by the global port-buffer
offset (static Port::port_offset), but not by the individual target port's
offset.
2017-09-30 05:25:27 +02:00
Robin Gareus
72fb8a5342 Align punch in/out recording with latency-compensation 2017-09-30 02:45:13 +02:00
Robin Gareus
915b308a88 amend ccedb2d44 2017-09-29 21:15:51 +02:00
Robin Gareus
bf41b7cfcb remove cruft 2017-09-29 21:05:46 +02:00
Robin Gareus
70c4977ab3 remove *.orig files (accidentally added in cba53a202) 2017-09-29 21:05:06 +02:00
Robin Gareus
ccedb2d44e Remove unused punch+preroll API
This API was not used, also superseded by record w/preroll.
2017-09-29 21:02:22 +02:00
Robin Gareus
33811b51b2 Convert Diskstream/Playlist from A5 session format 2017-09-29 06:48:27 +02:00
Robin Gareus
27b02b672a remove cruft 2017-09-29 06:32:10 +02:00
Robin Gareus
1339d42c78 Add DiskIOProc & Latency related Lua bindings & scripts 2017-09-29 05:03:48 +02:00
Robin Gareus
2b20f30d81 Aux-Send Latency compensation, part 2 & code-consolidation 2017-09-29 05:03:48 +02:00
Robin Gareus
9f9e948d84 Update Send: Include internal 'thru' delay-line
This allows to push latency upstream and delay the source
in case the destination has a longer latency.

Also add a signal to notify the Session in case this happens, intended
to queue a latency-recompute.
2017-09-29 05:03:48 +02:00
Robin Gareus
ddd4e3cf1d Aux-Send Latency compensation, part 1: latent sources 2017-09-29 05:03:48 +02:00
Robin Gareus
f974cd5401 Update Timecode Generator/Slave alignment 2017-09-29 05:03:48 +02:00
Robin Gareus
eb6df8939d Delayline: report if set_delay() actually changed the delay 2017-09-29 05:03:48 +02:00
Robin Gareus
5a2ea4d0e2 Delayline naming -- for debug purposes 2017-09-29 05:03:48 +02:00
Robin Gareus
24ec0b974d Properly aligned export (Stem + Session)
Delay ports being exported by their playback latency.
2017-09-29 05:03:48 +02:00
Robin Gareus
a6cc58d757 Remove unused mechanism 2017-09-29 05:03:48 +02:00
Robin Gareus
519576c31f Update the Metronome, align to output 2017-09-29 05:03:48 +02:00
Robin Gareus
8139becb18 Ongoing work on latency compensation
The general goal is to align transport-sample to be the audible frame
and use that as "anchor" for all processing.

transport_sample cannot become negative (00:00:00:00 is the first audible
frame).

Internally transport pre-rolls (read-ahead) before the transport starts
to move. This allows inputs and disk to prefill the pipeline.

When starting to roll, the session counts down a global "remaning preroll"
counter, which is the worst-latency from in-to-out.
Each route in turn will start processing at its own output-latency.

Route::process_output_buffers() - which does the actual processing
incl disk i/o - begins by offsetting the "current sample" by the
route's process-latency and decrements the offset for each latent
processor.  At the end of the function the output will be aligned
and match  transport-sample - downstream-playback-latency (if any).

PS. This commit is a first step only: transport looping & vari-speed have
not yet been implemented/updated.
2017-09-29 05:03:48 +02:00
Robin Gareus
8ff3b5ecf6 Add API to query IO latencies
IO::connected_latency() is relevant once Ardour publishes individual
per Port latency.

IO::public_latency() is only for debug purposes.
2017-09-29 05:03:48 +02:00
Robin Gareus
491523d6b7 Add Processor API for global session-transport alignment
These are only relevant for DiskIO Processors, however more
use-cases may present themselves (e.g. LuaDSP)
2017-09-29 05:03:48 +02:00
Robin Gareus
69b9ad6bcc Prepare removal of initial_delay 2017-09-29 05:03:48 +02:00
Robin Gareus
3d1e1d7213 clean up route header, NO-OP (except variable re-order) 2017-09-29 05:03:48 +02:00
Robin Gareus
abb7cb90e7 NO-OP: Whitespace 2017-09-29 05:03:48 +02:00
Robin Gareus
2fa1f1b0b3 Remove code related to capture-offset. 2017-09-29 05:03:48 +02:00
Robin Gareus
d98f87d542 No more disk-reader roll-delay
It was not working in sdio/6.0-pre anyway and with upcoming changes to
latency compensation the concept of per disk[stream/reader] will go away.
2017-09-29 05:03:48 +02:00
John Emmas
bcdb3aec3a Check in a few MSVC projects to accommodate the change from libtimecode to libtemporal
This is mostly to see if there'll be any problems when merging these changes into Mixbus. I'm guessing there'll be some conflicts in these projects (and a lot more to follow...)
2017-09-28 12:27:56 +01:00
John Emmas
7f327905a0 Accommodate newly added/removed source(s) in our MSVC project (libwidgets) 2017-09-28 12:27:55 +01:00
John Emmas
b2032938b1 Accommodate newly added/removed source(s) in our MSVC project (libtemporal) 2017-09-28 12:27:54 +01:00
John Emmas
657ba64ad2 Rename 'libs/temporal/MSVCtemporal/timecode.vcproj' to 'libs/temporal/MSVCtemporal/temporal.vcproj' 2017-09-28 12:27:54 +01:00
John Emmas
2750f7f485 Rename 'libs/temporal/MSVCtimecode' to 'libs/temporal/MSVCtemporal' 2017-09-28 12:27:53 +01:00
Robin Gareus
7e2c002ef6 Propagate Latency to backend/system ports (Dummy backend)
amend ab3889ff (which implements this for other backends)
2017-09-28 13:14:11 +02:00
Robin Gareus
b137a2982f Export needs to offset buffers when processing partial cycle 2017-09-26 17:52:43 +02:00
Robin Gareus
a80c8e1bb7 Fix FixedDelayline, default configuration increased set max-delay 2017-09-26 17:52:35 +02:00
Paul Davis
61be0990fa change libtemporal to be versioned like all others 2017-09-25 12:13:54 -04:00
Paul Davis
dcb55c508e additional changes to follow library name change from timecode -> temporal 2017-09-25 12:13:54 -04:00
Robin Gareus
f27ff4c8b8 Retire ClickBox + AutoSpin
After over 17 years of honorable service to the Ardour Codebase.
ClickBox and AutoSpin are retiring into the git nirvana.

We're glad for the duty, decency, reliability, dignity, respect which
these classes brought to Arodur and look back in gratitude on their years
of service.



PS. First one to say "cruft" will be fired.
2017-09-25 15:45:27 +02:00
Julien "_FrnchFrgg_" RIVAUD
74c986534b Simplify the logic of on_scroll_event 2017-09-24 22:58:59 +02:00
Julien "_FrnchFrgg_" RIVAUD
564fcb2132 Make ArdourFader's scroll handler obey to Alignment increments
Currently, the scroll handler obeys to the page increment, but instead
of using the step increment for more precise scroll, it uses an
hardcoded one tenth of the page increment.

Use the step increment instead since it has been filled with sensible
values by ArdourFader's users.
2017-09-24 22:58:59 +02:00
Paul Davis
b9c6ffac21 fix header order and space alignment 2017-09-24 12:57:27 -04:00
Paul Davis
7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
Paul Davis
9283bee867 new header file for audio-based time types 2017-09-24 12:03:13 -04:00
Paul Davis
48d402c960 part two of initial libtemporal creation 2017-09-24 10:48:00 -04:00