summaryrefslogtreecommitdiff
path: root/libs/ardour/audioengine.cc
AgeCommit message (Collapse)Author
2020-05-07Send LTC timecode from engine contextRobin Gareus
2020-04-16Tweak engine startup, shorten initial silence timeoutRobin Gareus
see also 23baeee8293
2020-04-07fix 2 additional "resets" of shared_ptr<PortPtr>Paul Davis
2020-04-07fix 2 additional "resets" of shared_ptr<PortPtr>Paul Davis
2020-04-07use shared_ptr to manage backend port lifetimes (Pulse,ALSA,Dummy,JACK)Paul Davis
JACK is not yet finished. Changes also include minor reformatting and a spelling correction (latecies to latencies)
2020-03-30Tweak engine startup, initial silenceRobin Gareus
This can help when running with very low latency and the initial process callback is [indirectly] expensive. E.g. load a heavy session the a RPi4, initial setup can pull in a lot of data, which blocks the bus. In particular with the ALSA backend this can lead to poll timeout which effectively stops the backend.
2020-03-29Set thread-names (libs)Robin Gareus
2020-03-29Engine: Silence outputs for 1/2 second when loading a sessionRobin Gareus
This allows for caches to warm up, background worker threads to spin up and things settle down. This also prevents initial audible artifacts of live input. In almost all cases this completes before the GUI is brought up.
2020-03-27variable rename and commentPaul Davis
2020-03-22fix typo that passed wrong value as 2nd parameter to ↵Paul Davis
Session::plan_master_strategy()
2020-03-20redesign chasing the transport masterPaul Davis
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-01-27Add new requirements from AudioEngine::stop to ::drop_backendRobin Gareus
This fixes an issue that after changing backends (::set_backend), the session-transport was in inconsistent state. If it was rolling, it continued to roll with "stop" being unavailable.
2020-01-24Engine: debug-print alignmentRobin Gareus
2019-12-04Clear AudioEngine Error at app startRobin Gareus
2019-11-21Fix buffer-overflow when vari-speedingRobin Gareus
Session::process() can call split-cycle which offset the buffer pointers. When vari-speeding at speed > 1.0, the engine also splits the cycle every n_samples, to not exceed the configured buffersize. This needs to take prior buffer offsets into account.
2019-11-04rename method argument to better reflect its intended rolePaul Davis
2019-11-03Correctly flush MIDI buffers on cycle-splitRobin Gareus
2019-10-28add DEBUG_TRACE for all (?) backend callbacksPaul Davis
2019-09-25goodbye USE_TRACKS_CODE_FEATURES and is_tracks_buildPaul Davis
2019-09-20Fix Latency Measurement without device re-startRobin Gareus
This handles a case when the engine was started normally (not for latency measurement), and measurement is performed later. This resulted in a duplicate backend start
2019-09-17resize audio port _data buffer based on current buffer sizePaul Davis
2019-08-23Some hints for clang static analysisRobin Gareus
2019-08-03Update libardour GPL boilerplate and (C) from git logRobin Gareus
2019-07-02Remove unused API -- there is no default backend.Robin Gareus
2019-03-18NO-OP: Use API to set/test state-of-the-stateRobin Gareus
2019-03-18Avoid calling rt-methods from non-rt contextRobin Gareus
Since upcoming state-machine transitions are done in rt-context via ARDOUR::Session::process_event () they should all in rt-context. set_session() is called from the UI thread (and the process-lock wasn't even taken)
2019-03-08on engine (re)start, just mark MIDI port info dirtyPaul Davis
2019-01-27force execution of ARDOUR::init_post_engine() before any handlers of ↵Paul Davis
AudioEngine::Running()
2019-01-25new approach to handling Transport Masters when engine is restartedPaul Davis
Trust that ::reset() works for all transport masters, and call it when engine is stopped. This way the transport masters are ready to be called again as soon as the engine restarts.
2019-01-16(libs) call ARDOUR::init_post_engine() from within libardour rather than ↵Paul Davis
requiring "users" of the library to arrange for it
2018-12-04Use atomic read for an atomic variableRobin Gareus
This probably no real world effect since there is a mutex in the loop that acts as a memory barrier.
2018-11-28Remove ambiguous API implementationRobin Gareus
* PortEngine::available() implementation * AudioEngine::connected() wrapper Eventually we may re-introduce PortEngine::available along with a libardour internal port-engine.
2018-10-17when calling Session::engine_halted() after a user-driven engine stop, make ↵Paul Davis
sure Engine::running() will be false
2018-09-18new transport slave/master implementation, libs/ editionPaul Davis
2018-04-30NO-OP: a ToDo comment for discussionRobin Gareus
2017-10-30Fix fade-out at quit.Robin Gareus
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-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-04-27NO-OP: whitespaceRobin Gareus
2017-04-27Fix flow for measuring latencies of live backendsRobin Gareus
2017-04-27Fix flow for latency measurements that needs an engine stop.Robin Gareus
Make AudioEngine::prepare_for_latency_measurement() idempotent. There are multple calls (when switching to the measurement page and every time a measurement is preformed). Also the Stopped() signal is important for the Dialog state regardless if the engine was stopped for latency or not.
2016-12-03Fix warningsDavid Robillard
2016-11-26Add [hidden] option to list "Dummy" backend with optmized bundlesRobin Gareus
2016-10-20infrastructure for save/restore of MIDI port user-provided informationPaul Davis
2016-10-19NOOP: whitespacing tweakPaul Davis
2016-10-17convert cerr<< to DEBUG_TRACEPaul Davis
2016-10-13new scheme for managing port deletionPaul Davis
shared_ptr<Port> now uses a deleter functor which pushes Port* to a lock-free FIFO so that the Port is always deleted (and thus unregistered with the PortEngine/backend) in a safe context w.r.t. various callbacks in the host. Currently the auto_connect_thread in Session has been tasked with doing these deletions.
2016-10-11Hide Dummy backend from optimized release buildsRobin Gareus
Prepare to bundle session-utils with releases. Session-utils use libardour which needs an Engine. "Dummy" is the only engine that always works
2016-09-13Fixes 7004 - Ardour crash on Just Quit when AudioEngine is stopped. ↵Nathan Stewart
AudioEngine::stop() if running() is not true and _backend->stop() is true, mutex was being unlocked without being locked.