summaryrefslogtreecommitdiff
path: root/libs/ardour/session_midi.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-05-03 23:28:57 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-05-03 23:28:57 +0000
commita8da89d745c6a7e7d4c20dfcfb16b2537d767428 (patch)
tree06fb6cc1795ef89a7ed847395c550b6215e253df /libs/ardour/session_midi.cc
parent5a1ca70f07aeb999ba3f0f09dbd49f1d50505f3c (diff)
optimize some performance bottlenecks; remove jack_nframes_t that crept back into the code
git-svn-id: svn://localhost/ardour2/branches/midi@1779 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_midi.cc')
-rw-r--r--libs/ardour/session_midi.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc
index 7d20a05b45..7f88766b63 100644
--- a/libs/ardour/session_midi.cc
+++ b/libs/ardour/session_midi.cc
@@ -763,7 +763,7 @@ Session::change_midi_ports ()
* have been called with the appropriate nframes parameter this cycle.
*/
int
-Session::send_full_time_code(jack_nframes_t nframes)
+Session::send_full_time_code(nframes_t nframes)
{
/* This function could easily send at a given frame offset, but would
* that be useful? Does ardour do sub-block accurate locating? [DR] */
@@ -787,7 +787,7 @@ Session::send_full_time_code(jack_nframes_t nframes)
if (((mtc_smpte_bits >> 5) != MIDI::MTC_25_FPS) && (transmitting_smpte_time.frames % 2)) {
// start MTC quarter frame transmission on an even frame
SMPTE::increment( transmitting_smpte_time );
- outbound_mtc_smpte_frame += (jack_nframes_t) _frames_per_smpte_frame;
+ outbound_mtc_smpte_frame += (nframes_t) _frames_per_smpte_frame;
}
// Compensate for audio latency
@@ -828,7 +828,7 @@ Session::send_full_time_code(jack_nframes_t nframes)
* earlier already this cycle by send_full_time_code)
*/
int
-Session::send_midi_time_code_for_cycle(jack_nframes_t nframes)
+Session::send_midi_time_code_for_cycle(nframes_t nframes)
{
assert (next_quarter_frame_to_send >= 0);
assert (next_quarter_frame_to_send <= 7);
@@ -845,7 +845,7 @@ Session::send_midi_time_code_for_cycle(jack_nframes_t nframes)
}
/* Duration of one quarter frame */
- jack_nframes_t quarter_frame_duration = ((long) _frames_per_smpte_frame) >> 2;
+ nframes_t quarter_frame_duration = ((long) _frames_per_smpte_frame) >> 2;
//cerr << "(MTC) TR: " << _transport_frame << " - SF: " << outbound_mtc_smpte_frame
//<< " - NQ: " << next_quarter_frame_to_send << " - FD" << quarter_frame_duration << endl;
@@ -888,14 +888,14 @@ Session::send_midi_time_code_for_cycle(jack_nframes_t nframes)
break;
}
- const jack_nframes_t msg_time = (outbound_mtc_smpte_frame
+ const nframes_t msg_time = (outbound_mtc_smpte_frame
+ (quarter_frame_duration * next_quarter_frame_to_send));
// This message must fall within this block or something is broken
assert(msg_time >= _transport_frame);
assert(msg_time < _transport_frame + nframes);
- jack_nframes_t out_stamp = msg_time - _transport_frame;
+ nframes_t out_stamp = msg_time - _transport_frame;
assert(out_stamp < nframes);
if (!_mtc_port->midimsg (mtc_msg, 2, out_stamp)) {