diff options
author | Robin Gareus <robin@gareus.org> | 2013-01-08 00:45:00 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-01-08 00:45:00 +0000 |
commit | 1b66aa86052eeee2c0e11afc7df1cc279c911cdb (patch) | |
tree | bed3ed2cf026bd9eee5070c94e169a4b5160857e /libs/ardour/session_midi.cc | |
parent | 44a427f0f936313734070e74f079fc3e0ed741cf (diff) |
MTC generator, revert inert changes in previous commit.
This if() case is always true - ensured by assert().
git-svn-id: svn://localhost/ardour2/branches/3.0@13807 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_midi.cc')
-rw-r--r-- | libs/ardour/session_midi.cc | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index c03db04035..69de04de72 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -509,25 +509,23 @@ Session::send_midi_time_code_for_cycle (framepos_t start_frame, framepos_t end_f assert (msg_time >= start_frame); assert (msg_time < end_frame); - if (msg_time >= start_frame) { - /* convert from session frames back to JACK frames using the transport speed */ - pframes_t const out_stamp = (msg_time - start_frame) / _transport_speed; - assert (out_stamp < nframes); - - if (MIDI::Manager::instance()->mtc_output_port()->midimsg (mtc_msg, 2, out_stamp)) { - error << string_compose(_("Session: cannot send quarter-frame MTC message (%1)"), strerror (errno)) - << endmsg; - return -1; - } + /* convert from session frames back to JACK frames using the transport speed */ + pframes_t const out_stamp = (msg_time - start_frame) / _transport_speed; + assert (out_stamp < nframes); + + if (MIDI::Manager::instance()->mtc_output_port()->midimsg (mtc_msg, 2, out_stamp)) { + error << string_compose(_("Session: cannot send quarter-frame MTC message (%1)"), strerror (errno)) + << endmsg; + return -1; + } #ifndef NDEBUG - DEBUG_STR_DECL(foo) - DEBUG_STR_APPEND(foo,"sending "); - DEBUG_STR_APPEND(foo, transmitting_timecode_time); - DEBUG_TRACE (DEBUG::MTC, string_compose ("%1 qfm = %2, stamp = %3\n", DEBUG_STR(foo).str(), next_quarter_frame_to_send, - out_stamp)); + DEBUG_STR_DECL(foo) + DEBUG_STR_APPEND(foo,"sending "); + DEBUG_STR_APPEND(foo, transmitting_timecode_time); + DEBUG_TRACE (DEBUG::MTC, string_compose ("%1 qfm = %2, stamp = %3\n", DEBUG_STR(foo).str(), next_quarter_frame_to_send, + out_stamp)); #endif - } // Increment quarter frame counter next_quarter_frame_to_send++; |