minor but important fix for the wrap-buffer case in a recording audio diskstream

git-svn-id: svn://localhost/ardour2/branches/3.0@10122 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-09-25 20:08:48 +00:00
parent 23dfd4af19
commit 129ac54a57

View File

@ -491,8 +491,8 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool ca
assert(ap);
assert(rec_nframes <= (framecnt_t) ap->get_audio_buffer(nframes).capacity());
Sample *bbuf = ap->get_audio_buffer (nframes).data (rec_offset);
memcpy (chaninfo->current_capture_buffer, bbuf, sizeof (Sample) * rec_nframes);
Sample *buf = ap->get_audio_buffer (nframes).data (rec_offset);
memcpy (chaninfo->current_capture_buffer, buf, sizeof (Sample) * rec_nframes);
} else {
@ -506,7 +506,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool ca
AudioPort* const ap = _io->audio (n);
assert(ap);
Sample* buf = ap->get_audio_buffer(nframes).data();
Sample* buf = ap->get_audio_buffer(nframes).data (rec_offset);
framecnt_t first = chaninfo->capture_vector.len[0];
memcpy (chaninfo->capture_wrap_buffer, buf, sizeof (Sample) * first);