handle sidechain input changes
[ardour.git] / libs / ardour / route_group.cc
index 036aede02eb07196ffba7e9818441321994b6db7..9ad5aa91e6cfc16fd7caa47b0ad91446707b42c7 100644 (file)
@@ -24,6 +24,7 @@
 #include "pbd/error.h"
 #include "pbd/enumwriter.h"
 #include "pbd/strsplit.h"
+#include "pbd/debug.h"
 
 #include "ardour/amp.h"
 #include "ardour/audio_track.h"
@@ -178,7 +179,7 @@ gain_t
 RouteGroup::get_min_factor (gain_t factor)
 {
        for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-               gain_t const g = (*i)->amp()->gain();
+               gain_t const g = (*i)->gain_control()->get_value();
 
                if ((g + g * factor) >= 0.0f) {
                        continue;
@@ -198,7 +199,7 @@ gain_t
 RouteGroup::get_max_factor (gain_t factor)
 {
        for (RouteList::iterator i = routes->begin(); i != routes->end(); i++) {
-               gain_t const g = (*i)->amp()->gain();
+               gain_t const g = (*i)->gain_control()->get_value();
 
                // if the current factor woulnd't raise this route above maximum
                if ((g + g * factor) <= 1.99526231f) {