summaryrefslogtreecommitdiff
path: root/libs/ardour/session_ltc.cc
AgeCommit message (Collapse)Author
2020-05-09Update LTC reader port latency on connection changeRobin Gareus
This mechanism adds infrastructure that can later also be used for MTC and MIDIClock. PS. The LTC Generator port's latency is queried after the port is created, and later kept in sync via LatencyUpdated signal.
2020-05-09LTC Generator: prefer LatencyUpdated signalRobin Gareus
2020-05-08Fix LTC generator alignmentRobin Gareus
When rolling forward the LTC generator needs to send future a timestamp, so that when it matches the current time when the signal arrives at the output port. (A6 aligns transport playhead to output)
2020-05-07Send LTC timecode from engine contextRobin Gareus
2019-08-03Update libardour GPL boilerplate and (C) from git logRobin Gareus
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.
2018-10-05move away from "sync source" conceptsPaul Davis
2018-09-18new transport slave/master implementation, libs/ editionPaul Davis
2017-09-29Update Timecode Generator/Slave alignmentRobin Gareus
2017-09-24convert codebase to use Temporal for various time typesPaul Davis
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-08-07Revert "Work around a Windows crash (for now)"Robin Gareus
This reverts commit 4f2dc77f6f6b5b0de07304e8a4981ff1298ef090.
2017-08-07Work around a Windows crash (for now)Robin Gareus
The root-cause is likely PortAudio backend specific async port-registration, re-establish ports after session creation and after the first callback and it's apparently a race-condition: crash is not 100% reproducible. #10 0x00007ffb156df18a in msvcrt!abort () from C:\Windows\System32\msvcrt.dll #11 0x0000000012597832 in _wassert (_Message=_Message@entry=0x2eaf96f0 L"_port_handle", _File=0x2 <error: Cannot access memory at address 0x2>, _File@entry=0x346a1430 L"../libs/ardour/audio_port.cc", _Line=80) at ../../mingw-w64-crt/misc/wassert.c:54 #12 0x00000000125978e8 in _assert (_Message=0x1282f7e9 "_port_handle", _File=0x1282f7a0 "../libs/ardour/audio_port.cc", _Line=80) at ../../mingw-w64-crt/misc/wassert.c:30 #13 0x00000000120d1a51 in ARDOUR::AudioPort::get_audio_buffer (this=0x34a95a70, nframes=256) at ../libs/ardour/audio_port.cc:80 #14 0x00000000126724f9 in ARDOUR::AudioPort::get_buffer (this=<optimized out>, nframes=<optimized out>) at ../libs/ardour/ardour/audio_port.h:43 #15 0x0000000012435421 in ARDOUR::Session::ltc_tx_send_time_code_for_cycle (this=this@entry=0x37666310, start_frame=0, end_frame=end_frame@entry=256, target_speed=0, current_speed=0, nframes=nframes@entry=256) at ../libs/ardour/session_ltc.cc:180 #16 0x000000001245209f in ARDOUR::Session::no_roll (this=this@entry=0x37666310, nframes=256) at ../libs/ardour/session_process.cc:145 #17 0x0000000012453051 in ARDOUR::Session::fail_roll (this=this@entry=0x37666310, nframes=<optimized out>) at ../libs/ardour/session_process.cc:128 #18 0x0000000012459ebd in ARDOUR::Session::process_without_events (this=this@entry=0x37666310, nframes=nframes@entry=256) at ../libs/ardour/session_process.cc:897 #19 0x000000001245a462 in ARDOUR::Session::process_with_events (this=0x37666310, nframes=256) at ../libs/ardour/session_process.cc:425 #20 0x0000000012451bc5 in ARDOUR::Session::process (this=0x37666310, nframes=nframes@entry=256) at ../libs/ardour/session_process.cc:78 #21 0x00000000120e79fd in ARDOUR::AudioEngine::process_callback (this=0x23316e30, nframes=256) at ../libs/ardour/audioengine.cc:376 #22 0x00000000285390fe in ARDOUR::PortAudioBackend::blocking_process_main (this=this@entry=0x29e67750, interleaved_input_data=interleaved_input_data@entry=0x115e8790, interleaved_output_data=interleaved_output_data@entry=0x115e0050) at ../libs/backends/portaudio/portaudio_backend.cc:1962 #23 0x0000000028539b75 in ARDOUR::PortAudioBackend::process_callback (this=this@entry=0x29e67750, input=0x115e8790, output=0x115e0050, frame_count=<optimized out>, timeInfo=0x3d17fd70, statusFlags=statusFlags@entry=0) at ../libs/backends/portaudio/portaudio_backend.cc:775 #24 0x0000000028539c16 in ARDOUR::PortAudioBackend::portaudio_callback (input=<optimized out>, output=<optimized out>, frame_count=<optimized out>, time_info=<optimized out>, status_flags=0, user_data=0x29e67750) at ../libs/backends/portaudio/portaudio_backend.cc:721 #25 0x00000000632c528f in NonAdaptingProcess () from C:\Program Files\Mixbus32C-4\bin\libportaudio-2.dll #26 0x00000000632c73b2 in PaUtil_EndBufferProcessing () from C:\Program Files\Mixbus32C-4\bin\libportaudio-2.dll #27 0x00000000632d129c in ProcessingThreadProc () from C:\Program Files\Mixbus32C-4\bin\libportaudio-2.dll
2017-08-03Some more assert() debuggingRobin Gareus
2017-08-01Fix some more crashes at session-closeRobin Gareus
PortDrop unregisters backend ports, the backend will return a NULL buffer-pointer, but the I/O object still exists (Metronome, LTC) AudioBuffer::_data == 0 #0 msvcrt!memset () from C:\Windows\System32\msvcrt.dll #1 ARDOUR::AudioBuffer::silence (this=0x2c410710, len=256, offset=0) at ../libs/ardour/audio_buffer.cc:88 #2 ARDOUR::AudioPort::cycle_end (this=0x34918730, nframes=256) at ../libs/ardour/audio_port.cc:66 #3 ARDOUR::PortManager::cycle_end (this=this@entry=0x23342770, nframes=nframes@entry=256) [process callback w/o session]
2017-08-01Fix LTC encoder removalRobin Gareus
Fixed a crash if an x-run or graph-reorder happens after the LTC encoder has been destroyed (possible at session-close or after disabling the encoder). This also fixes duplicate callbacks in case the encoder was re-enabled times in an active session.
2016-12-08Clarify "frames" (video, timecode) vs "samples" (audio)Robin Gareus
2016-11-02fix LTC-generator 24h wraparoundRobin Gareus
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2015-01-09fix LTC alignment.Robin Gareus
LTC-slave: offset the parsed LTC-frame instead of changing the frame's timestamp. This fixes an issue with freewheel timeout and delta-calculation. Align transport-time with output to match capture alignment: "with existing material". LTC-generator: follow suit. align clock with master-bus out. This is a semi-permanent workaround. Once [tracks feeding] the master-bus is/are delayed to align to output. The generator needs to use (worst_track_latency not worst_playback_latency)
2014-10-11revert 8ca546e - original version was correct (note added)Robin Gareus
2014-10-11fix LTC generator latency compensation.Robin Gareus
2013-09-12incomplete merge of master into windows (requires upcoming changes to master ↵Paul Davis
to be complete)
2013-08-24fix merge conflicts from masterPaul Davis
2013-08-09Merge branch 'master' into audioenginePaul Davis
2013-08-07fix compiler warningRobin Gareus
2013-08-05fix conflicts after merge with masterPaul Davis
2013-08-04'libs/ardour' - Main body of changes required for building with MSVCJohn Emmas
2013-08-04fix no-roll LTC encoder, honor locates when transport is stoppedRobin Gareus
2013-07-25most of libardour now actually compilesPaul Davis
2013-05-17simplify prev commitRobin Gareus
2013-05-17free buffer then set it to 0jdekozak
2012-11-18fix LTC frame TVstandard offsetRobin Gareus
<pre> Ardour- transport 01:00:00:01 | | 5 5 | NTSC Line 2 2 | 1 4 5 v 1 2 3 4 5 6 7 8 9 0 ____________________ ________________ TV | | | | | | | | |_|_|_|_|_|_| | | | | | | | ^ | v +-+ +-+ + + +-+ +-+ +---+ +---+ | | | | | | | | | | | | | | | | LTC +-+ +-+ +-+ +-+ +---+ +-+ +---+ +---+ SYNC-WORD | LTC B | B LTC 01:00:00:00 I | I 01:00:00:01 T T 7 9 0 </pre> git-svn-id: svn://localhost/ardour2/branches/3.0@13524 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-18fix LTC frame offset for video standardsRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13517 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-17update to libltc-1.1.0Robin Gareus
add support for TV standard specific offset and binary-group-flags git-svn-id: svn://localhost/ardour2/branches/3.0@13514 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-13implement TC offset for slave&generator.Robin Gareus
Many related changes that require atomic update, mostly because ClockOption slots changed: * change offset config format to std:string (backwards compat - reads 0) * make Timecode offset independent from fps * sample_to_timecode() handle negative sample-num * audio-clock fix entry and edit of negative numbers * option editor: - remove old global internal offset - add slave & generator TC entry - still needs UI cleanup, tooltops, maybe sep. tab.. * LTC & MTC slave& generator: - cache offset - subscribe to parameter changes git-svn-id: svn://localhost/ardour2/branches/3.0@13485 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-11add slave and generator Timecode offset (no UI yet)Robin Gareus
So far only LTC slave, LTC generator and MTC slave. MTC generator remains to be done. git-svn-id: svn://localhost/ardour2/branches/3.0@13441 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-09LTC encoder: relax alignment constraint under some circumstances.Robin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13406 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-09LTC encoder: fix signal polarityRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13403 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-09LTC encoder: clear user-bitsRobin Gareus
requires libltc >=1.0.3 git-svn-id: svn://localhost/ardour2/branches/3.0@13401 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-05NOOP - LTC generator replace double(a) with (double)aRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13389 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-05NOOP - LTC generator: bit-alignment add comments and made permanentRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13388 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-05LTC generator: undo pull up/down adjustmentsRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13387 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-05LTC generator: adaptive signal filterRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13386 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-05experimental LTC sub-frame drift compensation for scope testingRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13384 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-05LTC generator: filter the signal to reduce ringing.Robin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13382 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-04LTC generator fix latency compensation.Robin Gareus
thinko: the generated timecode is offset and not the timestamp when to send it. git-svn-id: svn://localhost/ardour2/branches/3.0@13377 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-30LTC slave/gen latency compensation: jack2 got fixed, remove #ifdefRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13368 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-29LTC: break out xrun and latency callbacks.Robin Gareus
prepare to call get_connected_latency_range() only if needed. git-svn-id: svn://localhost/ardour2/branches/3.0@13366 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-28LTC (slave&gen): no reset on graph-changeRobin Gareus
fixes issues with transport stop/start when making connections with jack1 while slaved to LTC git-svn-id: svn://localhost/ardour2/branches/3.0@13356 d708f5d6-7413-0410-9779-e7cbd77b26cf