diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-20 21:46:47 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-20 21:46:47 +0100 |
commit | b588be2deada445b60f3f74a240835f74773e0ea (patch) | |
tree | ee26c370ac7580283dd5bbf5de500f6573a295a3 /libs/ardour/session.cc | |
parent | b25cd7683b25a502094a2ecefbadb4b7d6e6db09 (diff) |
Instrument channel option when adding track
By setting strict-io on the Instrument plugin early during track
creation, adding the plugin will trigger a PluginSetup Dialog for
multi-out instruments in a strict i/o track.
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index b17b859490..256100aab4 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2474,9 +2474,10 @@ Session::default_track_name_pattern (DataType t) * @param instrument plugin info for the instrument to insert pre-fader, if any */ list<boost::shared_ptr<MidiTrack> > -Session::new_midi_track (const ChanCount& input, const ChanCount& output, +Session::new_midi_track (const ChanCount& input, const ChanCount& output, bool strict_io, boost::shared_ptr<PluginInfo> instrument, Plugin::PresetRecord* pset, - RouteGroup* route_group, uint32_t how_many, string name_template, PresentationInfo::order_t order, + RouteGroup* route_group, uint32_t how_many, + string name_template, PresentationInfo::order_t order, TrackMode mode) { string track_name; @@ -2503,7 +2504,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, goto failed; } - if (Profile->get_mixbus ()) { + if (strict_io) { track->set_strict_io (true); } @@ -2569,8 +2570,11 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, if (pset) { plugin->load_preset (*pset); } - boost::shared_ptr<Processor> p (new PluginInsert (*this, plugin)); - (*r)->add_processor (p, PreFader); + boost::shared_ptr<PluginInsert> pi (new PluginInsert (*this, plugin)); + if (strict_io) { + pi->set_strict_io (true); + } + (*r)->add_processor (pi, PreFader); } } } @@ -2579,7 +2583,8 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, } RouteList -Session::new_midi_route (RouteGroup* route_group, uint32_t how_many, string name_template, boost::shared_ptr<PluginInfo> instrument, Plugin::PresetRecord* pset, +Session::new_midi_route (RouteGroup* route_group, uint32_t how_many, string name_template, bool strict_io, + boost::shared_ptr<PluginInfo> instrument, Plugin::PresetRecord* pset, PresentationInfo::Flag flag, PresentationInfo::order_t order) { string bus_name; @@ -2602,7 +2607,7 @@ Session::new_midi_route (RouteGroup* route_group, uint32_t how_many, string name goto failure; } - if (Profile->get_mixbus ()) { + if (strict_io) { bus->set_strict_io (true); } @@ -2660,8 +2665,11 @@ Session::new_midi_route (RouteGroup* route_group, uint32_t how_many, string name if (pset) { plugin->load_preset (*pset); } - boost::shared_ptr<Processor> p (new PluginInsert (*this, plugin)); - (*r)->add_processor (p, PreFader); + boost::shared_ptr<PluginInsert> pi (new PluginInsert (*this, plugin)); + if (strict_io) { + pi->set_strict_io (true); + } + (*r)->add_processor (pi, PreFader); } } } |