LTC Slave cleanup
authorRobin Gareus <robin@gareus.org>
Sun, 21 Oct 2012 14:07:07 +0000 (14:07 +0000)
committerRobin Gareus <robin@gareus.org>
Sun, 21 Oct 2012 14:07:07 +0000 (14:07 +0000)
initialize audioengine's ltc_port - if HAVE_LTC is not set
trying to connect it would segfault.

LTC frameno is < 40 by (two bit frame-ten's)

git-svn-id: svn://localhost/ardour2/branches/3.0@13314 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/slave.h
libs/ardour/audioengine.cc
libs/ardour/ltc_slave.cc

index 07e3fd0e1def7b46e40a4256f35a595eb0e38bce..d63004ef078947d9b234903e69749e7016bd7ab8 100644 (file)
@@ -341,7 +341,7 @@ public:
 
        framecnt_t resolution () const;
        bool requires_seekahead () const { return false; }
-       framecnt_t seekahead_distance() const;
+       framecnt_t seekahead_distance () const { return 0; }
        bool give_slave_full_control_over_transport_speed() const { return true; }
 
        Timecode::TimecodeFormat apparent_timecode_format() const;
index 338bc2fd0e00b687cba600b8bbc064fc7f9af081..cc04c343e1de7672fe83102601133a796196f23b 100644 (file)
@@ -78,6 +78,7 @@ AudioEngine::AudioEngine (string client_name, string session_uuid)
        , port_remove_in_progress (false)
        , m_meter_thread (0)
        , _main_thread (0)
+       , _ltc_input ()
        , ports (new Ports)
 {
        _instance = this; /* singleton */
index 39a97677a63f033319cac91e6038512d3c345918..9153facb8c151fe293663bfa5dc3ed6cd9febe81 100644 (file)
@@ -76,12 +76,6 @@ LTC_Slave::resolution () const
        return (framecnt_t) (frames_per_ltc_frame);
 }
 
-ARDOUR::framecnt_t
-LTC_Slave::seekahead_distance () const
-{
-       return 0;
-}
-
 bool
 LTC_Slave::locked () const
 {
@@ -135,7 +129,7 @@ LTC_Slave::detect_ltc_fps(int frameno, bool df)
        }
        ltc_detect_fps_cnt++;
 
-       if (ltc_detect_fps_cnt > 60)
+       if (ltc_detect_fps_cnt > 40)
        {
                if (ltc_detect_fps_cnt > ltc_detect_fps_max
                    && (   ceil(timecode.rate) != (ltc_detect_fps_max + 1)