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 /libs/ardour/io.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 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 1b3c2e2378..69c74f5f03 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -137,7 +137,7 @@ IO::IO (Session& s, const string& name, deferred_state = 0; boost::shared_ptr<AutomationList> gl( - new AutomationList(Parameter(GainAutomation), 0.0, 2.0, 1.0)); + new AutomationList(Parameter(GainAutomation))); _gain_control = boost::shared_ptr<GainControl>( new GainControl(X_("gaincontrol"), *this, gl)); @@ -178,7 +178,7 @@ IO::IO (Session& s, const XMLNode& node, DataType dt) apply_gain_automation = false; boost::shared_ptr<AutomationList> gl( - new AutomationList(Parameter(GainAutomation), 0.0, 2.0, 1.0)); + new AutomationList(Parameter(GainAutomation))); _gain_control = boost::shared_ptr<GainControl>( new GainControl(X_("gaincontrol"), *this, gl)); @@ -1153,7 +1153,7 @@ IO::ensure_outputs (ChanCount count, bool clear, bool lockit, void* src) gain_t IO::effective_gain () const { - if (_gain_control->list()->automation_playback()) { + if (_gain_control->automation_playback()) { return _gain_control->get_value(); } else { return _desired_gain; @@ -2266,7 +2266,7 @@ IO::meter () void IO::clear_automation () { - Automatable::clear_automation (); // clears gain automation + Automatable::clear (); // clears gain automation _panner->clear_automation (); } @@ -2280,9 +2280,10 @@ IO::set_parameter_automation_state (Parameter param, AutoState state) bool changed = false; { - Glib::Mutex::Lock lm (_automation_lock); + Glib::Mutex::Lock lm (_control_lock); - boost::shared_ptr<AutomationList> gain_auto = _gain_control->list(); + boost::shared_ptr<AutomationList> gain_auto + = boost::dynamic_pointer_cast<AutomationList>(_gain_control->list()); if (state != gain_auto->automation_state()) { changed = true; @@ -2337,7 +2338,7 @@ IO::set_gain (gain_t val, void *src) _gain = val; } - if (_session.transport_stopped() && src != 0 && src != this && _gain_control->list()->automation_write()) { + if (_session.transport_stopped() && src != 0 && src != this && _gain_control->automation_write()) { _gain_control->list()->add (_session.transport_frame(), val); } @@ -2349,7 +2350,7 @@ void IO::start_pan_touch (uint32_t which) { if (which < _panner->size()) { - (*_panner)[which]->pan_control()->list()->start_touch(); + (*_panner)[which]->pan_control()->start_touch(); } } @@ -2357,7 +2358,7 @@ void IO::end_pan_touch (uint32_t which) { if (which < _panner->size()) { - (*_panner)[which]->pan_control()->list()->stop_touch(); + (*_panner)[which]->pan_control()->stop_touch(); } } @@ -2380,7 +2381,7 @@ IO::transport_stopped (nframes_t frame) { _gain_control->list()->reposition_for_rt_add (frame); - if (_gain_control->list()->automation_state() != Off) { + if (_gain_control->automation_state() != Off) { /* the src=0 condition is a special signal to not propagate automation gain changes into the mix group when locating. |