Commit Graph

935 Commits

Author SHA1 Message Date
Robin Gareus 2e5ba08286
Add signal to indicate any track rec-arm change 2021-01-30 02:38:54 +01:00
Damien Zammit 5d0de7e037 pt import: Fix progress bar to span the whole import 2021-01-17 13:19:54 +11:00
Damien Zammit 12d62cd16e pt import: Fix race condition/threading, don't call new_audio_track() in bg thread 2021-01-17 13:19:54 +11:00
Robin Gareus 5974e61854
Add option to skip MIDI track input auto-connect 2021-01-08 22:50:45 +01:00
Robin Gareus f8b5424d9f
Fix deadlock during export
When using the export-tool, the very first callback may already be
freewheeling. In this case the first call to the butler also happens
directly from the freewheel process-callback and initial session events
are handled there. Setting PostTransportAdjustPlaybackBuffering
took the process-lock, which caused a deadlock:


Glib::Threads::Mutex::Lock::Lock(Glib::Threads::Mutex&) at /usr/include/glibmm-2.4/glibmm/threads.h:687
ARDOUR::Session::butler_transport_work() at ../libs/ardour/session_transport.cc:1157
ARDOUR::Session::process_export_fw(unsigned int) at ../libs/ardour/session_export.cc:303
ARDOUR::AudioEngine::process_callback(unsigned int) at ../libs/ardour/audioengine.cc:486
ARDOUR::DummyAudioBackend::main_process_thread() at ../libs/backends/dummy/dummy_audiobackend.cc:951
2020-12-08 01:09:57 +01:00
Robin Gareus a62fd0379e
Consolidate monitor-send setup 2020-11-26 23:58:15 +01:00
Paul Davis ab6a1d062d add new butler seek counter 2020-11-12 18:54:44 -07:00
Robin Gareus 84bf97aa49
Update ControlProtocol API, use CoreSelection
* replace signal-emission with direct calls to CoreSelecton
  using BaseUI's session pointer
* remove unused leftmost strip API
* use CoreSelection for first-selected strip
* Accessing CoreSelection does not modify the session
  (allow access from const callbacks)
* replace static calls in P2 surface

This removes indirection and dependency on the GUI for
managing strip selection.
2020-10-18 14:44:38 +02:00
Robin Gareus bebca37447
Cache the latency of the metronome's port 2020-09-22 21:42:52 +02:00
Robin Gareus 1a3da7e132
Keep processing while locating #8392
Previously when locating process_can_proceed() was set to true,
and routes were not processed while transport states are cleared.
As a result live input was also not processed.

This is no longer needed because the DiskReader handles seeking
directly.
2020-09-05 05:32:22 +02:00
Robin Gareus b49656213d
Prefer const reference (amend f564c92493) 2020-07-26 17:15:15 +02:00
Ben Loftis f564c92493 Prompt user for name of Range and Region bounces (libardour part) 2020-07-26 09:53:47 -05:00
Robin Gareus ba0dac92f2
Add a main-outs volume control and dedicated master-volume
This is intended for loudness normalization - #8318 to add
additional gain as last step.
2020-07-21 02:18:38 +02:00
Paul Davis 15fcb5c782 Transport: engaging loop play while rolling with no audio tracks now works
At present only audio data from disk readers is declicked. MIDI tracks with audio output should
likely also be declicked, at which time Session::need_declick_before_locate() will require
amending
2020-07-18 17:30:06 -06:00
Robin Gareus f6c0b02d9f
Overhaul MIDI auto-connect #8317, #8307
This consolidates instrument creation for midi tracks & routes.
If an instrument is added, output auto-connect is postponed until
after the instrument plugin is added. Also when a multi-channel
instrument is fanned-out, the track outputs are not auto-connected.

