diff options
author | Carl Hetherington <carl@carlh.net> | 2011-01-04 02:36:29 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-01-04 02:36:29 +0000 |
commit | 6933d6f9455c3a886452ca80c93a038c6ace8632 (patch) | |
tree | 2407e09410b6e2b2bdc7ff87aad1e4311dd0172d /libs/ardour/route_group.cc | |
parent | 5af89174608f595b45a2ed2bcbe9b0500e0803fb (diff) |
Allow choice of direct or aux busses when subgrouping route groups. Fixes #3658.
git-svn-id: svn://localhost/ardour2/branches/3.0@8428 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route_group.cc')
-rw-r--r-- | libs/ardour/route_group.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc index 629216da39..a9e942ef3a 100644 --- a/libs/ardour/route_group.cc +++ b/libs/ardour/route_group.cc @@ -387,7 +387,7 @@ RouteGroup::audio_track_group (set<boost::shared_ptr<AudioTrack> >& ats) } void -RouteGroup::make_subgroup () +RouteGroup::make_subgroup (bool aux, Placement placement) { RouteList rl; uint32_t nin = 0; @@ -407,7 +407,7 @@ RouteGroup::make_subgroup () try { /* use master bus etc. to determine default nouts */ - rl = _session.new_audio_route (false, nin, 2, 0, 1); + rl = _session.new_audio_route (aux, nin, 2, 0, 1); } catch (...) { return; } @@ -415,11 +415,18 @@ RouteGroup::make_subgroup () subgroup_bus = rl.front(); subgroup_bus->set_name (_name); - boost::shared_ptr<Bundle> bundle = subgroup_bus->input()->bundle (); + if (aux) { - for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { - (*i)->output()->disconnect (this); - (*i)->output()->connect_ports_to_bundle (bundle, this); + _session.add_internal_sends (subgroup_bus, placement, routes); + + } else { + + boost::shared_ptr<Bundle> bundle = subgroup_bus->input()->bundle (); + + for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { + (*i)->output()->disconnect (this); + (*i)->output()->connect_ports_to_bundle (bundle, this); + } } } |