From 00150e105cc5c4cfe297d1355be075711c42c924 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 11 Jan 2020 17:48:42 +0100 Subject: [PATCH] Fix AFL position * update AFL position when preference changes * "after post-fader processors (before pan)" is before the main-out (not at the end). * Fix "immediately post-fader": The amp, when added was the last element. ++after_end then made the iterator point to .end() This likely worked in the past when the monitor send was added immediately after adding the fader/amp before any other processors. --- libs/ardour/route.cc | 13 ++++--------- libs/ardour/session_state.cc | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 68a85d39bb..0b67528ac9 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -4845,10 +4845,6 @@ Route::setup_invisible_processors () amp = find (new_processors.begin(), new_processors.end(), _amp); } - /* and the processor after the amp */ - - ProcessorList::iterator after_amp = amp; - ++after_amp; /* Pre-fader METER */ @@ -4865,7 +4861,6 @@ Route::setup_invisible_processors () new_processors.push_back (_main_outs); /* iterator for the main outs */ - ProcessorList::iterator main = new_processors.end(); --main; @@ -4873,11 +4868,8 @@ Route::setup_invisible_processors () if (_meter && (_meter_point == MeterOutput || _meter_point == MeterPostFader)) { assert (!_meter->display_to_user ()); - /* add the processor just before or just after the main outs */ - ProcessorList::iterator meter_point = main; - if (_meter_point == MeterOutput) { ++meter_point; } @@ -4893,6 +4885,9 @@ Route::setup_invisible_processors () /* MONITOR SEND */ if (_monitor_send && !is_monitor ()) { + ProcessorList::iterator after_amp = amp; + ++after_amp; + assert (!_monitor_send->display_to_user ()); switch (Config->get_listen_position ()) { case PreFaderListen: @@ -4912,7 +4907,7 @@ Route::setup_invisible_processors () new_processors.insert (after_amp, _monitor_send); break; case AFLFromAfterProcessors: - new_processors.insert (new_processors.end(), _monitor_send); + new_processors.insert (main, _monitor_send); break; } _monitor_send->set_can_pan (true); diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index f67c5df66c..430e0f95ef 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -4126,7 +4126,7 @@ Session::config_changed (std::string p, bool ours) } } else if (p == "solo-mute-override") { // catch_up_on_solo_mute_override (); - } else if (p == "listen-position" || p == "pfl-position") { + } else if (p == "listen-position" || p == "pfl-position" || p == "afl-position") { listen_position_changed (); } else if (p == "solo-control-is-listen-control") { solo_control_mode_changed ();