From 9b23587886991c2b7efc07c9273c263e486ea3c4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 3 Apr 2023 15:17:12 +0200 Subject: [PATCH] Add missing processor-locks to iterate over processors --- libs/ardour/route.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index ef427dd395..47caf5a5dd 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -4510,9 +4510,11 @@ Route::apply_latency_compensation () void Route::set_block_size (pframes_t nframes) { + Glib::Threads::RWLock::ReaderLock lm (_processor_lock); for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { (*i)->set_block_size (nframes); } + lm.release (); _session.ensure_buffers (n_process_buffers ()); } @@ -4520,8 +4522,10 @@ Route::set_block_size (pframes_t nframes) void Route::protect_automation () { - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) + Glib::Threads::RWLock::ReaderLock lm (_processor_lock); + for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { (*i)->protect_automation(); + } } /** Shift automation forwards from a particular place, thereby inserting time.