From 7dc52e009f980aaf767abfb30757d3f89845a5a7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 22 Sep 2019 04:15:01 +0200 Subject: NO-OP: cleanup code --- libs/ardour/internal_return.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'libs/ardour/internal_return.cc') diff --git a/libs/ardour/internal_return.cc b/libs/ardour/internal_return.cc index 3d0fff2897..0ca7a5dec3 100644 --- a/libs/ardour/internal_return.cc +++ b/libs/ardour/internal_return.cc @@ -31,7 +31,7 @@ using namespace ARDOUR; InternalReturn::InternalReturn (Session& s) : Return (s, true) { - _display_to_user = false; + _display_to_user = false; } void @@ -40,18 +40,19 @@ InternalReturn::run (BufferSet& bufs, samplepos_t /*start_sample*/, samplepos_t if (!_active && !_pending_active) { return; } + _active = _pending_active; Glib::Threads::Mutex::Lock lm (_sends_mutex, Glib::Threads::TRY_LOCK); - if (lm.locked ()) { - for (list::iterator i = _sends.begin(); i != _sends.end(); ++i) { - if ((*i)->active () && (!(*i)->source_route() || (*i)->source_route()->active())) { - bufs.merge_from ((*i)->get_buffers(), nframes); - } - } + if (!lm.locked ()) { + return; } - _active = _pending_active; + for (list::iterator i = _sends.begin(); i != _sends.end(); ++i) { + if ((*i)->active () && (!(*i)->source_route() || (*i)->source_route()->active())) { + bufs.merge_from ((*i)->get_buffers(), nframes); + } + } } void -- cgit v1.2.3