diff options
author | Carl Hetherington <carl@carlh.net> | 2011-08-30 15:43:49 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-08-30 15:43:49 +0000 |
commit | e400a2ea24cc473ecd81e1266354ecbc247789da (patch) | |
tree | 4143165cecf656bdddf89642e420ef24d38743d3 /libs/ardour/route_group.cc | |
parent | 74330533b887821495cb5e1bb48e7439c656ba0c (diff) |
Tidy formatting some more.
git-svn-id: svn://localhost/ardour2/branches/3.0@10034 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route_group.cc')
-rw-r--r-- | libs/ardour/route_group.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc index 4e9baa082e..ae2545a3ea 100644 --- a/libs/ardour/route_group.cc +++ b/libs/ardour/route_group.cc @@ -171,31 +171,30 @@ RouteGroup::remove (boost::shared_ptr<Route> r) gain_t -RouteGroup::get_min_factor(gain_t factor) +RouteGroup::get_min_factor (gain_t factor) { - gain_t g; - for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { - g = (*i)->amp()->gain(); + gain_t const g = (*i)->amp()->gain(); - if ( (g+g*factor) >= 0.0f) + if ((g + g * factor) >= 0.0f) { continue; + } - if ( g <= 0.0000003f ) + if (g <= 0.0000003f) { return 0.0f; + } - factor = 0.0000003f/g - 1.0f; + factor = 0.0000003f / g - 1.0f; } + return factor; } gain_t -RouteGroup::get_max_factor(gain_t factor) +RouteGroup::get_max_factor (gain_t factor) { - gain_t g; - for (RouteList::iterator i = routes->begin(); i != routes->end(); i++) { - g = (*i)->amp()->gain(); + gain_t const g = (*i)->amp()->gain(); // if the current factor woulnd't raise this route above maximum if ((g + g * factor) <= 1.99526231f) { |