AutomationType atype,
boost::shared_ptr<AutomationList> alist,
boost::shared_ptr<Route> route);
-
- RouteAutomationControl (const std::string& name,
- AutomationType atype,
- const ParameterDescriptor& descriptor,
- boost::shared_ptr<AutomationList> alist,
- boost::shared_ptr<Route> route);
-
protected:
friend class Route;
double get_value () const;
private:
void _set_value (double, PBD::Controllable::GroupControlDisposition group_override);
- static ParameterDescriptor get_descriptor ();
};
class LIBARDOUR_API SoloSafeControllable : public RouteAutomationControl {
double get_value () const;
private:
void _set_value (double, PBD::Controllable::GroupControlDisposition group_override);
- static ParameterDescriptor get_descriptor ();
};
void set_control (AutomationType, double val, PBD::Controllable::GroupControlDisposition group_override);
{
}
-Route::RouteAutomationControl::RouteAutomationControl (const std::string& name,
- AutomationType atype,
- const ParameterDescriptor& desc,
- boost::shared_ptr<AutomationList> alist,
- boost::shared_ptr<Route> r)
- : AutomationControl (r->session(), Evoral::Parameter (atype), desc, alist, name)
- , _route (r)
-{
-}
-
Route::GainControllable::GainControllable (Session& s, AutomationType atype, boost::shared_ptr<Route> r)
: GainControl (s, Evoral::Parameter(atype))
, _route (r)
Route::PhaseControllable::get_value () const
{
boost::shared_ptr<Route> r = _route.lock ();
+ if (!r) {
+ return 0.0;
+ }
return (double) r->phase_invert (_current_phase);
}
}
Route::SoloIsolateControllable::SoloIsolateControllable (std::string name, boost::shared_ptr<Route> r)
- : RouteAutomationControl (name, SoloIsolateAutomation, get_descriptor(), boost::shared_ptr<AutomationList>(), r)
+ : RouteAutomationControl (name, SoloIsolateAutomation, boost::shared_ptr<AutomationList>(), r)
{
boost::shared_ptr<AutomationList> gl(new AutomationList(Evoral::Parameter(SoloIsolateAutomation)));
gl->set_interpolation(Evoral::ControlList::Discrete);
r->set_solo_isolated (val >= 0.5 ? true : false);
}
-ParameterDescriptor
-Route::SoloIsolateControllable::get_descriptor()
-{
- ParameterDescriptor desc;
- desc.type = SoloIsolateAutomation;
- desc.toggled = true;
- return desc;
-}
-
Route::SoloSafeControllable::SoloSafeControllable (std::string name, boost::shared_ptr<Route> r)
- : RouteAutomationControl (name, SoloSafeAutomation, get_descriptor(), boost::shared_ptr<AutomationList>(), r)
+ : RouteAutomationControl (name, SoloSafeAutomation, boost::shared_ptr<AutomationList>(), r)
{
boost::shared_ptr<AutomationList> gl(new AutomationList(Evoral::Parameter(SoloSafeAutomation)));
gl->set_interpolation(Evoral::ControlList::Discrete);
return r->solo_safe() ? 1.0 : 0.0;
}
-ParameterDescriptor
-Route::SoloSafeControllable::get_descriptor()
-{
- ParameterDescriptor desc;
- desc.type = SoloSafeAutomation;
- desc.toggled = true;
- return desc;
-}
}
Track::MonitoringControllable::MonitoringControllable (std::string name, boost::shared_ptr<Track> r)
- : RouteAutomationControl (name, MonitoringAutomation, get_descriptor(), boost::shared_ptr<AutomationList>(), r)
+ : RouteAutomationControl (name, MonitoringAutomation, boost::shared_ptr<AutomationList>(), r)
{
boost::shared_ptr<AutomationList> gl(new AutomationList(Evoral::Parameter(MonitoringAutomation)));
gl->set_interpolation(Evoral::ControlList::Discrete);
return t->monitoring_choice();
}
-
-ParameterDescriptor
-Track::MonitoringControllable::get_descriptor()
-{
- ParameterDescriptor desc;
- desc.type = MonitoringAutomation;
- desc.enumeration = true;
- desc.integer_step = true;
- desc.lower = MonitorAuto;
- desc.upper = MonitorDisk; /* XXX bump when we add MonitorCue */
- return desc;
-}