diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 41fd8b39f2..c6c68cfb56 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -5339,25 +5339,7 @@ Route::setup_invisible_processors () } } - /* EXPORT PROCESSOR */ - if (_capturing_processor) { - assert (!_capturing_processor->display_to_user ()); - ProcessorList::iterator reader_pos = find (new_processors.begin(), new_processors.end(), _disk_reader); - if (reader_pos != new_processors.end()) { - /* insert after disk-reader */ - new_processors.insert (++reader_pos, _capturing_processor); - } else { - ProcessorList::iterator return_pos = find (new_processors.begin(), new_processors.end(), _intreturn); - /* insert after return */ - if (return_pos != new_processors.end()) { - new_processors.insert (++return_pos, _capturing_processor); - } else { - new_processors.push_front (_capturing_processor); - } - } - } - - /* Polarity Invert */ + /* Polarity Invert (always present) */ if (_polarity) { ProcessorList::iterator reader_pos = find (new_processors.begin(), new_processors.end(), _disk_reader); ProcessorList::iterator polarity_pos; @@ -5381,6 +5363,24 @@ Route::setup_invisible_processors () } } + /* EXPORT PROCESSOR */ + if (_capturing_processor) { + assert (!_capturing_processor->display_to_user ()); + ProcessorList::iterator capture_pos; + if (_triggerbox && (capture_pos = find (new_processors.begin(), new_processors.end(), _triggerbox)) != new_processors.end ()) { + /* insert after triggerbox (which is just after disk-reader) */ + new_processors.insert (++capture_pos, _capturing_processor); + } else if ((capture_pos = find (new_processors.begin(), new_processors.end(), _disk_reader)) != new_processors.end ()) { + /* insert after disk-reader */ + new_processors.insert (++capture_pos, _capturing_processor); + } else if ((capture_pos = find (new_processors.begin(), new_processors.end(), _intreturn)) != new_processors.end ()) { + /* insert after return (busses) */ + new_processors.insert (++capture_pos, _capturing_processor); + } else { + new_processors.push_front (_capturing_processor); + } + } + /* Input meter */ if (_meter && _meter_point == MeterInput) { /* add meter just before the disk-writer (if any)