diff options
author | Robin Gareus <robin@gareus.org> | 2012-11-07 23:02:11 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-11-07 23:02:11 +0000 |
commit | 8c9c0836a31058f4854071d8a521077293fe091c (patch) | |
tree | 9feaed058392be03772b69826dc34d0ece1a9de3 /libs | |
parent | 0e0c15833eb1c2f06cc5e45aaeed37adae288287 (diff) |
experimental option to support LTC 29.97000 fps generators.
also change 29.97ndf frame-rate to 30000/1001.
git-svn-id: svn://localhost/ardour2/branches/3.0@13395 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/rc_configuration_vars.h | 1 | ||||
-rw-r--r-- | libs/ardour/ltc_slave.cc | 9 | ||||
-rw-r--r-- | libs/timecode/src/time.cc | 26 | ||||
-rw-r--r-- | libs/timecode/timecode/time.h | 2 |
4 files changed, 37 insertions, 1 deletions
diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index ea44c60682..f046ec428e 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -50,6 +50,7 @@ CONFIG_VARIABLE (bool, first_midi_bank_is_zero, "diplay-first-midi-bank-as-zero" CONFIG_VARIABLE (int, mtc_qf_speed_tolerance, "mtc-qf-speed-tolerance", 5) CONFIG_VARIABLE (bool, timecode_sync_frame_rate, "timecode-sync-frame-rate", true) CONFIG_VARIABLE (bool, timecode_source_is_synced, "timecode-source-is-synced", true) +CONFIG_VARIABLE (bool, timecode_source_2997, "timecode-source-2997", false) CONFIG_VARIABLE (SyncSource, sync_source, "sync-source", JACK) CONFIG_VARIABLE (std::string, ltc_source_port, "ltc-source-port", "system:capture_1") CONFIG_VARIABLE (bool, send_ltc, "send-ltc", false) diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index fb16c5e79a..28c6331628 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -231,6 +231,15 @@ LTC_Slave::detect_ltc_fps(int frameno, bool df) /* poll and check session TC */ TimecodeFormat tc_format = apparent_timecode_format(); TimecodeFormat cur_timecode = session.config.get_timecode_format(); + + if (Config->get_timecode_source_2997() && tc_format == Timecode::timecode_2997drop) { + tc_format = Timecode::timecode_2997000drop; + } + else + if (Config->get_timecode_source_2997() && tc_format == Timecode::timecode_2997) { + tc_format = Timecode::timecode_2997000; + } + if (Config->get_timecode_sync_frame_rate()) { /* enforce time-code */ if (!did_reset_tc_format) { diff --git a/libs/timecode/src/time.cc b/libs/timecode/src/time.cc index 5a4da10691..b848db79b3 100644 --- a/libs/timecode/src/time.cc +++ b/libs/timecode/src/time.cc @@ -445,13 +445,21 @@ timecode_to_frames_per_second(TimecodeFormat t) break; case timecode_2997: - return 29.97; + return (30000.0/1001.0); //29.97; break; case timecode_2997drop: return (30000.0/1001.0); //29.97; break; + case timecode_2997000: + return 29.97; + + break; + case timecode_2997000drop: + return 29.97; + + break; case timecode_30: return 30; @@ -503,6 +511,14 @@ timecode_has_drop_frames(TimecodeFormat t) return true; break; + case timecode_2997000: + return false; + + break; + case timecode_2997000drop: + return true; + + break; case timecode_30: return false; @@ -555,6 +571,14 @@ timecode_format_name (TimecodeFormat const t) return "29.97 drop"; break; + case timecode_2997000: + return "29.97000"; + + break; + case timecode_2997000drop: + return "29.97000 drop"; + + break; case timecode_30: return "30"; diff --git a/libs/timecode/timecode/time.h b/libs/timecode/timecode/time.h index 8166ba8f39..256d8feaaf 100644 --- a/libs/timecode/timecode/time.h +++ b/libs/timecode/timecode/time.h @@ -39,6 +39,8 @@ enum TimecodeFormat { timecode_25, timecode_2997, timecode_2997drop, + timecode_2997000, + timecode_2997000drop, timecode_30, timecode_30drop, timecode_5994, |