Merge branch 'windows+cc' into cairocanvas
[ardour.git] / libs / ardour / session_process.cc
index cecbd88f65beb9f802b8b799a200fd4abc25a5e8..6d8c0f9f70323ddd56f92fcc2a41a92e83b8b368 100644 (file)
@@ -40,7 +40,6 @@
 #include "ardour/ticker.h"
 #include "ardour/types.h"
 
-#include "midi++/manager.h"
 #include "midi++/mmc.h"
 
 #include "i18n.h"
@@ -84,8 +83,8 @@ Session::process (pframes_t nframes)
         */
 
        try {
-               if (!_engine.freewheeling() && Config->get_send_midi_clock() && transport_speed() == 1.0f && midi_clock->has_midi_port()) {
-                       midi_clock->tick (transport_at_start);
+               if (!_silent && !_engine.freewheeling() && Config->get_send_midi_clock() && (transport_speed() == 1.0f || transport_speed() == 0.0f) && midi_clock->has_midi_port()) {
+                       midi_clock->tick (transport_at_start, nframes);
                }
        } catch (...) {
                /* don't bother with a message */
@@ -325,7 +324,7 @@ Session::process_with_events (pframes_t nframes)
         * and prepare for rolling)
         */
        if (_send_timecode_update) {
-               send_full_time_code (_transport_frame);
+               send_full_time_code (_transport_frame, nframes);
        }
 
        if (!process_can_proceed()) {
@@ -422,7 +421,9 @@ Session::process_with_events (pframes_t nframes)
                                check_declick_out ();
                        }
 
-                       _engine.split_cycle (this_nframes);
+                       if (nframes > 0) {
+                               _engine.split_cycle (this_nframes);
+                       }
 
                        /* now handle this event and all others scheduled for the same time */