This also subscribes MIDI-Busses to auto-connect when an instrument
is loaded or replaced at a later time.
2020-07-18 23:27:11 +02:00
Robin Gareus 9fcb51de2e
Use signed int for atomic operations part II -- #8314 2020-07-16 18:07:14 +02:00
Robin Gareus 9d390f38bf
Cache MIDI generator port latency
This reduces excessive, expensive calls to get_connected_latency_range()
2020-07-12 01:50:01 +02:00
Robin Gareus d33cc4a3dd
Document transport state semantics
This also adds transport_state_rolling() which can be used
from a TransportStateChanged callback.
2020-06-12 05:02:06 +02:00
Robin Gareus 72d45c154a
Do not allow ctrl chars in file (or session) names (1/2) 2020-06-09 20:30:51 +02:00
Robin Gareus ef94663d1c
Overhaul MIDI Clock generator
* Fix absolute time alignment, sync clock ticks on exact beats
* Fix start/cont sync to MIDI Clock **Beats** (MIDI Clock / 6)
* Send timecode from engine (not session) - vari-speed independent
* Special case MClk port, don't /resample/
* Support pre-roll, sync start.
2020-05-31 23:46:28 +02:00
Robin Gareus 3a9bf57af9
Don't save the session when creating busses
Most calls to new_audio_route() used save = false, only directly
creating busses saved the session. Probably for historical reasons.
2020-05-19 18:02:23 +02:00
Robin Gareus 749291245c
NO-OP: replace `save_state("")` with `save_state()` 2020-05-19 17:14:47 +02:00
Paul Davis 7232ac2f67 update DiskReader loop delick objects when loop changes 2020-05-13 18:52:29 -06:00
Paul Davis 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
Paul Davis 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
Robin Gareus ace8a0d7b9
LTC Generator: prefer LatencyUpdated signal 2020-05-09 00:34:15 +02:00
Paul Davis 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
Robin Gareus a5faef9379
Remove unused variable 2020-05-07 20:43:26 +02:00
Robin Gareus 8ffcdc9d02
Send LTC timecode from engine context 2020-05-07 20:43:22 +02:00
Robin Gareus 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
Robin Gareus 8aa4ae825d
Skip delayline updates if no change is required 2020-04-27 14:08:37 +02:00
Robin Gareus 31c39ed869
Remove duplicate i/o latency calculation
Port and connection changes always imply a latency_callback from
the engine. Worst I/O latency is updated directly in
Session::update_latency() which is called from
AudioEngine::latency_callback.

Explicit subscriptions to route->output()->changed() is not needed
to update the worst I/O latency.

Only set_block_size() needs to to update the I/O latency when
the buffer-size changes.
2020-04-26 21:34:26 +02:00
Paul Davis 58304b3a7e make Session::should_ignore_transport_request() non-const 2020-04-24 14:20:59 -06:00
Robin Gareus 9875a95829
RAII collect processor-change signals 2020-04-18 23:54:24 +02:00
Robin Gareus aa2ddb5ea2
API change: LatencyUpdated(), indicate playback/capture 2020-04-07 00:10:29 +02:00
Robin Gareus c16ab3a248
Allow to disable input auto-connect when creating tracks
Auto-connect is handled in a background thread, so newly created
tracks are not immediately connected.

This causes a race-condition when fan-out directly disconnects
and re-connects ports after track/bus creation.
2020-04-03 15:36:19 +02:00
Johannes Mueller 687b3078c3 Don't issue VersionMismatch when creating a new session
When we create a new session and are using a template from an old version of
Ardour, we should not issue the VersionMismatch dialog and not make a copy of
the session file for the old version.

We need to extend the signature of Session::load_state() to tell it if we are
creating a session from a template. Session::_is_new cannot be used for it
because it has a the semantics if to auto connect the the master bus.
2020-04-02 14:33:21 +02:00
Paul Davis 1157c7d457 if user chooses not to delete a scratch session, removed the file that identifies it as unnamed
This way they will not be asked again if they reload and then quit the session
2020-03-25 10:24:47 -06:00
Paul Davis 5f1d802307 when saving an unnamed session, rename it
Note that this is done at the GUI level, might need to double check if there are
other paths into a "save" that should be covered. Control surfaces use the action, but
Lua comes to mind
2020-03-24 14:10:39 -06:00
Paul Davis e9be6c23a8 a better approach to the name of the "unnamed" indicator file; remove file after successful save 2020-03-24 14:10:39 -06:00
Paul Davis 5766989319 introduce the idea of an "unnamed" session 2020-03-24 14:10:39 -06:00
Paul Davis b3a1cbbfa2 add in timing for disk buffer reload after locate, to replace hard-coded 0.05 seconds per track
Leave debug output in place for now to get some numbers from any testers
2020-03-23 17:05:45 -06:00
Paul Davis 8296a030a5 redesign chasing the transport master
Substantive comments associated with code in Session::plan_master_strategy.

