From 89b686f9375decea756e4111a7c1f44192e00f0b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 28 Jun 2010 17:25:40 +0000 Subject: [PATCH] Tweak transmission of MMC on locate. Should fix #3121. git-svn-id: svn://localhost/ardour2/branches/3.0@7314 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/session.h | 2 +- libs/ardour/session_export.cc | 2 +- libs/ardour/session_process.cc | 1 - libs/ardour/session_transport.cc | 7 ++++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 8109dc08b9..c9ef5fc774 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1168,7 +1168,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi void overwrite_some_buffers (Track *); void flush_all_inserts (); int micro_locate (nframes_t distance); - void locate (nframes64_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false); + void locate (nframes64_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false, bool with_mmc=true); void start_locate (nframes64_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false); void force_locate (nframes64_t frame, bool with_roll = false); void set_track_speed (Track *, double speed); diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index f696c6b293..75c8fd0dd7 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -224,6 +224,6 @@ Session::finalize_audio_export () if (post_export_sync) { config.set_external_sync (true); } else { - locate (post_export_position, false, false, false); + locate (post_export_position, false, false, false, false, false); } } diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 79b1953ea8..ba5db152cb 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -268,7 +268,6 @@ Session::process_with_events (nframes_t nframes) */ if (_send_timecode_update) { send_full_time_code(nframes); - deliver_mmc (MIDI::MachineControl::cmdLocate, _transport_frame); } if (!process_can_proceed()) { diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index e6ff844404..d03b1ad51d 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -769,8 +769,9 @@ Session::micro_locate (nframes_t distance) return 0; } +/** @param with_mmc true to send a MMC locate command when the locate is done */ void -Session::locate (nframes64_t target_frame, bool with_roll, bool with_flush, bool with_loop, bool force) +Session::locate (nframes64_t target_frame, bool with_roll, bool with_flush, bool with_loop, bool force, bool with_mmc) { if (actively_recording() && !with_loop) { return; @@ -892,6 +893,10 @@ Session::locate (nframes64_t target_frame, bool with_roll, bool with_flush, bool _send_timecode_update = true; + if (with_mmc) { + deliver_mmc (MIDI::MachineControl::cmdLocate, _transport_frame); + } + Located (); /* EMIT SIGNAL */ }