diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-26 17:22:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-26 17:22:43 +0000 |
commit | 17033c4448cfbf1a23ba1a1ecca1dd3ed93f3c55 (patch) | |
tree | 3b8876357cf26f70a4a154cb4b332585bd30b821 /libs/ardour/io.cc | |
parent | fccc2229ea0c31675949b4ad5648c27b841e4d2a (diff) |
squash the dreaded noise-on-stop of guirja01
git-svn-id: svn://localhost/ardour2/trunk@1393 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 5e99a14fad..9442583379 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -570,10 +570,17 @@ IO::collect_input (vector<Sample *>& bufs, uint32_t nbufs, nframes_t nframes, nf /* fill any excess outputs with the last input */ - while (n < nbufs && last) { - // the dest buffer's offset has already been applied - memcpy (bufs[n], last, sizeof (Sample) * nframes); - ++n; + if (last) { + while (n < nbufs) { + // the dest buffer's offset has already been applied + memcpy (bufs[n], last, sizeof (Sample) * nframes); + ++n; + } + } else { + while (n < nbufs) { + memset (bufs[n], 0, sizeof (Sample) * nframes); + ++n; + } } } |