summaryrefslogtreecommitdiff
path: root/libs/ardour/automatable.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/automatable.cc')
-rw-r--r--libs/ardour/automatable.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc
index 4de2e89b41..903ae5df75 100644
--- a/libs/ardour/automatable.cc
+++ b/libs/ardour/automatable.cc
@@ -456,9 +456,10 @@ Automatable::control_factory(const Evoral::Parameter& param)
warning << "GainAutomation for non-Amp" << endl;
}
} else if (param.type() == PanAutomation) {
- Panner* me = dynamic_cast<Panner*>(this);
- if (me) {
- control = new Panner::PanControllable(me->session(), X_("panner"), *me, param);
+ Panner* panner = dynamic_cast<Panner*>(this);
+ if (panner) {
+ StreamPanner& sp (panner->streampanner (param.channel()));
+ control = new StreamPanner::PanControllable (_a_session, X_("direction"), sp, param);
} else {
warning << "PanAutomation for non-Panner" << endl;
}