summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2015-12-09 09:21:36 -0800
committerLen Ovens <len@ovenwerks.net>2015-12-09 09:21:36 -0800
commite18ea188f45be0c30497e175907799daeed02cd4 (patch)
tree4dbcedb8e9422ff862f42ef7fc5e7407a4dd6a47 /libs/ardour
parentba3936391a35c38772d4de92e9b12ca4e470acbb (diff)
Fix Mackie control Gain while in flip mode (vpot control of gain)
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/route.h3
-rw-r--r--libs/ardour/route.cc15
2 files changed, 13 insertions, 5 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index af2a7f78a0..2bafcf3b63 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -427,8 +427,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
public:
GroupGainControllable (std::string name, boost::shared_ptr<Route>);
void set_value (double);
- // We get the value from the amp where we get the changed signal from
- //double get_value () const;
+ double get_value () const;
private:
boost::weak_ptr<Route> _route;
};
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 53630d4e9c..6ee55fc26e 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -136,17 +136,14 @@ Route::init ()
_solo_control.reset (new SoloControllable (X_("solo"), shared_from_this ()));
_mute_control.reset (new MuteControllable (X_("mute"), shared_from_this ()));
_phase_control.reset (new PhaseControllable (X_("phase"), shared_from_this ()));
- _group_gain_control.reset (new GroupGainControllable (X_("groupgain"), shared_from_this ()));
_solo_control->set_flags (Controllable::Flag (_solo_control->flags() | Controllable::Toggle));
_mute_control->set_flags (Controllable::Flag (_mute_control->flags() | Controllable::Toggle));
_phase_control->set_flags (Controllable::Flag (_phase_control->flags() | Controllable::Toggle));
- _group_gain_control->set_flags (Controllable::Flag (_group_gain_control->flags() | Controllable::GainLike));
add_control (_solo_control);
add_control (_mute_control);
add_control (_phase_control);
- add_control (_group_gain_control);
/* panning */
@@ -177,6 +174,11 @@ Route::init ()
_amp.reset (new Amp (_session));
add_processor (_amp, PostFader);
+ // amp should exist before amp controls
+ _group_gain_control.reset (new GroupGainControllable (X_("groupgain"), shared_from_this ()));
+ _group_gain_control->set_flags (Controllable::Flag (_group_gain_control->flags() | Controllable::GainLike));
+ add_control (_group_gain_control);
+
/* and input trim */
_trim.reset (new Amp (_session, "trim"));
_trim->set_display_to_user (false);
@@ -3998,6 +4000,13 @@ Route::GroupGainControllable::set_value (double val)
r->set_gain ((gain_t)normalized_position, this);
}
+double
+Route::GroupGainControllable::get_value () const
+{
+ boost::shared_ptr<Route> r = _route.lock ();
+ return 2.0 * r->gain_control()->internal_to_interface (r->gain_control()->get_value ());
+}
+
Route::PhaseControllable::PhaseControllable (std::string name, boost::shared_ptr<Route> r)
: AutomationControl (r->session(),
Evoral::Parameter (PhaseAutomation),