add methods to queue full MTC and SPP messages, now that they are synchronous
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 8 Aug 2013 23:31:10 +0000 (19:31 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 8 Aug 2013 23:31:10 +0000 (19:31 -0400)
gtk2_ardour/editor_drag.cc
libs/ardour/ardour/session.h

index 3389164f500e2238c27ae65cd750e1f32e40636a..9c65892ebde46cdb2c140c194149756a712d3910 100644 (file)
@@ -2371,10 +2371,14 @@ CursorDrag::fake_locate (framepos_t t)
        Session* s = _editor->session ();
        if (s->timecode_transmission_suspended ()) {
                framepos_t const f = _editor->playhead_cursor->current_frame;
+               /* This is asynchronous so it will be sent "now"
+                */
                s->send_mmc_locate (f);
-               // XXX need to queue full time code and SPP messages somehow
-               // s->send_full_time_code (f);
-               // s->send_song_position_pointer (f);
+               /* These are synchronous and will be sent during the next
+                  process cycle
+               */
+               s->queue_full_time_code ();
+               s->queue_song_position_pointer ();
        }
 
        show_verbose_cursor_time (t);
index a47c13046d3718fecf3e4f1109e10ee6cdaa79ce..c2912208748aeb69f3a41206578d4da9171260dd 100644 (file)
@@ -813,8 +813,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        boost::shared_ptr<SessionPlaylists> playlists;
 
        void send_mmc_locate (framepos_t);
-        int send_full_time_code (framepos_t, pframes_t nframes);
-       void send_song_position_pointer (framepos_t);
+        void queue_full_time_code () { _send_timecode_update = true; }
+        void queue_song_position_pointer () { /* currently does nothing */ }
 
        bool step_editing() const { return (_step_editors > 0); }
 
@@ -1261,6 +1261,13 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void engine_halted ();
        void xrun_recovery ();
 
+    /* These are synchronous and so can only be called from within the process
+     * cycle
+     */
+
+    int  send_full_time_code (framepos_t, pframes_t nframes);
+    void send_song_position_pointer (framepos_t);
+
        TempoMap    *_tempo_map;
        void          tempo_map_changed (const PBD::PropertyChange&);