summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_diskstream.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-10-31 21:16:54 +0000
committerCarl Hetherington <carl@carlh.net>2011-10-31 21:16:54 +0000
commit9afd18358b2a6dff8315e7c592a091e514a7661f (patch)
treec0bbea750e8dfaabf8e0a06f02f2bde2ad7fa6d9 /libs/ardour/midi_diskstream.cc
parent4978c0d4c63bba054181cc0988fd83bc5fa8c9eb (diff)
Remove Diskstream member playback_distance that can be
passed directly from process() to commit(). git-svn-id: svn://localhost/ardour2/branches/3.0@10359 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_diskstream.cc')
-rw-r--r--libs/ardour/midi_diskstream.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc
index 901aefcf17..15cfb9f1c9 100644
--- a/libs/ardour/midi_diskstream.cc
+++ b/libs/ardour/midi_diskstream.cc
@@ -483,8 +483,7 @@ MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool& ne
bool nominally_recording;
bool re = record_enabled ();
bool can_record = _session.actively_recording ();
-
- playback_distance = 0;
+ framecnt_t playback_distance = 0;
check_record_status (transport_frame, can_record);
@@ -599,7 +598,7 @@ MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool& ne
ret = 0;
- if (commit (nframes)) {
+ if (commit (playback_distance)) {
need_butler = true;
}
@@ -607,7 +606,7 @@ MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool& ne
}
bool
-MidiDiskstream::commit (framecnt_t nframes)
+MidiDiskstream::commit (framecnt_t playback_distance)
{
bool need_butler = false;
@@ -624,7 +623,7 @@ MidiDiskstream::commit (framecnt_t nframes)
uint32_t frames_read = g_atomic_int_get(&_frames_read_from_ringbuffer);
uint32_t frames_written = g_atomic_int_get(&_frames_written_to_ringbuffer);
- if ((frames_written - frames_read) + nframes < midi_readahead) {
+ if ((frames_written - frames_read) + playback_distance < midi_readahead) {
need_butler = true;
}