summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_diskstream.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_diskstream.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_diskstream.cc')
-rw-r--r--libs/ardour/audio_diskstream.cc18
1 files changed, 5 insertions, 13 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index e5ae9a1506..51a3b72bf6 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -415,18 +415,17 @@ AudioDiskstream::prepare_record_status(framepos_t capture_start_frame)
* that someone can read playback_distance worth of data from.
*/
int
-AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool& need_butler)
+AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, framecnt_t& playback_distance)
{
uint32_t n;
boost::shared_ptr<ChannelList> c = channels.reader();
ChannelList::iterator chan;
- int ret = -1;
framecnt_t rec_offset = 0;
framecnt_t rec_nframes = 0;
bool collect_playback = false;
bool can_record = _session.actively_recording ();
- framecnt_t playback_distance = 0;
+ playback_distance = 0;
if (!_io || !_io->active()) {
return 0;
@@ -511,7 +510,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool& n
if (rec_nframes > total) {
DiskOverrun ();
- goto out;
+ return -1;
}
boost::shared_ptr<AudioPort> const ap = _io->audio (n);
@@ -617,7 +616,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool& n
cerr << _name << " Need " << necessary_samples << " total = " << total << endl;
cerr << "underrun for " << _name << endl;
DiskUnderrun ();
- goto out;
+ return -1;
} else {
@@ -663,14 +662,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool& n
_speed = _target_speed;
}
- ret = 0;
-
- if (commit (playback_distance)) {
- need_butler = true;
- }
-
- out:
- return ret;
+ return 0;
}
/** Update various things including playback_sample, read pointer on each channel's playback_buf