summaryrefslogtreecommitdiff
path: root/libs/ardour/session_process.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-01-03 23:54:36 +0000
committerCarl Hetherington <carl@carlh.net>2011-01-03 23:54:36 +0000
commitb3fe29af410d0e809d4c2e5e15e78a064fda63e4 (patch)
tree191b25c1aad398688cdce7f24eed9a9d0294b6aa /libs/ardour/session_process.cc
parent741427d98ff34f822e1f0ebce42cf08b70e10e96 (diff)
Cope with non-unity transport speed when sending MTC.
git-svn-id: svn://localhost/ardour2/branches/3.0@8422 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r--libs/ardour/session_process.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index 662da4db91..65930ca2aa 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -314,7 +314,7 @@ Session::process_with_events (pframes_t nframes)
}
if (!_exporting && !timecode_transmission_suspended()) {
- send_midi_time_code_for_cycle (nframes);
+ send_midi_time_code_for_cycle (_transport_frame, end_frame, nframes);
}
if (actively_recording()) {
@@ -764,8 +764,16 @@ Session::process_without_events (pframes_t nframes)
return;
}
+ if (_transport_speed == 1.0) {
+ frames_moved = (framecnt_t) nframes;
+ } else {
+ interpolation.set_target_speed (fabs(_target_transport_speed));
+ interpolation.set_speed (fabs(_transport_speed));
+ frames_moved = (framecnt_t) interpolation.interpolate (0, nframes, 0, 0);
+ }
+
if (!_exporting && !timecode_transmission_suspended()) {
- send_midi_time_code_for_cycle (nframes);
+ send_midi_time_code_for_cycle (_transport_frame, _transport_frame + frames_moved, nframes);
}
if (actively_recording()) {
@@ -789,14 +797,6 @@ Session::process_without_events (pframes_t nframes)
click (_transport_frame, nframes);
- if (_transport_speed == 1.0) {
- frames_moved = (framecnt_t) nframes;
- } else {
- interpolation.set_target_speed (fabs(_target_transport_speed));
- interpolation.set_speed (fabs(_transport_speed));
- frames_moved = (framecnt_t) interpolation.interpolate (0, nframes, 0, 0);
- }
-
if (process_routes (nframes, session_needs_butler)) {
fail_roll (nframes);
return;