summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-12-04 18:59:10 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-12-04 18:59:10 +0000
commitf4e03bd3894078002cb0a96a10887e55dea3c8d8 (patch)
treef3231ac35b426f7da0371736a08d7365640ba096
parent974f36cfb552d91fde5e4eb69eb51609234769aa (diff)
tweak to make that last buffer fix not break things
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4286 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/audio_track.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index ca74176a16..0fdd523f8f 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -624,7 +624,7 @@ AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
*/
float scaling = limit/blimit;
-
+
for (i = 0, n = 1; i < blimit; ++i, ++n) {
/* first time through just copy a channel into
@@ -649,7 +649,7 @@ AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
data in the output buffers
*/
- _session.mix_buffers_with_gain (bufs[i%blimit], b, nframes, scaling);
+ Session::mix_buffers_with_gain (bufs[i%blimit], b, nframes, scaling);
if (n < diskstream->n_channels()) {
tmpb = diskstream->playback_buffer(n);
@@ -660,8 +660,9 @@ AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
}
+ limit = blimit;
+
} else {
-
for (i = 0, n = 1; i < limit; ++i, ++n) {
memcpy (bufs[i], b, sizeof (Sample) * nframes);
if (n < diskstream->n_channels()) {
@@ -683,7 +684,7 @@ AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
}
}
- process_output_buffers (bufs, blimit, start_frame, end_frame, nframes, offset, (!_session.get_record_enabled() || !Config->get_do_not_record_plugins()), declick, (_meter_point != MeterInput));
+ process_output_buffers (bufs, limit, start_frame, end_frame, nframes, offset, (!_session.get_record_enabled() || !Config->get_do_not_record_plugins()), declick, (_meter_point != MeterInput));
} else {
/* problem with the diskstream; just be quiet for a bit */