summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-11-01 21:28:16 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-11-01 21:28:16 +0000
commit8771e00fab8d10f46b9862afe920ee77fae7b197 (patch)
treebbe7c9070582b1049d3792b7896c2eccc5483606
parentcca8b8cda0d25459019bb10a59616fec108b825e (diff)
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
-rw-r--r--libs/ardour/plugin_insert.cc10
-rw-r--r--libs/ardour/process_thread.cc4
2 files changed, 8 insertions, 6 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index aa5eeaea3b..bdda2809b2 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -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
diff --git a/libs/ardour/process_thread.cc b/libs/ardour/process_thread.cc
index 666c64e211..58d51bef4e 100644
--- a/libs/ardour/process_thread.cc
+++ b/libs/ardour/process_thread.cc
@@ -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();
}
}