summaryrefslogtreecommitdiff
path: root/libs/ardour/io.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-05-08 14:58:45 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-05-08 14:58:45 +0000
commit061bf0f35817eef693bbefed45eefecde1987b4c (patch)
treee6e98702532f72b7499362a2a1e4c347b163ef93 /libs/ardour/io.cc
parent176385ea999e71e7d04158f78128f862a68ca0cc (diff)
fix numlock-effect on redirect clicks; fix control outs (finally?)
git-svn-id: svn://localhost/ardour2/branches/2.0.1@1794 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r--libs/ardour/io.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index 0bda946d11..4e09061845 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -484,13 +484,6 @@ IO::deliver_output_no_pan (vector<Sample *>& bufs, uint32_t nbufs, nframes_t nfr
vector<Sample*> outs;
gain_t actual_gain;
- if (dg != _gain) {
- /* unlikely condition */
- for (o = _outputs.begin(), i = 0; o != _outputs.end(); ++o, ++i) {
- outs.push_back ((*o)->get_buffer (nframes) + offset);
- }
- }
-
/* reduce nbufs to the index of the last input buffer */
nbufs--;
@@ -506,6 +499,11 @@ IO::deliver_output_no_pan (vector<Sample *>& bufs, uint32_t nbufs, nframes_t nfr
dst = (*o)->get_buffer (nframes) + offset;
src = bufs[min(nbufs,i)];
+ if (dg != _gain) {
+ /* unlikely condition */
+ outs.push_back (dst);
+ }
+
if (dg != _gain || actual_gain == 1.0f) {
memcpy (dst, src, sizeof (Sample) * nframes);
} else if (actual_gain == 0.0f) {
@@ -520,7 +518,7 @@ IO::deliver_output_no_pan (vector<Sample *>& bufs, uint32_t nbufs, nframes_t nfr
}
if (dg != _gain) {
- apply_declick (outs, outs.size(), nframes, _gain, dg, false);
+ apply_declick (outs, i, nframes, _gain, dg, false);
_gain = dg;
}