summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/slave.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-10-12 21:28:08 +0000
committerRobin Gareus <robin@gareus.org>2012-10-12 21:28:08 +0000
commit5eeecf82a0432c1ed951886539a7331c71c15af9 (patch)
treec55bcb8c2ed8deb6c14118931dd891a6a43bf01a /libs/ardour/ardour/slave.h
parent6de548bd7f7e04075eb7a26d4ea0ad04ff71b589 (diff)
LTC slave - basic working version (hardcoded 25fps)
git-svn-id: svn://localhost/ardour2/branches/3.0@13263 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/slave.h')
-rw-r--r--libs/ardour/ardour/slave.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h
index fa75ba17bb..24fd79c943 100644
--- a/libs/ardour/ardour/slave.h
+++ b/libs/ardour/ardour/slave.h
@@ -310,7 +310,7 @@ class MTC_Slave : public TimecodeSlave {
#ifdef HAVE_LTC
class LTC_Slave : public TimecodeSlave {
- public:
+public:
LTC_Slave (Session&);
~LTC_Slave ();
@@ -327,19 +327,27 @@ class LTC_Slave : public TimecodeSlave {
Timecode::TimecodeFormat apparent_timecode_format() const;
private:
- int parse_ltc(const jack_nframes_t nframes, const jack_default_audio_sample_t * const in, const framecnt_t posinfo);
- void process_ltc();
+ int parse_ltc(const jack_nframes_t, const jack_default_audio_sample_t * const, const framecnt_t);
+ bool process_ltc(framepos_t, framecnt_t);
+ void init_ltc_dll(framepos_t, double);
Session& session;
bool did_reset_tc_format;
Timecode::TimecodeFormat saved_tc_format;
- LTCDecoder *decoder;
- framecnt_t current_frames_per_ltc_frame;
- framecnt_t monotonic_fcnt;
+ LTCDecoder *decoder;
+ double frames_per_ltc_frame;
+ framecnt_t last_timestamp;
+ framecnt_t last_ltc_frame;
framepos_t ltc_transport_pos;
double ltc_speed;
+
+ /* DLL - chase MTC */
+ double t0; ///< time at the beginning of the MTC quater frame
+ double t1; ///< calculated end of the MTC quater frame
+ double e2; ///< second order loop error
+ double b, c, omega; ///< DLL filter coefficients
};
#endif