13
0

Use process-graph for silencing routes during audition

Route::silence() runs plugins. With a heavy session
that relies on multi-core processing, sending silence
to processors will have to be done in parallel.
Otherwise it can result in large DSP load and xruns.

This may allow to revert b3497b3f8f, which was
a prior attempt to resolve this, before understanding
the actual cause.
This commit is contained in:
Robin Gareus 2022-06-03 22:49:56 +02:00
parent 3e1e0d94c5
commit 543bb85157
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -758,9 +758,18 @@ Session::process_audition (pframes_t nframes)
SessionEvent* ev;
boost::shared_ptr<RouteList> r = routes.reader ();
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if (!(*i)->is_auditioner()) {
(*i)->silence (nframes);
boost::shared_ptr<GraphChain> graph_chain = _graph_chain;
if (graph_chain) {
/* Ideally we'd use Session::rt_tasklist, since dependency is irrelevant.
* However the RTTaskList process threads have no ProcessThread buffers
* nor a SessioEvent thread_pool.
*/
_process_graph->silence_routes (graph_chain, nframes);
} else {
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if (!(*i)->is_auditioner()) {
(*i)->silence (nframes);
}
}
}