summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
AgeCommit message (Collapse)Author
2019-04-07Prepare midi-export for midi-to-audio bouncing.Robin Gareus
* shift event time into process cycle before calling processors * reset note-trackers when exporting, don't allow any pending events into the queue
2019-04-07NO-OP/Optimize Bounce: Lookup data-type only onceRobin Gareus
This is to prepare for midi-to-audio bounce: allow to change the data-type to be used as output.
2019-03-28Fix route-templates with external sendsRobin Gareus
2019-03-23Clean out session-global controllablesRobin Gareus
This isn't strictly speaking needed, there are only a handful of users (most notably generic-midi ctrl surface, and Selection)
2019-03-20working but still confusing fix for ensuring that playlist shared-with data ↵Paul Davis
is correct when duplicating tracks. Confusing because orig_track_id is still being switched to the NEW track, and shared_with refers to the OLD one
2019-03-20fix Session::new_route_from_template() to use playlist IDs and not names. ↵Paul Davis
This also fixes #7674
2019-03-19Remove global Session::playlists variable, use getter method (1/2)Robin Gareus
Global variables that can written by anyone are to be avoided. This also simplifies exposing SessionPlaylists as Lua bindings.
2019-03-18NO-OP: Use API to set/test state-of-the-stateRobin Gareus
2019-03-17Speed up session deletionRobin Gareus
No need to reconfigure routes due to removal of monitor or aux send/return. The processors will be removed with the route.
2019-03-17NO-OP: prefer to use API to check session-stateRobin Gareus
2019-03-06Fix typoRobin Gareus
2019-03-06Tweak session loadRobin Gareus
Listen positions are already correctly set when the route state is restored. The Route directly uses the Config. This skips duplicate calls to re-configure all processors on all Routes during RCConfiguration::map_parameters() on session-load, twice (pfl-position, listen-position)
2019-03-01Revert Monitor-Section to be per sessionRobin Gareus
This partially reverts 639dff3a7c7. 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-02-21Remove more cruft (unused rf-scale)Robin Gareus
2019-02-12Session-range behavior (libardour part)Ben Loftis
2018-11-28Consolidate ambiguous engine API callsRobin Gareus
available(), connected(), running() were ill-defined and used interchangeably.
2018-11-26Fix stuck connection block when template load fails.Robin Gareus
Session::new_route_from_template() unconditionally calls IO::disable_connecting(), and needs to be reverted likewise (no RAII here).
2018-11-26Prevent deadlock when removing routes w/o engineRobin Gareus
2018-11-26Don't allow to add/remove monitor-section w/o engineRobin Gareus
Adding/removing the Monitor section changes port-connections, a port-engine is needed to establish connections. Ideally we'd allow this and queue for connection changes. This will however require deep changes. Also toggling the monitor-section on/off/on w/o engine can later result in failure to register ports. Due to lack of engine-signals not all shared_ptr<> port references are dropped.
2018-11-12Make foldback bus match foldback sends namewiseLen Ovens
to avoid confusion with listener sends or monitor bus
2018-11-07get_stripables and get_routelist are now presentationinfo awareLen Ovens
2018-10-30Add ListenBus to stripable typesLen Ovens
2018-10-25Fix race-condition/deadlock, plugin-copy while rollingRobin Gareus
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-12PT import: Minor changes to sessionDamien Zammit
2018-10-08some rather simple code to allow MIDI Clock to set the tempo of the session.Paul Davis
This is only allowed if the session has only 1 tempo marker
2018-10-05Properly disable looping when deleting loop-rangeRobin Gareus
2018-10-05NO-OP: whitespaceRobin Gareus
2018-09-18new transport slave/master implementation, libs/ editionPaul Davis
2018-08-02Add method to conveniently retrieve a sorted routelistRobin Gareus
2018-07-09Remove unused AutoLoopDeclick, PendingLoopDeclickRobin Gareus
The flags were set, but not used. They also won't be needed anymore.
2018-07-09Remove global declick APIRobin Gareus
De-click will be per disk-reader, latency compensated and buffer-size independent. Cue-monitoring should not be affected by de-click.
2018-06-28when creating a route from a template, use correct call to setup XML state ↵Paul Davis
so that name/ports are unique
2018-03-19Lua: Lock bindings into memory for rt-scriptsRobin Gareus
Empirically this decreases gc-spike duration (worst-case) by a factor of two and speeds up the average gc-run by a factor of over 4 (depending on the amount of memory used by the plugin).
2017-11-29Tweak Lua GCRobin Gareus
2017-11-04Optimize Delaylines: block-process (not one sample at a time)Robin Gareus
This also tweaks fade behavior when the latency changes to prefer a x-fade when possible. This new variant does not support concurrent re-allocation and execution. Hence the auto-connect thread needs to take a lock before updating latencies (actually there's no need for an explicit update with built-in backends, so this case remains to be updated further)
2017-10-30Parallel execution of cycle-start/endRobin Gareus
2017-10-29Move vari-speed into backend (resample ports)Robin Gareus
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-09-30Align punch in/out recording with latency-compensationRobin Gareus
2017-09-29amend ccedb2d44Robin Gareus
2017-09-29Remove unused punch+preroll APIRobin Gareus
This API was not used, also superseded by record w/preroll.
2017-09-29Aux-Send Latency compensation, part 2 & code-consolidationRobin Gareus
2017-09-29Properly aligned export (Stem + Session)Robin Gareus
Delay ports being exported by their playback latency.
2017-09-29Ongoing work on latency compensationRobin Gareus
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-29No more disk-reader roll-delayRobin Gareus
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-23Fix order of [initial] latency-computationRobin Gareus
Session::post_playback_latency() sets the actual route latency, so that playback latency notifications need to come after capture- latency (backends follow the same rule: capture first). NB. Session::initialize_latencies() was already using the correct order
2017-09-23NO-OP: whitespaceRobin Gareus
2017-09-21Fix crash when unloading a partially loaded session.Robin Gareus
2017-09-19Various updates and fixes for Latency CompensationRobin Gareus
* 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-18globally change all use of "frame" to refer to audio into "sample".Paul Davis
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-18reinstate "restart seek" behaviour but use a new Session::_seek_counter ↵Paul Davis
member variable for this