summaryrefslogtreecommitdiff
path: root/libs/ardour/session_process.cc
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2009-06-10 00:03:47 +0000
committerHans Baier <hansfbaier@googlemail.com>2009-06-10 00:03:47 +0000
commit43340cd37ce91752f80b776d905e1b0d103c89ef (patch)
treea4aa17688238e96d686ba7435e88eccfa4000ff9 /libs/ardour/session_process.cc
parentf284d28d5306114e9badc9077835683e541420e0 (diff)
* Refactor varispeed playback into own class, replace fixed-point arithmetic by double, fix unit tests for libardour
git-svn-id: svn://localhost/ardour2/branches/3.0@5145 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r--libs/ardour/session_process.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index 5bd1166fc6..d389f32696 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -322,14 +322,12 @@ Session::process_with_events (nframes_t nframes)
return;
}
- /// TODO: Figure out what happens to phi and phase, if transport speed momentarily becomes
- /// 1.0 eg. during the adjustments of a slave. If that is a bug, then AudioDiskstream::process
- /// is very likely broken too
if (_transport_speed == 1.0) {
frames_moved = (long) nframes;
} else {
- frames_moved = (long) AudioDiskstream::
- calculate_varispeed_playback_distance(nframes, phase, phi, target_phi);
+ interpolation.set_target_speed (_target_transport_speed);
+ interpolation.set_speed (_transport_speed);
+ frames_moved = (long) interpolation.interpolate (nframes, 0, 0);
}
end_frame = _transport_frame + (nframes_t)frames_moved;
@@ -845,14 +843,12 @@ Session::process_without_events (nframes_t nframes)
prepare_diskstreams ();
- /// TODO: Figure out what happens to phi and phase, if transport speed momentarily becomes
- /// 1.0 eg. during the adjustments of a slave. If that is a bug, then AudioDiskstream::process
- /// is very likely broken too
if (_transport_speed == 1.0) {
frames_moved = (long) nframes;
} else {
- frames_moved = (long) AudioDiskstream::
- calculate_varispeed_playback_distance(nframes, phase, phi, target_phi);
+ interpolation.set_target_speed (_target_transport_speed);
+ interpolation.set_speed (_transport_speed);
+ frames_moved = (long) interpolation.interpolate (nframes, 0, 0);
}
if (process_routes (nframes)) {