// or a new full timecode will be queued next cycle.
while (outbound_mtc_timecode_frame < t) {
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
- outbound_mtc_timecode_frame += _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += _samples_per_timecode_frame;
}
- double const quarter_frame_duration = ((framecnt_t) _frames_per_timecode_frame) / 4.0;
+ double const quarter_frame_duration = ((framecnt_t) _samples_per_timecode_frame) / 4.0;
if (ceil((t - mtc_tc) / quarter_frame_duration) > 0) {
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
- outbound_mtc_timecode_frame += _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += _samples_per_timecode_frame;
}
DEBUG_TRACE (DEBUG::MTC, string_compose ("Full MTC TC %1 (off %2)\n", outbound_mtc_timecode_frame, mtc_offset));
if (((mtc_timecode_bits >> 5) != MIDI::MTC_25_FPS) && (transmitting_timecode_time.frames % 2)) {
// start MTC quarter frame transmission on an even frame
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
- outbound_mtc_timecode_frame += _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += _samples_per_timecode_frame;
}
next_quarter_frame_to_send = 0;
assert (next_quarter_frame_to_send <= 7);
/* Duration of one quarter frame */
- double const quarter_frame_duration = _frames_per_timecode_frame / 4.0;
+ double const quarter_frame_duration = _samples_per_timecode_frame / 4.0;
DEBUG_TRACE (DEBUG::MTC, string_compose ("TF %1 SF %2 MT %3 QF %4 QD %5\n",
_transport_frame, start_frame, outbound_mtc_timecode_frame,
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
Timecode::increment (transmitting_timecode_time, config.get_subframes_per_frame());
// Increment timing of first quarter frame
- outbound_mtc_timecode_frame += 2.0 * _frames_per_timecode_frame;
+ outbound_mtc_timecode_frame += 2.0 * _samples_per_timecode_frame;
}
}
boost::shared_ptr<MidiTrack> new_midi_target (mt.lock ());
if (new_midi_target->presentation_info().selected()) {
- cerr << "Rewiring " << new_midi_target->name() << endl;
rewire_selected_midi (new_midi_target);
}
}
return;
}
- PortManager::MidiSelectionPorts msp;
+ vector<string> msp;
AudioEngine::instance()->get_midi_selection_ports (msp);
if (!msp.empty()) {
old_midi_target->input()->disconnect (this);
}
- for (PortManager::MidiSelectionPorts::const_iterator p = msp.begin(); p != msp.end(); ++p) {
+ for (vector<string>::const_iterator p = msp.begin(); p != msp.end(); ++p) {
/* disconnect the port from everything */
AudioEngine::instance()->disconnect (*p);
/* connect it to the new target */
return;
}
- PortManager::MidiSelectionPorts msp;
+ vector<string> msp;
AudioEngine::instance()->get_midi_selection_ports (msp);
if (msp.empty()) {
return;
}
- cerr << "2. Rewiring " << target->name() << endl;
-
target->input()->disconnect (this);
- for (PortManager::MidiSelectionPorts::const_iterator p = msp.begin(); p != msp.end(); ++p) {
- cerr << "\tdisconnect " << *p << endl;
+ for (vector<string>::const_iterator p = msp.begin(); p != msp.end(); ++p) {
AudioEngine::instance()->disconnect (*p);
- cerr << "\tconnect to " << *p << endl;
target->input()->connect (target->input()->nth (0), (*p), this);
}
}