summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_track.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/audio_track.cc')
-rw-r--r--libs/ardour/audio_track.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index 304c6af25c..1dc1ba3a6a 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -329,7 +329,6 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
return 0;
}
- int dret;
Sample* b;
Sample* tmpb;
framepos_t transport_frame;
@@ -348,19 +347,26 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
transport_frame = _session.transport_frame();
+ int dret;
+ framecnt_t playback_distance;
+
if ((nframes = check_initial_delay (nframes, transport_frame)) == 0) {
/* need to do this so that the diskstream sets its
playback distance to zero, thus causing diskstream::commit
to do nothing.
*/
- return diskstream->process (transport_frame, 0, need_butler);
+
+ dret = diskstream->process (transport_frame, 0, playback_distance);
+ need_butler = diskstream->commit (playback_distance);
+ return dret;
}
_silent = false;
_amp->apply_gain_automation(false);
- if ((dret = diskstream->process (transport_frame, nframes, need_butler)) != 0) {
+ if ((dret = diskstream->process (transport_frame, nframes, playback_distance)) != 0) {
+ need_butler = diskstream->commit (playback_distance);
silence (nframes);
return dret;
}
@@ -479,6 +485,8 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
silence (nframes);
}
+ need_butler = diskstream->commit (playback_distance);
+
return 0;
}