diff options
author | Robin Gareus <robin@gareus.org> | 2017-01-20 21:47:09 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-01-20 21:47:09 +0100 |
commit | 7960e1ddbfd0af2b9e3a538b67a05266cf0429e6 (patch) | |
tree | eb44ce30abf49f061fb42cece1031361dd1aeb6f /gtk2_ardour/ardour_ui.cc | |
parent | b588be2deada445b60f3f74a240835f74773e0ea (diff) |
GUI follow up for new-MIDI-track API change
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 7f5ceeef1d..3c7f1afde2 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1940,15 +1940,18 @@ ARDOUR_UI::session_add_mixed_track ( Plugin::PresetRecord* pset, ARDOUR::PresentationInfo::order_t order) { - list<boost::shared_ptr<MidiTrack> > tracks; - if (_session == 0) { warning << _("You cannot add a track without a session already loaded.") << endmsg; return; } + if (Profile->get_mixbus ()) { + strict_io = true; + } + try { - tracks = _session->new_midi_track (input, output, instrument, pset, route_group, how_many, name_template, order, ARDOUR::Normal); + list<boost::shared_ptr<MidiTrack> > tracks; + tracks = _session->new_midi_track (input, output, strict_io, instrument, pset, route_group, how_many, name_template, order, ARDOUR::Normal); if (tracks.size() != how_many) { error << string_compose(P_("could not create %1 new mixed track", "could not create %1 new mixed tracks", how_many), how_many) << endmsg; @@ -1959,12 +1962,6 @@ ARDOUR_UI::session_add_mixed_track ( display_insufficient_ports_message (); return; } - - if (strict_io) { - for (list<boost::shared_ptr<MidiTrack> >::iterator i = tracks.begin(); i != tracks.end(); ++i) { - (*i)->set_strict_io (true); - } - } } void @@ -1977,16 +1974,18 @@ ARDOUR_UI::session_add_midi_bus ( Plugin::PresetRecord* pset, ARDOUR::PresentationInfo::order_t order) { - RouteList routes; - if (_session == 0) { warning << _("You cannot add a track without a session already loaded.") << endmsg; return; } - try { + if (Profile->get_mixbus ()) { + strict_io = true; + } - routes = _session->new_midi_route (route_group, how_many, name_template, instrument, pset, PresentationInfo::MidiBus, order); + try { + RouteList routes; + routes = _session->new_midi_route (route_group, how_many, name_template, strict_io, instrument, pset, PresentationInfo::MidiBus, order); if (routes.size() != how_many) { error << string_compose(P_("could not create %1 new Midi Bus", "could not create %1 new Midi Busses", how_many), how_many) << endmsg; } @@ -1996,12 +1995,6 @@ ARDOUR_UI::session_add_midi_bus ( display_insufficient_ports_message (); return; } - - if (strict_io) { - for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) { - (*i)->set_strict_io (true); - } - } } void |