summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_track.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-10-31 21:17:08 +0000
committerCarl Hetherington <carl@carlh.net>2011-10-31 21:17:08 +0000
commit5dba72c874def27bef3ba3fe7a5cf2414e77aadb (patch)
treed4a41d2aca384122422d72a850b19ef46627488e /libs/ardour/audio_track.cc
parentd47e9247dfba27d198b8a0c43cef5553fc40745d (diff)
Take commit() out of process() in both types of
diskstream, and call commit() where appropriate. git-svn-id: svn://localhost/ardour2/branches/3.0@10361 d708f5d6-7413-0410-9779-e7cbd77b26cf
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;
}