Fix Mackie control Gain while in flip mode (vpot control of gain)
This commit is contained in:
parent
ba3936391a
commit
e18ea188f4
@ -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;
|
||||
};
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user