summaryrefslogtreecommitdiff
path: root/libs/ardour/session_process.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-10-23 17:10:25 +0000
committerRobin Gareus <robin@gareus.org>2012-10-23 17:10:25 +0000
commit93b13251fa3b2f5db81d6ea1c50c58333dc376a6 (patch)
tree304d3d671ea0e300f55565331b11211f4ba94c56 /libs/ardour/session_process.cc
parent35c6b52c36ca047ada5b1b127128c03049ebfc89 (diff)
fix backwards playback position calculation
git-svn-id: svn://localhost/ardour2/branches/3.0@13322 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r--libs/ardour/session_process.cc18
1 files changed, 4 insertions, 14 deletions
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index bd386a943d..33207a3491 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -341,8 +341,8 @@ Session::process_with_events (pframes_t 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));
+ interpolation.set_target_speed (_target_transport_speed);
+ interpolation.set_speed (_transport_speed);
frames_moved = (framecnt_t) interpolation.interpolate (0, nframes, 0, 0);
}
@@ -813,8 +813,8 @@ Session::process_without_events (pframes_t 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));
+ interpolation.set_target_speed (_target_transport_speed);
+ interpolation.set_speed (_transport_speed);
frames_moved = (framecnt_t) interpolation.interpolate (0, nframes, 0, 0);
}
@@ -848,16 +848,6 @@ Session::process_without_events (pframes_t nframes)
get_track_statistics ();
- /* XXX: I'm not sure whether this is correct, but at least it
- matches process_with_events, so that this new frames_moved
- is -ve when transport speed is -ve. This means that the
- transport position is updated correctly when we are in
- reverse. It seems a bit wrong that we're not using the
- interpolator to compute this.
- */
-
- frames_moved = (framecnt_t) floor (_transport_speed * nframes);
-
if (frames_moved < 0) {
decrement_transport_position (-frames_moved);
} else {