From 61c57e7c4dad4b1332ea54f76d00bade38fbfc1e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 23 Jan 2012 14:53:25 +0000 Subject: [PATCH] Optimisation; it is much cheaper to run UnknownProcessor on the rare occasions that it exists rather than dcasting every processor to check for it. Also put the dcast of PeakMeter off if possible. git-svn-id: svn://localhost/ardour2/branches/3.0@11309 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/route.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 6a7ddde48b..0282c3b032 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -511,18 +511,14 @@ Route::process_output_buffers (BufferSet& bufs, for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if (boost::dynamic_pointer_cast (*i)) { - break; - } - - if (boost::dynamic_pointer_cast (*i) && meter_already_run) { + if (meter_already_run && boost::dynamic_pointer_cast (*i)) { /* don't ::run() the meter, otherwise it will have its previous peak corrupted */ continue; } #ifndef NDEBUG /* if it has any inputs, make sure they match */ - if ((*i)->input_streams() != ChanCount::ZERO) { + if (boost::dynamic_pointer_cast (*i) == 0 && (*i)->input_streams() != ChanCount::ZERO) { if (bufs.count() != (*i)->input_streams()) { cerr << _name << " bufs = " << bufs.count() << " input for " << (*i)->name() << " = " << (*i)->input_streams()