summaryrefslogtreecommitdiff
path: root/libs/ardour/session_time.cc
AgeCommit message (Collapse)Author
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-06-10Make Session::backend_sync_callback() emit Session::LocatedJohannes Mueller
If we sync to jackd AudioEngine::transport_frame() is not yet updated when Session emits Located. Then the playhead ends up in an obsolete position. Therefore we emit Session::Located() also from within Session::backend_sync_callback() as that is called when AudioEngine is done with the relocation.
2016-12-08Clarify "frames" (video, timecode) vs "samples" (audio)Robin Gareus
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2016-05-27Tempo ramps - rename bbt_time() -> bbt_at_frame(), frame_time() -> ↵nick_m
frame_at_bbt()
2016-04-18never ever change sample-rate saved with the session after creation.Robin Gareus
2013-11-05fix incorrect use of sizeof() in snprintf (function never actually used in ↵Paul Davis
ardour,but ... )
2013-09-19switch from JACK_Slave to Engine_SlavePaul Davis
2013-08-09split up session code that uses parts of the JACK API (timebase + session ↵Paul Davis
event handling) and connect it directly to the jack audiobackend i've made the audiobackend call the session directly so that only one object (ARDOUR::Session) has a need for the JACK types and only one .cc file (session_jack.cc) needs jack.h. having ARDOUR::AudioEngine act as an intermediary would be cleaner conceptually but would end up causing two different ARDOUR objects to have jack types in their own API.
2013-07-30jack_audiobackend.cc finally compilesPaul Davis
2013-02-01Remove debug print about transport sync.David Robillard
This situation occurs continuously when acting as Jack transport master, but everything seems to work as expected, so we'll just assume it's fine until proven otherwise. git-svn-id: svn://localhost/ardour2/branches/3.0@14043 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-14merge robin gareus' libltc into ardour source tree for conveniencePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@13665 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-13complete r13404 - use double for timecode fps.Robin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13471 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-13move sample/timecode conversion to libtimecode.Robin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13266 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-12MTC: map between timecodesRobin Gareus
allow external timecode device to supply timecode with framerates other than ardour session's framerate. also fix latency overcompensation. The slave is supposed to provide transport time - and not audible frame time. git-svn-id: svn://localhost/ardour2/branches/3.0@13250 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-12move TimecodeFormat to libtimecodeRobin Gareus
provide a way to convert any TimecodeFormat to float frame-rate, not only the currently active timecode_foramt. git-svn-id: svn://localhost/ardour2/branches/3.0@13249 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-01-06remove messages when tempo map is not available in RT contextPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11175 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-06partially revert some of the recent work on tempo to reflect new ↵Paul Davis
understanding of the problem. behaviour is now believed to be totally correct but awaiting a bit more testing git-svn-id: svn://localhost/ardour2/branches/3.0@11171 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-05remove un-needed TempoMap::frame_time_rt()Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11165 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-05possibly fix deadlocking issues with tempo map by rearranging code and ↵Paul Davis
adding RT variants for a couple of functions that would normally try to rebuild the map when necessary; instead the variants throw an exception and the RT code that called them tries to do something reasonable git-svn-id: svn://localhost/ardour2/branches/3.0@11164 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-02intermediate commit as all tempo/meter stuff starts to walk the precompute ↵Paul Davis
Bars|Beats list. Still have ::round_to_beat_subdivision() to fix. haven't really done any thorough testing at this point, but basic stuff seems OK git-svn-id: svn://localhost/ardour2/branches/3.0@11131 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-19rename Timecode::BBT_Time::ticks_per_beat to ↵Paul Davis
Timecode::BBT_Time::ticks_per_bar_division which is a more accurate and informative name. The number doesn't describe the smallest division of a "beat" (which is only defined contextually anyway), but rather the smallest division of the the divisions of a bar. If using a meter of 4/8, there are 4 divisions per bar, and we can divide each one into ticks_per_bar_division pieces; in a separate meter (section) of 3/8, there are 3 divisions per bar, each of which can be divided into ticks_per_bar_division_pieces. git-svn-id: svn://localhost/ardour2/branches/3.0@11022 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-13more fun and games with meter and the tempo map: rename ↵Paul Davis
Meter::beats_per_bar() to Meter::divisions_per_bar() so that its clear(er) on what it is actually returning; use Meter::divisions_per_bar() in more (all?) places that need it; fix up dragging meter marks by removing the relevant meter section from the map while we drag; operator<< for some tempo-related objects git-svn-id: svn://localhost/ardour2/branches/3.0@10995 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-30change Session::convert_to_frames_at() to Session::convert_to_frames() to ↵Paul Davis
reflect the fact that its argument is a position, not a duration; add Session::any_duration_to_frames(), which converts AnyTime representing a duration to frames; alter callers to use the right one of the two previously mentioned methods git-svn-id: svn://localhost/ardour2/branches/3.0@8386 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-14move ticks per beat from Meter to Timecode::BBT_Time, add new constructor ↵Paul Davis
for BBT_Time based on a double value; reduce BeatFramesConverted to 1 liners pending likely removal git-svn-id: svn://localhost/ardour2/branches/3.0@8277 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-14Rename libmusictime libtimecode (consistent with already used namespace ↵David Robillard
"Timecode"). Move BBT_Time to libtimecode. git-svn-id: svn://localhost/ardour2/branches/3.0@8271 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-12-01Re-expose timecode offset in the session option editor.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8146 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-01Revert previous incorrect patch.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8144 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-01Remove unused timecode offset stuff.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8143 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-11-04Add column headings and length field to export timespan selector. Fixes #3518.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7968 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17megaopus commit: (1) add __STD_(LIMIT|FORMAT)_MACROS to command line flags ↵Paul Davis
for cc and c++ builds, remove them from source (2) add new Property::midi_data used by MidiRegion to signal that its (MIDI) contents have changed (3) massive switch from nframes_t to framepos_t/framecnt_t including removal of ARDOUR::max_frames (replaced by ARDOUR::max_frame{pos,cnt} (lots more to do but this set was driven by changes to the Diskstream API to use framepos_t git-svn-id: svn://localhost/ardour2/branches/3.0@7791 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-31don't set jack transport position frame (violates JACK API); clean up other ↵Paul Davis
related code git-svn-id: svn://localhost/ardour2/branches/3.0@7723 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-22remove a bunch of uses of long (mostly replaced by int32_t)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7472 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-01more changes to try to improve MTC handling even in slightly pathological casesPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6245 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-11-08monster commit: transport mgmt changes from 2.X (omnibus edition); make ↵Paul Davis
slave use nframes64_t ; avoid crashes in Drags when commiting reversible transactions that do not exist git-svn-id: svn://localhost/ardour2/branches/3.0@6034 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-27new SnapBBT debug option, split out BBT_time and start work on BBT ↵Paul Davis
arithmetic framework. this will cause a full recompile, so find something else to do git-svn-id: svn://localhost/ardour2/branches/3.0@5936 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-26change the use of "SMPTE" to "Timecode" to reflect the global economy and ↵Paul Davis
the end of american dominance on the world audio production stage git-svn-id: svn://localhost/ardour2/branches/3.0@5924 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14Strip trailing whitespace and fix other whitespace errors (e.g. space/tab ↵David Robillard
mixing). Whitespace changes only. Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-07-21Fix some unused parameter warnings.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5403 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-07-13merge pre- and post-fader processor boxes; start removing Placement (not ↵Paul Davis
finished) ; add -DWAF_BUILD and use per-directory foobar-config.h to correctly pick up configure-time settings like HAVE_OGG ; check for libgiomm (part of upgrade to newer gtk stack); 32 bit marker reload fix from 2.X; audiounit IO config cache fix from 2.X; multi-add route template fix from 2.X; plugin GUI delete fix from 2.X; solo button labels are A or P for listen mode git-svn-id: svn://localhost/ardour2/branches/3.0@5344 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-16Remove preferences menu options that have been moved into one or other ↵Carl Hetherington
preferences dialog. git-svn-id: svn://localhost/ardour2/branches/3.0@5085 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-16Move some sync-related options to being session variables.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5083 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-14First stage of options rework.Carl Hetherington
- Split Configuration into RCConfiguration and SessionConfiguration; the first for options which are saved to .rc files and the second for options which are saved in a session file. - Move some options from the old `master' Configuration object into SessionConfiguration; this needs more refinement. - Reflect many RCConfiguration options in an expanded Edit->Preferences dialog; my intention is to remove the corresponding menu items eventually. git-svn-id: svn://localhost/ardour2/branches/3.0@5075 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-12Remove most using declarations from header files.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25*** NEW CODING POLICY ***David Robillard
All #include statements that include a header that is a part of a library bundled with ardour MUST use quotes, not angle brackets. Do this: #include "ardour/types.h" NOT this: #include <ardour/types.h> Rationale: This is best practice in general, to ensure we include the local version and not the system version. That quotes mean "local" (in some sense) and angle brackets mean "system" (in some sense) is a ubiquitous convention and IIRC right in the C spec somewhere. More pragmatically, this is required by (my) waf (stuff) for dependencies to work correctly. That is: !!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!! Failure to comply is punishable by death by torture. :) P.S. It's not that dramatic in all cases, but this (in combination with some GCC flags specific to the include type) is the best way I have found to be absolutely 100% positive the local ones are being used (and we definitely want to be absolutely 100% positive on that one). git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-17merge Sakari's (sbergen) branch back into 3.0, removing libsndfile and ↵Paul Davis
adding taglib git-svn-id: svn://localhost/ardour2/branches/3.0@3736 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02rollback to 3428, before the mysterious removal of libs/* at 3431/3432Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf