From ebc51954908517f85d363802374e5d503338376a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 1 Dec 2021 13:25:47 -0700 Subject: [PATCH] switch to a more efficient implementation of Processor::check_active() --- libs/ardour/ardour/processor.h | 2 +- libs/ardour/processor.cc | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index a15ecdedcc..58f1520888 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -161,7 +161,7 @@ protected: virtual XMLNode& state (); virtual int set_state_2X (const XMLNode&, int version); - bool check_active (); + bool check_active () { return (_active = _pending_active); } bool map_loop_range (samplepos_t& start, samplepos_t& end) const; int _pending_active; diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc index ec0e3375f1..2d6a78c198 100644 --- a/libs/ardour/processor.cc +++ b/libs/ardour/processor.cc @@ -332,18 +332,3 @@ Processor::owner() const { return _owner; } - -bool -Processor::check_active () -{ - if (_active) { - if (!_pending_active) { - _active = false; - } - } else { - if (_pending_active) { - _active = true; - } - } - return _active; -}