Known not to work for reverse TC. Also, the JACK related code has not yet been tested
2020-03-20 17:38:38 -06:00
Paul Davis 1783305077 provide mechanism to report on destructive tracks presence in a session 2020-03-17 16:31:50 -06:00
Paul Davis 0738472fee NOOP: indent/whitespace 2020-03-17 16:31:49 -06:00
Paul Davis a4d7b45fe0 remove destructive/tape mode tracks 2020-03-17 16:31:49 -06:00
Paul Davis f5ec5ea929 add new API to TransportMasterManager to manage use of DiskReader::{inc,dec}_no_disk_output() 2020-03-13 13:52:38 -06:00
Robin Gareus 128a45954c
Do not de-click during freewheel export 2020-03-06 01:44:32 +01:00
Robin Gareus 1f6686c2a0
Separate pre-roll cycle calculation
This is also needed when exporting.
2020-03-06 01:44:32 +01:00
Robin Gareus 08559abc10
Add signals to indicate Punch/Loop constraints
This is in preparation for GUI sensitivity of Loop and Punch actions.
2020-02-27 22:16:12 +01:00
Robin Gareus bc2cbfc7ec
Prevent concurrent loop and punch recording (backend)
This also prevents switching between punch-in/out record
and looping without transport-stop.
2020-02-27 02:36:16 +01:00
Paul Davis 4b10beec08 change transport API, session API, transportFSM API to move reverse management and motion state (partially) into TFSM 2020-02-20 00:25:25 -07:00
Paul Davis ad402e76af remove "destination_sample" from API for Session::set_transport_speed()
This was a leftover from changes made for Tracks Live, related to
the concept of an auto-return preference. We don't use this anywhere in Ardour
or Mixbus, and the concept should eventually be removed entirely.
2020-02-19 15:07:42 -07:00
Robin Gareus 6f205f857b
Replace missing .mid files with silence
This fixes a crash: missing playlist due to missing .mid,
and retains regions for missing MIDI files.

As opposed to missing Audio, we cannot use a SilentFileSource,
because MIDI files are destructive.

This also adds an API to query missing files that have been replaced
with silence to report them to the user.
2020-02-18 01:26:20 +01:00
Robin Gareus 0d127813fb
Allow StateProtector to save pending files
This is in preparation for saving state while the session is
record-arm'ed. Most notably config changes and undo/redo.

In case both normal and pending save happens, pending must be
last and is required to recover from crashes during recording.
2020-01-30 04:12:19 +01:00
Ben Loftis 2d07e72d40
Fix the ability to set Session Start&End Range on a new, empty session
set_session_extents had a bug; it wasn't calling locations->add()
on the newly created location.

