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.
This commit is contained in:
Robin Gareus 2016-05-25 19:20:09 +02:00
parent ad7295f5e1
commit 1d48648a73
4 changed files with 14 additions and 6 deletions

View file

@ -39,6 +39,7 @@ namespace ARDOUR {
class PortEngine; class PortEngine;
class AudioBackend; class AudioBackend;
class Session;
class LIBARDOUR_API PortManager class LIBARDOUR_API PortManager
{ {
@ -147,7 +148,7 @@ class LIBARDOUR_API PortManager
boost::shared_ptr<Ports> _cycle_ports; boost::shared_ptr<Ports> _cycle_ports;
void fade_out (gain_t, gain_t, pframes_t); 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 silence_outputs (pframes_t nframes);
void check_monitoring (); void check_monitoring ();
/** Signal the start of an audio cycle. /** Signal the start of an audio cycle.

View file

@ -412,7 +412,7 @@ AudioEngine::process_callback (pframes_t nframes)
#else #else
if (_session->silent()) { if (_session->silent()) {
PortManager::silence (nframes); PortManager::silence (nframes, _session);
} }
#endif #endif

View file

@ -28,6 +28,7 @@
#include "ardour/midiport_manager.h" #include "ardour/midiport_manager.h"
#include "ardour/port_manager.h" #include "ardour/port_manager.h"
#include "ardour/profile.h" #include "ardour/profile.h"
#include "ardour/session.h"
#include "i18n.h" #include "i18n.h"
@ -665,9 +666,18 @@ PortManager::cycle_end (pframes_t nframes)
} }
void 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) { 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()) { if (i->second->sends_output()) {
i->second->get_buffer(nframes).silence(nframes); i->second->get_buffer(nframes).silence(nframes);
} }

View file

@ -1156,12 +1156,9 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
} }
// Update Timecode time // Update Timecode time
// [DR] FIXME: find out exactly where this should go below
_transport_frame = target_frame; _transport_frame = target_frame;
_last_roll_or_reversal_location = target_frame; _last_roll_or_reversal_location = target_frame;
timecode_time(_transport_frame, transmitting_timecode_time); timecode_time(_transport_frame, transmitting_timecode_time);
outbound_mtc_timecode_frame = _transport_frame;
next_quarter_frame_to_send = 0;
/* do "stopped" stuff if: /* do "stopped" stuff if:
* *