fix backwards playback position calculation

git-svn-id: svn://localhost/ardour2/branches/3.0@13322 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Robin Gareus 2012-10-23 17:10:25 +00:00
parent 35c6b52c36
commit 93b13251fa

View file

@ -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 {