diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-10-05 17:03:23 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-10-05 17:03:23 +0000 |
commit | c72611e1cdf1d8db76bf44a5eb6f356672ea8dfc (patch) | |
tree | 84c30e4d7cef9791183b2d2c758e8e9d9c390993 /libs/ardour/audio_diskstream.cc | |
parent | 17ebbb9d3f2f361479da8f150495ec0d773fe153 (diff) |
fixes for scrubbing, change "crop" to Crop in menu
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2516 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 07cb52403d..184ea8d998 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -760,11 +760,18 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_ if (rec_nframes == 0 && _actual_speed != 1.0f && _actual_speed != -1.0f) { uint64_t phase = last_phase; + uint64_t phi_delta; nframes_t i = 0; // Linearly interpolate into the alt buffer // using 40.24 fixp maths (swh) + if (phi != target_phi) { + phi_delta = (target_phi - phi) / nframes; + } else { + phi_delta = 0; + } + for (chan = c->begin(); chan != c->end(); ++chan) { float fr; @@ -779,7 +786,7 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_ chaninfo->speed_buffer[outsample] = chaninfo->current_playback_buffer[i] * (1.0f - fr) + chaninfo->current_playback_buffer[i+1] * fr; - phase += phi; + phase += phi + phi_delta; } chaninfo->current_playback_buffer = chaninfo->speed_buffer; @@ -792,6 +799,7 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_ playback_distance = nframes; } + phi = target_phi; } ret = 0; |