The correct implementation was in set_session_range_location,
but this was only called from one place.
This function was removed, and set_session_extents will be used in its place.
set_session_extents will create a session location if one no longer exists,
so there is no need for set_session_range_location.
2020-01-26 19:33:41 +01:00
Paul Davis 5949fec987 add Session::locate_initiated()
This differs from ::locate_pending() by covering either phase of a locate - declick or refill
2020-01-23 14:25:38 -07:00
Paul Davis 31db7e91d8 remove no-longer used PostTransportWork bits and renumber the rest 2020-01-23 14:25:38 -07:00
Paul Davis ad82b443f4 fix API and use of Session::force_locate()
Because of the addition of LocateTransportDisposition, this call was unconditionally forcing a roll during startup
2020-01-20 11:07:27 -07:00
Paul Davis 47767738b9 rename DoTheRightThing to RollIfAppropriate 2020-01-18 08:49:18 -07:00
Paul Davis 3c00048b0c Session::request_locate() takes a tri-valued second argument for "roll-after-locate"
This allows callers to defer logic about auto-play/current rolling state and more to TransportFSM where it
can be cnentralized and is less ambiguous
2020-01-18 08:49:18 -07:00
Paul Davis e7542c0611 NOOP: line refolding 2020-01-03 16:13:23 -07:00
Paul Davis 007136cc23 remove MIDI Control input and output ports from session-level objects 2019-12-31 12:06:14 -07:00
Paul Davis 719c3f1457 add Session::transport_stopped_or_stopping()
Session::TransportStateChanged notifies about transport stop before the stop is complete (i.e. at the start of the declick).
Various other objects (notably control surfaces) connect to this signal and use it to modify their displayed state.
We need a method that can tell them we are stopped (or stopping) even though we are not "fully" stopped yet. This is
that method
2019-12-29 18:43:51 -07:00
Paul Davis 5cdeb2401f add new Session method to return the worst_latency_preroll() value rounded up to the nearest buffer size 2019-12-27 21:18:12 -07:00
Paul Davis 7b1a875f9c remove unused member
Note: there is no global state for "the" transport master, since we have several at all times now
2019-12-27 10:53:02 -07:00
Robin Gareus ab58c894d3
Use weak-ptr for source added/removed signals (1/2)
This might fix a "SessionHandleRef exists across session deletion",
when the shared_ptr was be pushed onto a x-thread pool, and not
invalidated in time before the session was closed.
2019-12-25 17:59:38 +01:00
Robin Gareus df17e3f041
Prevent copy-construction of sources to be destroyed list
destroy_sources () is only called from Session::remove_last_capture ().
The list of sources to be destroyed is the local scope of that method
and will hold a reference to the object.
copy-construct the list and removing elements one by one from the
copy is only unnecessary overhead.
2019-12-25 17:57:10 +01:00
Robin Gareus 848831d844
Convert Disksteam & Playlists from old 2.x sessions 2019-12-17 00:42:28 +01:00
Paul Davis cd78a168b2 reinstate missing latency initialization code
Removed (mistakenly) during work on transportFSM
2019-12-16 16:13:39 -07:00
Paul Davis c3e3930f14 revert to single buffer for disk playback, and 5.x-style overwrite
Also address issues with MIDI and also atomicity of _pending_overwrite
2019-12-10 09:29:22 -07:00
Paul Davis 8b4e714006 changes to use overwrite-buffers when loop is disabled or loop range changed 2019-12-05 13:13:16 -07:00
Paul Davis 1a2665e25f redesign of declicking and fades around loop boundaries 2019-11-22 23:41:56 -07:00
Paul Davis 5c9e7b8234 consolidate Session::locate() and Session::do_locate()
The first no longer needs to handle requests by passing them to
JACK transport
2019-11-15 16:06:04 -07:00
Paul Davis c69227fd8d eliminate hacky design for being able to deliver the correct time as JACK timebase master 2019-11-15 16:04:58 -07:00
Paul Davis febaa1ff2d fix unconditional note resolution during DiskReader::realtime_locate()
When looping, we do not want to resolve notes at the end of the loop via ::realtime_locate() -
::get_midi_playback() has already taken care of this. But when not looping, we need this. So,
add an argument to tell all interested parties whether the locate is for a loop end or not
2019-11-06 16:00:31 -07:00
Paul Davis 5241cdcf03 remove unused parameter from Session::set_play_loop() API 2019-11-02 16:32:18 -06:00
Paul Davis a855119bdd rename all Evoral source from .(hpp|cpp)$ to .(h|cc) 2019-11-02 16:32:18 -06:00
Paul Davis 2cf9ad8f8c refactor SessionEvent and DiskIO so that we pass around boost::shared_ptr<Track> rather than Route
(this the raw pointers used inside SessionEvent)
2019-11-02 16:32:18 -06:00
Paul Davis 833927a4ea don't send TFSM event LocateDone after a locate-for-loop-end
See comment for explanation
2019-11-01 15:56:06 -06:00
Paul Davis 7d3c2a4fee provide a mechanism to decide if Session::update_latency_compensation() is being called as part of a callback from the backend.
If it is, do not call AudioEngine::update_latencies() to avoid JACK1-style deadlock
2019-10-28 17:23:54 -06:00
Robin Gareus c398576e4a
Fix latency compensation race-condition
Remove need for explicit `initialize_latencies` call that used
to be called from GUI-thread post_engine_init(), as well as
Session::engine_running().

