add a new constructor for RouteAutomationControllable that takes a ParameterDescriptor

This commit is contained in:
Paul Davis 2016-01-31 21:45:36 -05:00
parent e2a085190f
commit 9128fbd68f
3 changed files with 17 additions and 6 deletions

View File

@ -392,12 +392,11 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
boost::shared_ptr<AutomationList> alist,
boost::shared_ptr<Route> route);
void set_value (double val, PBD::Controllable::GroupControlDisposition group_override) {
boost::shared_ptr<Route> r = _route.lock();
if (r) {
r->set_control ((AutomationType) parameter().type(), val, group_override);
}
}
RouteAutomationControl (const std::string& name,
AutomationType atype,
const ParameterDescriptor& descriptor,
boost::shared_ptr<AutomationList> alist,
boost::shared_ptr<Route> route);
protected:
friend class Route;

View File

@ -57,6 +57,7 @@
#include "ardour/pannable.h"
#include "ardour/panner.h"
#include "ardour/panner_shell.h"
#include "ardour/parameter_descriptor.h"
#include "ardour/plugin_insert.h"
#include "ardour/port.h"
#include "ardour/port_insert.h"

View File

@ -22,6 +22,7 @@
#endif
#include "ardour/automation_control.h"
#include "ardour/parameter_descriptor.h"
#include "ardour/route.h"
#include "ardour/session.h"
@ -98,6 +99,16 @@ Route::RouteAutomationControl::RouteAutomationControl (const std::string& name,
{
}
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)