diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-29 21:07:22 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-29 21:07:22 +0000 |
commit | d725fc2d1c16be97da968f5133150250e5b1ee2b (patch) | |
tree | 963eedbcec43efef43a642dcb4369e5cc7a2d960 /libs/ardour/session.cc | |
parent | 0dd2fb557c95f15672345e6368a478d25898a4d1 (diff) |
Make 'copy track gains to sends' and 'set sends gains' work with sends from busses. Partially fixes #3637.
git-svn-id: svn://localhost/ardour2/branches/3.0@8369 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index c80f9c3e2e..9212923f11 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2057,13 +2057,9 @@ Session::globally_set_send_gains_to_zero (boost::shared_ptr<Route> dest) boost::shared_ptr<RouteList> r = routes.reader (); boost::shared_ptr<Send> s; - /* only tracks */ - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (boost::dynamic_pointer_cast<Track>(*i)) { - if ((s = (*i)->internal_send_for (dest)) != 0) { - s->amp()->gain_control()->set_value (0.0); - } + if ((s = (*i)->internal_send_for (dest)) != 0) { + s->amp()->gain_control()->set_value (0.0); } } } @@ -2074,13 +2070,9 @@ Session::globally_set_send_gains_to_unity (boost::shared_ptr<Route> dest) boost::shared_ptr<RouteList> r = routes.reader (); boost::shared_ptr<Send> s; - /* only tracks */ - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (boost::dynamic_pointer_cast<Track>(*i)) { - if ((s = (*i)->internal_send_for (dest)) != 0) { - s->amp()->gain_control()->set_value (1.0); - } + if ((s = (*i)->internal_send_for (dest)) != 0) { + s->amp()->gain_control()->set_value (1.0); } } } @@ -2091,13 +2083,9 @@ Session::globally_set_send_gains_from_track(boost::shared_ptr<Route> dest) boost::shared_ptr<RouteList> r = routes.reader (); boost::shared_ptr<Send> s; - /* only tracks */ - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (boost::dynamic_pointer_cast<Track>(*i)) { - if ((s = (*i)->internal_send_for (dest)) != 0) { - s->amp()->gain_control()->set_value ((*i)->gain_control()->get_value()); - } + if ((s = (*i)->internal_send_for (dest)) != 0) { + s->amp()->gain_control()->set_value ((*i)->gain_control()->get_value()); } } } |