Further reduce calls, `graph_reordered` implies a latency-update
and fix ordering issue. update_latency_compensation() must be called
*after* resort_routes().
2019-10-26 01:06:04 +02:00
Robin Gareus eade673771
Expose virtual-keyboard port as async-port 2019-10-18 22:56:46 +02:00
Robin Gareus f961fd4687
Add Virtual-Keyboard MIDI port 2019-10-18 03:42:41 +02:00
Robin Gareus 52eea55988
Remove unused API declaration (removed in 789f08891b) 2019-10-13 04:12:02 +02:00
Paul Davis bfb998ca0a remove Session::AudioMidiSetupRequired signal (no longer necessary) 2019-10-12 12:45:13 -06:00
Paul Davis af82a06517 make BusProfile argument to new Session constructor be const (and in associated call tree) 2019-10-10 16:52:00 -06:00
Robin Gareus ecc2597870
Fix remaining doxygen warnings (!) 2019-09-30 21:03:29 +02:00
Robin Gareus 959a37144b
Fix a few hundred doxygen warnings..
There are still over a hundred left, but this addresses many already.
In particular @param references to undocumented parameters.
Most notably in audio_backend.h
2019-09-30 04:45:59 +02:00
Robin Gareus 1c680f116a
Emit signal when session latency was updated 2019-09-29 01:27:35 +02:00
Paul Davis 5ec5bc4523 goodbye USE_TRACKS_CODE_FEATURES and is_tracks_build 2019-09-25 12:16:13 -06:00
Paul Davis 86b23c0f19 add direct access API for transportFSM and session transport speed 2019-09-22 12:23:54 -06:00
Paul Davis 9f8b8d192b remove unused PostTransportDuration and enumeration-writing for Adjust(Playback|Capture)Buffering 2019-09-22 12:23:54 -06:00
Paul Davis 61afcb8e2b replace boost::msm - based FSM for transport with one written in "plain C++"
Still need to use boost::intrusive to managed qeued/deferred containers
2019-09-19 22:34:18 -06:00
Paul Davis bd229936ec add finite state machine to control/manage transport state 2019-09-17 18:26:03 -06:00
Len Ovens 220fa45d35 Add signal for foldback send add or remove 2019-08-26 17:48:22 -07:00
Robin Gareus 3243bf591c
Add method to graphviz plot the process-graph 2019-08-07 17:40:23 +02:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Ben Loftis 6c052348b5 (Source List) Region Tags (libardour part)
Rough-in: Region-Tags.

More correct implementation of tags property (libardour).

Region Tags (libardour part)
2019-08-01 12:11:31 -05:00
Ben Loftis 3e6ce20fd7 (Source List) Region List rewrite (libardour part) 2019-08-01 12:11:31 -05:00
Ben Loftis ca3c191d7c (Source List) Source property signals (libardour part) 2019-08-01 12:11:31 -05:00
Robin Gareus aef75f87b7
NO-OP: whitespace, comments 2019-04-08 18:32:03 +02:00
Robin Gareus ff8bd935cf
Remove chicken/egg d'tor
Session::Controllables is a shared_ptr<> list. As long
as the session exists the Controllables will be around. Destroyed(*)
can only be called after the session is destroyed and releases the
shared_ptr<>

NB. this code had a nice hack to construct a "shared_from_this"
workaround. For future reference:

