summaryrefslogtreecommitdiff
path: root/libs/ardour/session_export.cc
AgeCommit message (Collapse)Author
2020-04-10somewhat change the condition used to identify when butler transport is done ↵Paul Davis
pre-export
2020-04-10fix typo/thinko in code that checks for result of waiting for butler ↵Paul Davis
transport work
2020-04-10Hotfix more export woes, prevent possible endless loopRobin Gareus
This apparently happens on some Windows systems when exporting a range starting at 00:00:00:00 I'm still hoping there's a better fix for these race-condition issues, perhaps by kicking the TFSM...
2020-04-09Cont'd work on fixing export rangesRobin Gareus
This picks up where cfd95340b1 left off. The goal is to ensure that the butler has completed all PostTransportStop related tasks and won't meddle with transport after exporting has started. Previously this could happen, because realtime_stop() queues PostTransportStop and the butler is sommoned after every export process cycle. Since 61e7f3176bf the butler keeps calling non_realtime_stop() every time it is woken up, until TFSM comes around and unsets the flag in the process callback.
2020-04-09Prevent FX from producing sound after exportRobin Gareus
This cuts reverb tails and synth sounds after export. Disabling freewheeling, continues normal processing where export left off. This previously kept notes ringing, or reverbs audible.
2020-04-09Safeguard against libaudiographer exceptionsRobin Gareus
2020-04-09Fix export-alignment with JACK -- #7916Robin Gareus
2020-04-08Fix exporting multiple range (MacOS)Robin Gareus
The actual issue was introduced in 61e7f3176bfd8e: Session::non_realtime_stop() no longer unsets PostTransportStop (other changes from that commit are not relevant). The real issue however is a race-condition. So far this only seems to happen on MacOS, Coreaudio. It seems that non_realtime_stop() is called in the butler-thread after exporting has started, even though the butler has been paused in wait_until_finished(). Perhaps Coreaudio thread switches causes TransportFSM to reinitialize and scheduling the butler? The use of `usleep()` makes this rather a workaround. However it's sufficient for the coreaudio rt thread to run at least once.
2020-03-06Fix export alignment (#7916)Robin Gareus
Ardour's playback is aligned to master-out: "When the playback clock reads 01:00:00:00, the sample corresponding to 01:00:00:00 is audible at the speaker(s)" When exporting, and grabbing data from output ports, the signal is offset by the master-bus physical playback latency. This was compensated for, but lead to initial silence in the exported file. New approach is to start capturing export data during pre-roll, at the time when playback is written to the output buffers. To also shaves off a common offset to make this work with realtime export. Effectively this emulates processing with disconnected master-output port, while still keeping any latency of effects on the master-bus itself. Last but not least: jack updates latencies when freewheeling, (setting HW latency to zero). The callback arrives asynchronously some time after enabling freewheeling, but after Export Ports have been configured. Those callbacks are ignored.
2020-03-06Fix realtime export of multiple time-spansRobin Gareus
After exporting a time-span, the next time-span was started directly from the rt-callback. This had various issues. In particular with realtime export. Post-processing of a realtime-export enables freewheeling and is driven by freewheel callbacks. Freewheeling needs to be safely disabled for an upcoming realtime export. A similar issues existed when mixing realtime and non-realtime exports.
2020-02-20change transport API, session API, transportFSM API to move reverse ↵Paul Davis
management and motion state (partially) into TFSM
2020-02-19remove "destination_sample" from API for Session::set_transport_speed()Paul Davis
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-01-18Session::request_locate() takes a tri-valued second argument for ↵Paul Davis
"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
2019-12-27fix JACK transport syncPaul Davis
key change: to sync with JACK always locate jack-position PLUS buffer-sized-rounded-worst_latency_preroll() ahead
2019-09-17add finite state machine to control/manage transport statePaul Davis
2019-08-03Update libardour GPL boilerplate and (C) from git logRobin Gareus
2018-11-28Consolidate ambiguous engine API callsRobin Gareus
available(), connected(), running() were ill-defined and used interchangeably.
2017-09-29Properly aligned export (Stem + Session)Robin Gareus
Delay ports being exported by their playback latency.
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-26Export needs to offset buffers when processing partial cycleRobin 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
2016-10-25Desperate hack to align master-bus on export.Robin Gareus
Another 90% solution which hopefully gives us another year :( see comments Session::start_audio_export() for explanation.
2016-10-17fast region export -- don't call process()Robin Gareus
2016-07-16Refactor TmpFile into an abstract base classRobin Gareus
This allows a TmpFile pointer to be either a Sync or Async (Threaded) writer. As result we must be able to handle both RT and non RT processing. Still, post-processing (normalization and encoding) should always happen faster than realtime (freewheeling). Since jack does not allow a client to change to freewheeling from within the process-callback, the async-writer disk-thread FileFlushed is used to initiate post-processing.
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2016-07-14refactoring to prepare for real-time exportRobin Gareus
* add a threaded TmpFile Writer * update API calls to that process_export_fw() can be used as process_function The idea is to re-use export infrastructure from normalization: export to a tmp-file and then encode target formats after that.
2016-07-10towards export latency compensationRobin Gareus
2016-02-29configurable export prerollRobin Gareus
2016-02-29pre-process (silence) before export to flush reverb tails etc.Robin Gareus
2016-02-09Fix crash when aborting export.Robin Gareus
The "Stop" button results in ExportHandlerPtr being destroyed. This must not happen while it's in use -- in particular during ExportHandler::start_timespan() and ExportHandler::finish_timespan()
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2014-10-10subtle changes to accomplish two goals (1) playhead should stop where the ↵Paul Davis
user pressed stopped (2) captured regions should end where the playhead ends
2013-09-05move MidiPortManager from AudioEngine to SessionPaul Davis
This makes the responsibilities and ownership of non-Route related MIDI ports more clear, and removes a few wierd bits of code. It also ensures that open/close/open on the same session will retain connections for those MIDI ports
2013-08-07major redesign of MIDI port heirarchy and management (part 2)Paul Davis
2013-08-01full compilation and linking (coding not finished, will not run)Paul Davis
2013-07-25most of libardour now actually compilesPaul Davis
2013-02-04Fix problem with multiple timespan export. Most probably originated in r13305.Sakari Bergen
git-svn-id: svn://localhost/ardour2/branches/3.0@14048 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-06various fixes for exporting, including correct handling of errors during ↵Paul Davis
export which previously would hang when using jack1 because jack_set_freewheel() was called from inside a process() callback; use shared_ptr<Route> in parts of export code that weren't using them before; fix up generation of export filenames so that Glib::build_filename() is used and non-existent folders are ignored git-svn-id: svn://localhost/ardour2/branches/3.0@13610 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-17patch from robin to fix where the transport start occurs when exporting (#4098)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@13305 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-25convert from Glib:: to Glib::Threads for all thread-related APIPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-08No-op; some comments, remove some unused stuff, minor tidying up.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@12616 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24Remove over 500 unnecessary includes (including 54 of session.h).David Robillard
It's slightly possible that this causes trivial build failures on different configurations, but otherwise shouldn't cause any problems (i.e. no actual changes other than include/naming/namespace stuff). I deliberately avoided removing libardour-config.h since this can mysteriously break things, though a few of those do seem to be unnecessary. This commit only targets includes of ardour/*.h. There is also a very large number of unnecessary includes of stuff in gtk2_ardour; tackling that should also give a big improvement in build time when things are modified. git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-02-06attempt to stop sending MMC/MTC while exporting or freewheeling for any reasonPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11457 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-18restore ability to create TOC and CUE files during export. this is an option ↵Paul Davis
in a given export format, not a per-export choice. so you need export formats with them set (or not) in order to utilize this choice. the resulting CUE/TOC files have not been checked with a burner (e.g. cdrdao) and testing of them would be appreciated - i (paul) have no CD burner h/w git-svn-id: svn://localhost/ardour2/branches/3.0@11266 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-26Wait for the butler to be quiescent before startingCarl Hetherington
export of each range, rather than just the first one. Prevents clashes with both the butler and the export code doing track refills at the same time (may fix #4283). git-svn-id: svn://localhost/ardour2/branches/3.0@10307 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01Fix broken whitespace. I'd apologize for the compile times if it was my ↵David Robillard
fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03Remove all use of nframes_t.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-28Tweak transmission of MMC on locate. Should fix #3121.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7314 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-02Fix crash on export.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7038 d708f5d6-7413-0410-9779-e7cbd77b26cf