From 1d48648a734423d2a1b1689efaa32e7f6452c5ea Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 25 May 2016 19:20:09 +0200 Subject: fix timecode update after locate. Various session rt-events set "_send_timecode_update" to true, but at the same time queue post-transport-work. The timecode-update is generated, but due to pending transport work session->silent() is true and the timecode was never sent. --- libs/ardour/ardour/port_manager.h | 3 ++- libs/ardour/audioengine.cc | 2 +- libs/ardour/port_manager.cc | 12 +++++++++++- libs/ardour/session_transport.cc | 3 --- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libs/ardour/ardour/port_manager.h b/libs/ardour/ardour/port_manager.h index 21ba2213e6..ba1a8c3464 100644 --- a/libs/ardour/ardour/port_manager.h +++ b/libs/ardour/ardour/port_manager.h @@ -39,6 +39,7 @@ namespace ARDOUR { class PortEngine; class AudioBackend; +class Session; class LIBARDOUR_API PortManager { @@ -147,7 +148,7 @@ class LIBARDOUR_API PortManager boost::shared_ptr _cycle_ports; void fade_out (gain_t, gain_t, pframes_t); - void silence (pframes_t nframes); + void silence (pframes_t nframes, Session *s = 0); void silence_outputs (pframes_t nframes); void check_monitoring (); /** Signal the start of an audio cycle. diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index a3ecd04b47..84bfab11f8 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -412,7 +412,7 @@ AudioEngine::process_callback (pframes_t nframes) #else if (_session->silent()) { - PortManager::silence (nframes); + PortManager::silence (nframes, _session); } #endif diff --git a/libs/ardour/port_manager.cc b/libs/ardour/port_manager.cc index 93cb5fbb1a..1eafca0574 100644 --- a/libs/ardour/port_manager.cc +++ b/libs/ardour/port_manager.cc @@ -28,6 +28,7 @@ #include "ardour/midiport_manager.h" #include "ardour/port_manager.h" #include "ardour/profile.h" +#include "ardour/session.h" #include "i18n.h" @@ -665,9 +666,18 @@ PortManager::cycle_end (pframes_t nframes) } void -PortManager::silence (pframes_t nframes) +PortManager::silence (pframes_t nframes, Session *s) { for (Ports::iterator i = _cycle_ports->begin(); i != _cycle_ports->end(); ++i) { + if (s && i->second == s->mtc_output_port ()) { + continue; + } + if (s && i->second == s->midi_clock_output_port ()) { + continue; + } + if (s && i->second == s->ltc_output_port ()) { + continue; + } if (i->second->sends_output()) { i->second->get_buffer(nframes).silence(nframes); } diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 47e0baaf5f..4e59da7137 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -1156,12 +1156,9 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool } // Update Timecode time - // [DR] FIXME: find out exactly where this should go below _transport_frame = target_frame; _last_roll_or_reversal_location = target_frame; timecode_time(_transport_frame, transmitting_timecode_time); - outbound_mtc_timecode_frame = _transport_frame; - next_quarter_frame_to_send = 0; /* do "stopped" stuff if: * -- cgit v1.2.3