struct null_deleter { void operator()(void const *) const {} };
boost::shared_ptr<Controllable>(c, null_deleter())
2019-03-23 14:31:00 +01:00
Robin Gareus cf11e11fc5
Remove global Session::playlists variable, use getter method (1/2)
Global variables that can written by anyone are to be avoided.
This also simplifies exposing SessionPlaylists as Lua bindings.
2019-03-19 05:14:00 +01:00
Robin Gareus 4706201425
NO-OP: Use API to set/test state-of-the-state 2019-03-18 15:36:58 +01:00
Robin Gareus 1854a72b80
Revert Monitor-Section to be per session
This partially reverts 639dff3a7c. When loading a session,
the monitor-bus that was saved with the session is used.

This changes semantics of the monitor-section/config.

Config::set_use_monitor_bus(bool) is used to initiate a change!
Notification about the change is sent asynchronously by
Session::MonitorBusAddedOrRemoved

It is no longer possible to directly call add/remove_monitor_section()
and leave the session + config in an inconsistent state.
2019-03-01 16:45:42 +01:00
Paul Davis bc8286c7eb simplifications to the logic and additional comments for code that handles auto-return at transport stop 2019-02-28 17:18:28 -07:00
Paul Davis 63fdfd9e85 remove PostTransportWorkCurveReallocate (no longer used) 2019-02-22 14:54:34 -07:00
Robin Gareus 522f28b3c5
Add API to check for ongoing de-click 2019-02-21 01:34:58 +01:00
Robin Gareus e48fe0fd42
Remove more cruft (unused rf-scale) 2019-02-21 00:24:56 +01:00
Robin Gareus c3a7c7c452
Remove cruft (unused PostTransportInputChange) 2019-02-20 19:23:37 +01:00
Ben Loftis 688bd28458 Session-range behavior (libardour part) 2019-02-12 11:35:48 -06:00
Len Ovens 80fd215a5c get_stripables and get_routelist are now presentationinfo aware 2018-11-07 17:00:16 -08:00
Robin Gareus 5599cdb911 Fix race-condition/deadlock, plugin-copy while rolling
lili93's session (#ardour) triggered this w/jackd 512fpp:
Drag/Drop copy a latent plugin from one track to another while rolling.
The GUI-thread as well as the auto-connect thread concurrently call
jack_recompute_total_latencies(). The auto-connect thread holds
a process lock while doing so. The GUI does not use any mutexes.
This randomly deadlocks in libjack.

backtrace: https://pastebin.com/6m3KGhWS
2018-10-25 02:00:08 +02:00
John Emmas e31bae4d09 Remove a #include and substitute a forward declaration (to simplify and speed up compilation) 2018-10-15 10:21:45 +01:00
Paul Davis 0cf27fd2cd fix several inter-related problems with libptformat 2018-10-14 20:35:29 -04:00
John Emmas a5a5ba1ace Clarify where the file 'ptfformat.h' can be found 2018-10-13 13:49:50 +01:00
Damien Zammit 3fd7f9478f PT import: Minor changes to session 2018-10-12 19:09:40 +11:00
Paul Davis 970c8939d4 some rather simple code to allow MIDI Clock to set the tempo of the session.
This is only allowed if the session has only 1 tempo marker
2018-10-08 12:59:51 -04:00
Paul Davis 4c7e5dbc74 move away from "sync source" concepts 2018-10-05 14:15:02 -04:00
Paul Davis e6915e01de new transport slave/master implementation, libs/ edition 2018-09-18 19:06:04 -04:00
Robin Gareus cf39ebc966 Add method to conveniently retrieve a sorted routelist 2018-08-02 21:36:34 +02:00
Robin Gareus bee09ac9e1 Remove unused CubicInterpolation from session 2018-07-09 17:30:38 +02:00
Robin Gareus 2953b575f2 Remove unused AutoLoopDeclick, PendingLoopDeclick
The flags were set, but not used. They also won't be needed anymore.
2018-07-09 17:30:38 +02:00
Robin Gareus 249640267c Remove global declick API
De-click will be per disk-reader, latency compensated and buffer-size
independent. Cue-monitoring should not be affected by de-click.
2018-07-09 17:30:38 +02:00
Paul Davis 8a18929d57 remove Session::controllable_by_descriptor() and move code into GenericMIDI code (the only user).
This also removes enums introduced to describe well-known parameters for Mixbus. Lookup now involves string
parsing every time, but this is not likely to be a notable cost.
2018-06-21 13:05:58 -04:00
Ben Loftis e6da4c4846 SoloSelection: libardour part. 2018-02-11 09:39:36 -06:00
John Emmas 2124fb72ea Make sure that 'libardour-config,h' only gets #included when building with waf (as it only gets generated when building with waf)
When building with MSVC this was getting #included in a few places which had the effect of making my session files get generated in a very old format.
2018-02-03 13:58:22 +00:00
Len Ovens 0dc3400707 remove unused line 2017-12-24 08:56:19 -08:00
Robin Gareus 471644c59d Parallel execution of cycle-start/end 2017-10-30 16:31:38 +01:00
Robin Gareus 927788a0b0 Move vari-speed into backend (resample ports)
Previously Ardour used a /local/ per track vari-speed mechanism.
Now that the disk-reader is a latency-compensated processor, the speed
of each disk-reader would need to be maintained locally, offset by each
disk-reader's output latency. Furthermore each disk-reader may
produce a different number of samples, depending on its global alignment.

