From f41149628955fc8145bef6db0c110b71664c0a3a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jul 2009 14:39:21 +0000 Subject: fix clicking when processors become active/inactive; reduce crazy 2.5sec delay for quit dialog git-svn-id: svn://localhost/ardour2/branches/3.0@5402 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/internal_return.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libs/ardour/internal_return.cc') diff --git a/libs/ardour/internal_return.cc b/libs/ardour/internal_return.cc index 37a559649c..f6c99d8518 100644 --- a/libs/ardour/internal_return.cc +++ b/libs/ardour/internal_return.cc @@ -46,7 +46,11 @@ InternalReturn::InternalReturn (Session& s, const XMLNode& node) void InternalReturn::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { - /* XXX no lock here, just atomic fetch */ + if (!_active && !_pending_active) { + return; + } + + /* no lock here, just atomic fetch */ if (g_atomic_int_get(&user_count) == 0) { /* nothing to do - nobody is feeding us anything */ @@ -54,6 +58,7 @@ InternalReturn::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame } bufs.merge_from (buffers, nframes); + _active = _pending_active; } bool -- cgit v1.2.3