diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 375de28784..951557ac3f 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -102,14 +102,14 @@ AutomationControl::get_value() const * (possibly ahead of time, according to latency compensation), * and actually_set_value() will have set the user-value accordingly. */ - return Control::user_double(); + return Control::get_double(); } double AutomationControl::get_save_value() const { /* save user-value, not incl masters */ - return Control::user_double (); + return Control::get_double (); } void @@ -210,7 +210,7 @@ AutomationControl::actually_set_value (double value, PBD::Controllable::GroupCon anything has changed) is the one derived from the automation event list. */ - float old_value = Control::user_double(); + float old_value = Control::get_double(); if (al && al->automation_write ()) { to_list = true; diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc index 783c2626ca..4d27e539cf 100644 --- a/libs/ardour/automation_watch.cc +++ b/libs/ardour/automation_watch.cc @@ -172,7 +172,7 @@ AutomationWatch::timer () if (time > _last_time) { //we only write automation in the forward direction; this fixes automation-recording in a loop for (AutomationWatches::iterator aw = automation_watches.begin(); aw != automation_watches.end(); ++aw) { if ((*aw)->alist()->automation_write()) { - double val = (*aw)->user_double(); + double val = (*aw)->get_double(); boost::shared_ptr sc = boost::dynamic_pointer_cast (*aw); if (sc) { val = sc->reduce_by_masters (val, true); diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 8807c692c6..f1cee4aa90 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -373,7 +373,7 @@ MidiTrack::update_controls (BufferSet const& bufs) const Evoral::Parameter param = midi_parameter(ev.buffer(), ev.size()); const boost::shared_ptr control = automation_control (param); if (control) { - double old = control->user_double (); + double old = control->get_double (); control->set_double (ev.value(), timepos_t::zero (false), false); if (old != ev.value()) { control->Changed (false, Controllable::NoGroup); diff --git a/libs/ardour/mixer_scene.cc b/libs/ardour/mixer_scene.cc index f31f4578f1..0a7901f22d 100644 --- a/libs/ardour/mixer_scene.cc +++ b/libs/ardour/mixer_scene.cc @@ -105,7 +105,7 @@ MixerScene::recurse_to_master (boost::shared_ptr c, std::set return false; } - double old_value = ac ? ac->user_double () : c->get_value (); + double old_value = ac ? ac->get_double () : c->get_value (); if (sc && sc->slaved ()) { double x = sc->reduce_by_masters (1.0); diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc index 141dfa9fe7..3fd46201a0 100644 --- a/libs/ardour/slavable_automation_control.cc +++ b/libs/ardour/slavable_automation_control.cc @@ -86,7 +86,7 @@ SlavableAutomationControl::get_value_locked() const /* read or write masters lock must be held */ if (_masters.empty()) { - return Control::user_double (); + return Control::get_double (); } if (_desc.toggled) { @@ -94,12 +94,12 @@ SlavableAutomationControl::get_value_locked() const * enabled, this slave is enabled. So check our own value * first, because if we are enabled, we can return immediately. */ - if (Control::user_double ()) { + if (Control::get_double ()) { return _desc.upper; } } - return Control::user_double () * get_masters_value_locked (); + return Control::get_double () * get_masters_value_locked (); } /** Get the current effective `user' value based on automation state */ @@ -109,7 +109,7 @@ SlavableAutomationControl::get_value() const Glib::Threads::RWLock::ReaderLock lm (master_lock); if (!_masters.empty() && automation_write ()) { /* writing automation takes the fader value as-is, factor out the master */ - return Control::user_double (); + return Control::get_double (); } return get_value_locked (); } @@ -137,7 +137,7 @@ SlavableAutomationControl::masters_curve_multiply (timepos_t const & start, time vec[i] *= scratch[i]; } } else { - apply_gain_to_buffer (vec, veclen, Control::user_double ()); + apply_gain_to_buffer (vec, veclen, Control::get_double ()); } if (_masters.empty()) { return rv; @@ -332,7 +332,7 @@ SlavableAutomationControl::remove_master (boost::shared_ptr m pre_remove_master (m); - const double old_val = AutomationControl::user_double(); + const double old_val = AutomationControl::get_double (); bool update_value = false; double master_ratio = 0; @@ -400,7 +400,7 @@ SlavableAutomationControl::clear_masters () return; } - const double old_val = AutomationControl::user_double (); + const double old_val = AutomationControl::get_double (); ControlList masters; bool update_value = false; diff --git a/libs/evoral/evoral/Control.h b/libs/evoral/evoral/Control.h index e43fb5c707..a049803fe3 100644 --- a/libs/evoral/evoral/Control.h +++ b/libs/evoral/evoral/Control.h @@ -63,6 +63,7 @@ public: * and adding it to the ControlList. */ double user_double() const { return _user_value; } + virtual double get_double () const { return _user_value; } void set_list(boost::shared_ptr);