summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-02 21:31:04 +0200
committerRobin Gareus <robin@gareus.org>2020-04-02 21:43:16 +0200
commitdabd5715e91fd97902b1312701b26f8a351e17e4 (patch)
treee9adf3e9fd9bbdda05f565d91deca7e59da6cf6a /libs/ardour/session.cc
parent14f15ca1e9526bde2db75d502c8290ac5d40db69 (diff)
Revert "move the point of adding a new MIDI track until *after* the instrument is added"
This reverts commit fac8d84786f420f91b68ce2e444579ea2162cb8d. This fixes fan-out. The track should be created before any tracks or busses are created that are fed by the MIDI track. The apparent motivation for fac8d847 was MIDNAM related (there was code in the GUI that needed the instrument, which was called from within ::add_routes). This should no longer be the case, the GUI needs to pick up instrument changes after track creation via processors changed; besides MIDI busses were still created before the instrument.
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 379447b3a1..6e34985136 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -2474,6 +2474,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s
failed:
if (!new_routes.empty()) {
StateProtector sp (this);
+ add_routes (new_routes, true, true, false, order);
if (instrument) {
for (RouteList::iterator r = new_routes.begin(); r != new_routes.end(); ++r) {
@@ -2497,8 +2498,6 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool s
}
}
}
-
- add_routes (new_routes, true, true, false, order);
}
return ret;