#include "ardour/midi_ui.h"
#include "ardour/profile.h"
#include "ardour/session.h"
-#include "ardour/slave.h"
+#include "ardour/transport_master.h"
#include "ardour/ticker.h"
#include "pbd/i18n.h"
of an MTC slave to become out of date. Catch this.
*/
- MTC_Slave* mtcs = dynamic_cast<MTC_Slave*> (_slave);
+ boost::shared_ptr<MTC_TransportMaster> mtcs = boost::dynamic_pointer_cast<MTC_TransportMaster> (transport_master());
- if (mtcs != 0) {
+ if (mtcs) {
// cerr << "Locate *with* MTC slave\n";
mtcs->handle_locate (mmc_tc);
} else {
if (_engine.freewheeling() || !Config->get_send_mtc()) {
return 0;
}
- if (_slave && !_slave->locked()) {
+ if (!transport_master()->locked()) {
return 0;
}
LatencyRange mtc_out_latency = {0, 0}; // TODO cache this, update on engine().GraphReordered()
_midi_ports->mtc_output_port ()->get_connected_latency_range (ltc_out_latency, true);
- sampleoffset_t mtc_offset = worst_playback_latency() - mtc_out_latency.max;
+ sampleoffset_t mtc_offset = mtc_out_latency.max;
// only if rolling.. ?
outbound_mtc_timecode_frame += mtc_offset;
// cerr << "(MTC) Not sending MTC\n";
return 0;
}
- if (_slave && !_slave->locked()) {
+ if (!transport_master()->locked()) {
return 0;
}
return _midi_ports->midi_clock_output_port ();
}
-boost::shared_ptr<MidiPort>
-Session::midi_clock_input_port () const
-{
- return _midi_ports->midi_clock_input_port ();
-}
+
boost::shared_ptr<MidiPort>
Session::mtc_output_port () const
{
return _midi_ports->mtc_output_port ();
}
-boost::shared_ptr<MidiPort>
-Session::mtc_input_port () const
-{
- return _midi_ports->mtc_input_port ();
-}
void
Session::midi_track_presentation_info_changed (PropertyChange const& what_changed, boost::weak_ptr<MidiTrack> mt)