diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-12 22:04:21 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-12 22:04:21 +0000 |
commit | eaaca760c9e2e259f87801bce59442f5cf9d2210 (patch) | |
tree | 9a0295da4bc5bbb7d3370fb0ff5b98877541a642 /libs | |
parent | 5eeecf82a0432c1ed951886539a7331c71c15af9 (diff) |
tweaks to be ready for more information timecode display in Timecode clock mode
git-svn-id: svn://localhost/ardour2/branches/3.0@13264 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/session.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/slave.h | 9 | ||||
-rw-r--r-- | libs/ardour/ltc_slave.cc | 6 | ||||
-rw-r--r-- | libs/ardour/mtc_slave.cc | 6 | ||||
-rw-r--r-- | libs/ardour/session_process.cc | 1 | ||||
-rw-r--r-- | libs/ardour/session_transport.cc | 3 |
6 files changed, 26 insertions, 0 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 499c431c8b..5e1245294b 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -800,6 +800,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi }; SlaveState slave_state() const { return _slave_state; } + Slave* slave() const { return _slave; } boost::shared_ptr<SessionPlaylists> playlists; diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h index 24fd79c943..48da695417 100644 --- a/libs/ardour/ardour/slave.h +++ b/libs/ardour/ardour/slave.h @@ -230,6 +230,13 @@ class TimecodeSlave : public Slave { TimecodeSlave () {} virtual Timecode::TimecodeFormat apparent_timecode_format() const = 0; + + /* this is intended to be used by a UI and polled from a timeout. it should + return a string describing the current position of the TC source. it + should NOT do any computation, but should use a cached value + of the TC source position. + */ + virtual std::string approximate_current_position() const = 0; }; class MTC_Slave : public TimecodeSlave { @@ -250,6 +257,7 @@ class MTC_Slave : public TimecodeSlave { bool give_slave_full_control_over_transport_speed() const; Timecode::TimecodeFormat apparent_timecode_format() const; + std::string approximate_current_position() const; private: Session& session; @@ -325,6 +333,7 @@ public: bool give_slave_full_control_over_transport_speed() const; Timecode::TimecodeFormat apparent_timecode_format() const; + std::string approximate_current_position() const; private: int parse_ltc(const jack_nframes_t, const jack_default_audio_sample_t * const, const framecnt_t); diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index 14cb3ae59d..01dd3cdfae 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -253,3 +253,9 @@ LTC_Slave::apparent_timecode_format () const /* XXX to be computed, determined from incoming stream */ return timecode_25; } + +std::string +LTC_Slave::approximate_current_position() const +{ + return "88:88:88:88"; +} diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 1c2770ed45..c568cd5d6a 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -626,3 +626,9 @@ MTC_Slave::apparent_timecode_format () const { return mtc_timecode; } + +std::string +MTC_Slave::approximate_current_position() const +{ + return "88:88:88:88"; +} diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 0cba1e807c..273a40366d 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -1119,6 +1119,7 @@ Session::process_event (SessionEvent* ev) break; case SessionEvent::SetSyncSource: + DEBUG_TRACE (DEBUG::Slave, "seen request for new slave\n"); use_sync_source (ev->slave); break; diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index d4a0a010c9..6141716301 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -99,6 +99,7 @@ Session::request_sync_source (Slave* new_slave) _was_seamless = seamless; ev->slave = new_slave; + DEBUG_TRACE (DEBUG::Slave, "sent request for new slave\n"); queue_event (ev); } @@ -1323,6 +1324,8 @@ Session::use_sync_source (Slave* new_slave) delete _slave; _slave = new_slave; + DEBUG_TRACE (DEBUG::Slave, string_compose ("set new slave to %1\n", _slave)); + send_full_time_code (_transport_frame); boost::shared_ptr<RouteList> rl = routes.reader(); |