From 129ac54a57d2e68edcea16659c169d994dfba140 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 25 Sep 2011 20:08:48 +0000 Subject: [PATCH] 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 --- libs/ardour/audio_diskstream.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 9ffadfd16b..243ccdb9d1 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -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);