From e4232197fe9b5fb11d5325d2dce31597c83e0f0a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 18 Jul 2020 21:59:49 +0200 Subject: [PATCH] Revert recent auto-connect hack ..forth and back.. 1882c1ba7ed16a095fb3192f83825218111e0298 dabd5715e91fd97902b1312701b26f8a351e17e4 fac8d84786f420f91b68ce2e444579ea2162cb8d This needs a [much] better solution: e.g. Wait until instrument is instantiated (ports are created), then auto-connect, and finally fan-out (or alternatively skip auto-connect for fanned-out tracks). Currently both auto-connect as well as fan-out and port-creation take place asynchronously. Also MIDI track subscribe to &Session::midi_output_change_handler, (MIDI busses don't). --- libs/ardour/session.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index fdf847c5bc..4b1931d967 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2457,6 +2457,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s failed: if (!new_routes.empty()) { + add_routes (new_routes, true, true, order); if (instrument) { for (RouteList::iterator r = new_routes.begin(); r != new_routes.end(); ++r) { @@ -2480,8 +2481,6 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s } } } - - add_routes (new_routes, true, true, order); } return ret; @@ -2557,6 +2556,8 @@ Session::new_midi_route (RouteGroup* route_group, uint32_t how_many, string name failure: if (!ret.empty()) { + add_routes (ret, false, true, order); + if (instrument) { for (RouteList::iterator r = ret.begin(); r != ret.end(); ++r) { PluginPtr plugin = instrument->load (*this); @@ -2579,8 +2580,6 @@ Session::new_midi_route (RouteGroup* route_group, uint32_t how_many, string name } } } - - add_routes (ret, false, true, order); } return ret;