diff options
author | David Robillard <d@drobilla.net> | 2008-09-19 00:47:49 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-09-19 00:47:49 +0000 |
commit | d357eca668044badcb4bab318e2e74cfffa9a0b0 (patch) | |
tree | eab9bf33b194f9e37c20f84375e5caa748ee994a /gtk2_ardour/automation_controller.cc | |
parent | 3d976c5b727e4d55ce439b1d7c055a814477fa1a (diff) |
Factor out sequencing related things into an independant new library: "evoral".
Anything related to the storage of events/values over a range of time lives in evoral.
This includes MidiModel (Evoral::Sequence) and automation data (AutomationList (Evoral::ControlList),
Automatable (Evoral::ControlSet), etc).
libs/evoral synced with http://svn.drobilla.net/lad/trunk/evoral r1511.
git-svn-id: svn://localhost/ardour2/branches/3.0@3754 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r-- | gtk2_ardour/automation_controller.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index 0bf1482224..dc9b8bb2c4 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -61,12 +61,15 @@ AutomationController::~AutomationController() } boost::shared_ptr<AutomationController> -AutomationController::create(boost::shared_ptr<Automatable> parent, boost::shared_ptr<AutomationList> al, boost::shared_ptr<AutomationControl> ac) +AutomationController::create( + boost::shared_ptr<Automatable> parent, + boost::shared_ptr<Evoral::ControlList> cl, + boost::shared_ptr<AutomationControl> ac) { - Gtk::Adjustment* adjustment = manage(new Gtk::Adjustment(al->default_value(), al->get_min_y(), al->get_max_y())); + Gtk::Adjustment* adjustment = manage(new Gtk::Adjustment(cl->default_value(), cl->get_min_y(), cl->get_max_y())); if (!ac) { - PBD::warning << "Creating AutomationController for " << al->parameter().to_string() << endmsg; - ac = parent->control_factory(al); + PBD::warning << "Creating AutomationController for " << cl->parameter().symbol() << endmsg; + ac = boost::dynamic_pointer_cast<AutomationControl>(parent->control_factory(cl)); } return boost::shared_ptr<AutomationController>(new AutomationController(ac, adjustment)); } @@ -109,13 +112,13 @@ AutomationController::value_adjusted() void AutomationController::start_touch() { - _controllable->list()->start_touch(); + _controllable->start_touch(); } void AutomationController::end_touch() { - _controllable->list()->stop_touch(); + _controllable->stop_touch(); } void @@ -123,7 +126,7 @@ AutomationController::automation_state_changed () { ENSURE_GUI_THREAD(mem_fun(*this, &AutomationController::automation_state_changed)); - bool x = (_controllable->list()->automation_state() != Off); + bool x = (_controllable->automation_state() != Off); /* start watching automation so that things move */ |