This commit introduces port-data resampling directly at the engine-level:
Up/down-sample all input ports at the beginning, and down/up-sample output
port-data using the inverse ratio at the end of the session's process
cycle.
The session itself is unaware of the speed-change, and only needs to
handle transport speeds {-1, 0, +1}.

This also allows for aligned cue-monitoring and vari-speed recording,
and also pitch-shifts synthesized MIDI along.
2017-10-29 20:04:00 +01:00
Robin Gareus 9c3983a7a5 Fix various edge-cases with session-archives
* prevent duplicate names when pulling-in external sources
* drop "origin" after including external sources
* don't include unused playlists
  (they may reference sources that are not included)
* likewise exclude unused regions
2017-10-04 05:06:47 +02:00
Robin Gareus e31f5d9998 Clean up State API:
* Processor implement get_state(), classes derived from Processor
  implement protected ::state() -- as documented in processor.h
* likewise for Route, Track: make ::state() a protected interface
* removal of "full_state", use explicit "template_save"
* use RAII/Unwind to skip saving automation-state
2017-10-04 00:54:55 +02:00
Robin Gareus 0802a0872f API change: expose session-archive compression-level 2017-10-03 02:24:16 +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 2b20f30d81 Aux-Send Latency compensation, part 2 & code-consolidation 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 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 abb7cb90e7 NO-OP: Whitespace 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
Paul Davis 7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
Robin Gareus 10b76ae631 Various updates and fixes for Latency Compensation
* centralize signal_latency_at_***_position to processors
* update initial-delay/roll-delay when processor order changes
* consolidate signal-latency calculation: use the same method
  for processor-changes and session's post_playback_latency.
* include relative output-delay in roll-delay
* fix capture processor position & optimize stem-export latency

(roll-delay fixes pending Route:roll() update)
2017-09-19 02:11:22 +02:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Paul Davis ac8dc40035 fix for loading older sessions, where the rest for "is-track" was "has-diskstream", rather than "has-playlist" 2017-09-18 11:40:53 -04:00
Paul Davis f8de3e0c6e reinstate "restart seek" behaviour but use a new Session::_seek_counter member variable for this 2017-09-18 11:40:53 -04:00
Paul Davis e9dd575ca5 remove all code related to "silent roll" concept. some debug output added 2017-09-18 11:40:53 -04:00
Paul Davis 646d6bec7e when DiskReader checks to see if a locate is in progress, it must be atomic with respect to all DiskReaders 2017-09-18 11:40:53 -04:00
Paul Davis 30c6096d20 locating no longer interrupts process() 2017-09-18 11:40:53 -04:00
Paul Davis cb0d9f5607 remove InputConfigurationChange from session events, since it is a no-op in this development branch 2017-09-18 11:40:53 -04:00
Paul Davis e24ca13394 remove all remaining vestiges of per-track varispeed from libardour 2017-09-18 11:40:53 -04:00