diff options
author | Carl Hetherington <carl@carlh.net> | 2012-01-23 14:53:25 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-01-23 14:53:25 +0000 |
commit | 61c57e7c4dad4b1332ea54f76d00bade38fbfc1e (patch) | |
tree | 90e2a33dde4bca0c350ced200da1217e7a486bf1 /libs | |
parent | 8e98352b6c6879f624a25f1b210b3dc8bf84378d (diff) |
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
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/route.cc | 8 |
1 files 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<UnknownProcessor> (*i)) { - break; - } - - if (boost::dynamic_pointer_cast<PeakMeter> (*i) && meter_already_run) { + if (meter_already_run && boost::dynamic_pointer_cast<PeakMeter> (*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<UnknownProcessor> (*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() |