a better fix for the silent buffer issue: whenever we run a plugin, mark all the buffers passed to it as non-silent. a few plugin APIs allow the plugin to indicate whether or not it generated silence or not, but we ignore this for now (and possibly forever)

git-svn-id: svn://localhost/ardour2/branches/3.0@10385 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2011-11-01 21:28:16 +00:00
parent cca8b8cda0
commit 8771e00fab
2 changed files with 8 additions and 6 deletions

View File

@@ -481,9 +481,9 @@ PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end
if (out > in) {
/* not active, but something has make up for any channel count increase */
for (uint32_t n = out - in; n < out; ++n) {
memcpy (bufs.get_audio(n).data(), bufs.get_audio(in - 1).data(), sizeof (Sample) * nframes);
memcpy (bufs.get_audio (n).data(), bufs.get_audio(in - 1).data(), sizeof (Sample) * nframes);
}
}
@@ -492,6 +492,12 @@ PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end
}
_active = _pending_active;
/* we have no idea whether the plugin generated silence or not, so mark
* all buffers appropriately.
*/
bufs.is_silent (false);
}
void

View File

@@ -84,10 +84,6 @@ ProcessThread::get_silent_buffers (ChanCount count)
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
for (size_t i= 0; i < count.get(*t); ++i) {
/* every call to get_silent_buffers() by a given thread
* requires that we re-silence them.
*/
sb->get(*t, i).is_silent(false);
sb->get(*t, i).clear();
}
}