Merge branch 'ardour'
This commit is contained in:
commit
e4c0c3f4b6
@ -309,8 +309,6 @@ MixerStrip::init ()
|
||||
trim_control.set_tooltip_prefix (_("Trim: "));
|
||||
trim_control.set_name ("trim knob");
|
||||
trim_control.set_no_show_all (true);
|
||||
trim_control.StartGesture.connect(sigc::mem_fun(*this, &MixerStrip::trim_start_touch));
|
||||
trim_control.StopGesture.connect(sigc::mem_fun(*this, &MixerStrip::trim_end_touch));
|
||||
input_button_box.pack_start (trim_control, false, false);
|
||||
|
||||
global_vpacker.set_no_show_all ();
|
||||
@ -551,45 +549,6 @@ MixerStrip::update_trim_control ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::trim_start_touch (int)
|
||||
{
|
||||
assert (_route && _session);
|
||||
|
||||
if (!route()->trim() || !route()->trim()->active() || route()->n_inputs().n_audio() <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::shared_ptr<AutomationControl> control (route()->trim()->gain_control());
|
||||
|
||||
StripableList sl;
|
||||
_session->selection ().get_stripables_for_op (sl, _route, &RouteGroup::is_gain);
|
||||
|
||||
_touch_control_group.reset (new GainControlGroup (TrimAutomation));
|
||||
_touch_control_group->set_mode (ControlGroup::Relative);
|
||||
_touch_control_group->fill_from_stripable_list (sl, control->parameter());
|
||||
|
||||
control->start_touch (timepos_t (_session->transport_sample()));
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::trim_end_touch (int)
|
||||
{
|
||||
assert (_route && _session);
|
||||
|
||||
if (route()->trim() && route()->trim()->active() && route()->n_inputs().n_audio() > 0) {
|
||||
|
||||
std::shared_ptr<AutomationControl> control (route()->trim()->gain_control());
|
||||
|
||||
control->stop_touch (timepos_t (_session->transport_sample()));
|
||||
|
||||
if (_touch_control_group) {
|
||||
_touch_control_group->pop_all ();
|
||||
_touch_control_group.reset ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::set_route (std::shared_ptr<Route> rt)
|
||||
{
|
||||
|
@ -240,11 +240,6 @@ private:
|
||||
ArdourWidgets::ArdourButton* _loudess_analysis_button;
|
||||
std::shared_ptr<AutomationController> _volume_controller;
|
||||
|
||||
void trim_start_touch (int);
|
||||
void trim_end_touch (int);
|
||||
|
||||
std::shared_ptr<ARDOUR::ControlGroup> _touch_control_group;
|
||||
|
||||
void setup_comment_button ();
|
||||
|
||||
void loudess_analysis_button_clicked ();
|
||||
|
@ -44,6 +44,7 @@ class LIBARDOUR_API GainControl : public SlavableAutomationControl {
|
||||
protected:
|
||||
void post_add_master (std::shared_ptr<AutomationControl>);
|
||||
bool get_masters_curve_locked (samplepos_t, samplepos_t, float*, samplecnt_t) const;
|
||||
void actually_set_value (double value, PBD::Controllable::GroupControlDisposition);
|
||||
};
|
||||
|
||||
} /* namespace */
|
||||
|
@ -107,6 +107,17 @@ GainControl::inc_gain (gain_t factor)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GainControl::actually_set_value (double value, PBD::Controllable::GroupControlDisposition gcd)
|
||||
{
|
||||
const double max_factor = _desc.from_interface (1.0);
|
||||
const double min_factor = _desc.from_interface (0.0);
|
||||
|
||||
value = std::max (min_factor, std::min (value, max_factor));
|
||||
|
||||
SlavableAutomationControl::actually_set_value (value, gcd);
|
||||
}
|
||||
|
||||
void
|
||||
GainControl::post_add_master (std::shared_ptr<AutomationControl> m)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user