Remove unused "mark" parameter from stop_touch() API
authorRobin Gareus <robin@gareus.org>
Sun, 23 Jul 2017 23:22:50 +0000 (01:22 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 23 Jul 2017 23:59:18 +0000 (01:59 +0200)
27 files changed:
gtk2_ardour/automation_controller.cc
gtk2_ardour/gain_meter.cc
gtk2_ardour/lv2_plugin_ui.cc
gtk2_ardour/panner_ui.cc
gtk2_ardour/processor_box.cc
gtk2_ardour/route_ui.cc
libs/ardour/ardour/automation_control.h
libs/ardour/ardour/automation_list.h
libs/ardour/ardour/pannable.h
libs/ardour/automatable.cc
libs/ardour/automation_control.cc
libs/ardour/automation_list.cc
libs/ardour/automation_watch.cc
libs/ardour/lv2_plugin.cc
libs/ardour/pannable.cc
libs/ardour/plugin_insert.cc
libs/surfaces/cc121/cc121.cc
libs/surfaces/faderport/faderport.cc
libs/surfaces/faderport8/fp8_strip.cc
libs/surfaces/mackie/controls.cc
libs/surfaces/mackie/controls.h
libs/surfaces/mackie/mcp_buttons.cc
libs/surfaces/mackie/strip.cc
libs/surfaces/osc/osc.cc
libs/surfaces/push2/mix.cc
libs/surfaces/push2/push2.cc
libs/surfaces/push2/track_mix.cc

index c151b72d14d431c716644af5f4a43d7f19748372..d53c61432ebcc0f06e04855d563aeb71e18fa6d2 100644 (file)
@@ -200,20 +200,7 @@ AutomationController::start_touch()
 void
 AutomationController::end_touch ()
 {
-       if (_controllable->automation_state() == Touch) {
-
-               bool mark = false;
-               double when = 0;
-
-               if (_controllable->session().transport_rolling()) {
-                       mark = true;
-                       when = _controllable->session().transport_frame();
-               }
-
-               _controllable->stop_touch (mark, when);
-       } else {
-               _controllable->stop_touch (false, _controllable->session().transport_frame());
-       }
+       _controllable->stop_touch (_controllable->session().transport_frame());
 }
 
 bool
index ab90de88628897c6cb3ae6304f659d1c8b841cf2..0b063ff8863c5370181664315e4b6d252769d262 100644 (file)
@@ -737,7 +737,7 @@ GainMeterBase::amp_start_touch ()
 void
 GainMeterBase::amp_stop_touch ()
 {
-       _control->stop_touch (false, _control->session().transport_frame());
+       _control->stop_touch (_control->session().transport_frame());
        effective_gain_display ();
 }
 
index 7f735dfcc54f9dd479480cfa9121567370cddd6d..d7f6708d00d50d6186750100dc767933f08d974f 100644 (file)
@@ -105,7 +105,7 @@ LV2PluginUI::touch(void*    controller,
        if (grabbed) {
                control->start_touch(control->session().transport_frame());
        } else {
-               control->stop_touch(false, control->session().transport_frame());
+               control->stop_touch(control->session().transport_frame());
        }
 }
 
index 0fd588dfdfb6abd43e494dd36f9a89fa54f06bb3..a394932306dcd8aa712b0e568c6c86ec52d0eb02 100644 (file)
@@ -352,7 +352,7 @@ PannerUI::stop_touch (boost::weak_ptr<AutomationControl> wac)
        if (!ac) {
                return;
        }
-       ac->stop_touch (false, ac->session().transport_frame());
+       ac->stop_touch (ac->session().transport_frame());
 }
 
 bool
index 8b353c040ee2677c561e40e9ea6c2e7faeb5c029..3e39e639f2e4d76ba041733c0d95d32a8da02f24 100644 (file)
@@ -921,7 +921,7 @@ ProcessorEntry::Control::end_touch ()
        if (!c) {
                return;
        }
-       c->stop_touch (true, c->session().transport_frame());
+       c->stop_touch (c->session().transport_frame());
 }
 
 void
index a935ec3c5d2633d54046f75547e716e3e09bc1c5..d2707f5476f35e13d21a8a35d48e05a68163b395 100644 (file)
@@ -531,7 +531,7 @@ RouteUI::mute_release (GdkEventButton* /*ev*/)
                _mute_release = 0;
        }
 
-       _route->mute_control()->stop_touch (false, _session->audible_frame ());
+       _route->mute_control()->stop_touch (_session->audible_frame ());
 
        return false;
 }
index 0ac4a08c7b5e1435e9c0bc2e86f863a83fbf3b85..6ffcb3b866cf5dd12c6acac3d1967b1f47eccd2f 100644 (file)
@@ -84,7 +84,7 @@ public:
 
        void set_automation_state(AutoState as);
        void start_touch(double when);
-       void stop_touch(bool mark, double when);
+       void stop_touch(double when);
 
        /* inherited from PBD::Controllable. */
        virtual double get_value () const;
index 9810275ed14c15273b63b8f648d07f1b60bd27e8..65268d503aeefd154a02e897bd5851224d8fd69c 100644 (file)
@@ -103,7 +103,7 @@ public:
        void write_pass_finished (double when, double thinning_factor=0.0);
 
        void start_touch (double when);
-       void stop_touch (bool mark, double when);
+       void stop_touch (double when);
        bool touching() const { return g_atomic_int_get (const_cast<gint*>(&_touching)); }
        bool writing() const { return _state == Write; }
        bool touch_enabled() const { return _state == Touch; }
index bdac2708915f04e3e3247dd4244ee19846652914..cd88a250cfb6bdc92076d219a644087de6a5086e 100644 (file)
@@ -67,7 +67,7 @@ class LIBARDOUR_API Pannable : public PBD::Stateful, public Automatable, public
        std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
 
        void start_touch (double when);
-       void stop_touch (bool mark, double when);
+       void stop_touch (double when);
         bool touching() const { return g_atomic_int_get (const_cast<gint*>(&_touching)); }
        bool writing() const { return _auto_state == Write; }
        bool touch_enabled() const { return _auto_state == Touch; }
index 19678ec19c4a6cd94f8b9423cc6d76e4d7fe280d..a8f755da5e15c9bc89ef689a714c0e109c43c441 100644 (file)
@@ -379,7 +379,7 @@ Automatable::non_realtime_transport_stop (framepos_t now, bool /*flush_processor
                */
                const bool list_did_write = !l->in_new_write_pass ();
 
-               l->stop_touch (true, now);
+               l->stop_touch (now);
 
                c->commit_transaction (list_did_write);
 
index c3ad2481d6ecfe881628c152161a4b8d94565a6a..274e84f9f072f2848d08dbd054d4e5416e84bf8a 100644 (file)
@@ -291,17 +291,16 @@ AutomationControl::start_touch(double when)
 }
 
 void
-AutomationControl::stop_touch(bool mark, double when)
+AutomationControl::stop_touch(double when)
 {
        if (!_list) return;
        if (touching()) {
                set_touching (false);
 
                if (alist()->automation_state() == Touch) {
-                       alist()->stop_touch (mark, when);
+                       alist()->stop_touch (when);
                        if (!_desc.toggled) {
                                AutomationWatch::instance().remove_automation_watch (shared_from_this());
-
                        }
                }
        }
index 27bc64462e336debfbff88ed283e38c201a62d3d..74181d551449ffb3a5ac62ebbcee0957fc42884a 100644 (file)
@@ -257,7 +257,7 @@ AutomationList::start_touch (double when)
 }
 
 void
-AutomationList::stop_touch (bool mark, double)
+AutomationList::stop_touch (double)
 {
        if (g_atomic_int_get (&_touching) == 0) {
                /* this touch has already been stopped (probably by Automatable::transport_stopped),
@@ -267,16 +267,6 @@ AutomationList::stop_touch (bool mark, double)
        }
 
        g_atomic_int_set (&_touching, 0);
-
-        if (_state == Touch) {
-
-                if (mark) {
-
-                       /* XXX need to mark the last added point with the
-                        * current time
-                        */
-                }
-        }
 }
 
 /* _before may be owned by the undo stack,
index d1118e7669303466dfee8648f3dcf63afd0ee849..a7a7a36eedd4f6e61e8e5d69e355ad906a79711d 100644 (file)
@@ -138,7 +138,7 @@ AutomationWatch::transport_stop_automation_watches (framepos_t when)
        }
 
        for (AutomationWatches::iterator i = tmp.begin(); i != tmp.end(); ++i) {
-               (*i)->stop_touch (true, when);
+               (*i)->stop_touch (when);
        }
 }
 
index d1cf26f266d1067d493dc8e61adb542770f26bb8..2911c6c7639a89c5fa754f2244c8a7e393650386 100644 (file)
@@ -2811,7 +2811,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
                                                                AutomationCtrlPtr c = get_automation_control (p);
                                                                DEBUG_TRACE(DEBUG::LV2Automate, string_compose ("End Touch p: %1\n", p));
                                                                if (c) {
-                                                                       c->ac->stop_touch (true, std::max ((framepos_t)0, start - _current_latency));
+                                                                       c->ac->stop_touch (std::max ((framepos_t)0, start - _current_latency));
                                                                }
                                                        }
                                                }
index 1298b85d9080d82fc4ddc7e7e97079bfd3814253..32bf2fe33f25f04d9fa66ea8e22d568722365221 100644 (file)
@@ -150,14 +150,14 @@ Pannable::start_touch (double when)
 }
 
 void
-Pannable::stop_touch (bool mark, double when)
+Pannable::stop_touch (double when)
 {
        const Controls& c (controls());
 
        for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
                boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
                if (ac) {
-                       ac->alist()->stop_touch (mark, when);
+                       ac->alist()->stop_touch (when);
                }
        }
        g_atomic_int_set (&_touching, 0);
index 7c9c71ccf01e47c619bc21438b8b09b31717625c..762b87149ee5953f77c77389f92a8cc0d4e5149e 100644 (file)
@@ -3078,7 +3078,7 @@ PluginInsert::end_touch (uint32_t param_id)
        boost::shared_ptr<AutomationControl> ac = automation_control (Evoral::Parameter (PluginAutomation, 0, param_id));
        if (ac) {
                // ToDo subtract _plugin_signal_latency  from audible_frame() when rolling, assert > 0
-               ac->stop_touch (true, session().audible_frame());
+               ac->stop_touch (session().audible_frame());
        }
 }
 
index 19301b86b8f84148443e9cc399e588d0bafd1112..b00fbbb54150cb743cc2f5c4739db2114058774d 100644 (file)
@@ -364,7 +364,7 @@ CC121::button_release_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
            boost::shared_ptr<AutomationControl> gain = _current_stripable->gain_control ();
            if (gain) {
              framepos_t now = session->engine().sample_time();
-             gain->stop_touch (true, now);
+             gain->stop_touch (now);
            }
          }
          break;
index 8e106c7948f9a73fd68b4c13507988f10371d4dd..4e65fec3cc08ae792bae526f502c44c707ef12a4 100644 (file)
@@ -379,7 +379,7 @@ FaderPort::button_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
                                if (tb->value) {
                                        gain->start_touch (now);
                                } else {
-                                       gain->stop_touch (true, now);
+                                       gain->stop_touch (now);
                                }
                        }
                }
index f1d6176829e018a36a28abf7817977bc4c7f1e7e..b811e7c88ffdaebf43ec9a2d169059e2d46eb627 100644 (file)
@@ -301,7 +301,7 @@ FP8Strip::midi_touch (bool t)
                        ac->start_touch (ac->session().transport_frame());
                }
        } else {
-               ac->stop_touch (true, ac->session().transport_frame());
+               ac->stop_touch (ac->session().transport_frame());
        }
        return true;
 }
index aa7112a7ecb44db2020ff0f0ea53e9124bb0be5f..7a74fc451e874982f23c97c640c06bc082da2836 100644 (file)
@@ -104,10 +104,10 @@ Control::start_touch (double when)
 }
 
 void
-Control::stop_touch (bool mark, double when)
+Control::stop_touch (double when)
 {
        if (normal_ac) {
-               return normal_ac->stop_touch (mark, when);
+               return normal_ac->stop_touch (when);
        }
 }
 
index c53be76891df4d3d7fb18cf7e5949ed927cae89a..e5d723a7d1e2a2945c3ee2bd04e8abbf5bef7cdd 100644 (file)
@@ -74,7 +74,7 @@ public:
        void set_value (float val, PBD::Controllable::GroupControlDisposition gcd = PBD::Controllable::UseGroup);
 
        virtual void start_touch (double when);
-       virtual void stop_touch (bool mark, double when);
+       virtual void stop_touch (double when);
 
   protected:
        boost::shared_ptr<ARDOUR::AutomationControl> normal_ac;
index 3bdf51c4b9e44840c44caaac72c97c61a66c6b02..a8998f960d440967b46b071c6233e1d979c7b9be 100644 (file)
@@ -852,7 +852,7 @@ MackieControlProtocol::master_fader_touch_release (Mackie::Button &)
        Fader* master_fader = _master_surface->master_fader();
 
        master_fader->set_in_use (false);
-       master_fader->stop_touch (transport_frame(), true);
+       master_fader->stop_touch (transport_frame());
 
        return none;
 }
index 87e078d639124ee325d4342bcbf84c07b88cda2d..de9aa89c8a992ec96e16f9de0dadb20e5022e8dc 100644 (file)
@@ -799,7 +799,7 @@ Strip::fader_touch_event (Button&, ButtonState bs)
        } else {
 
                _fader->set_in_use (false);
-               _fader->stop_touch (_surface->mcp().transport_frame(), true);
+               _fader->stop_touch (_surface->mcp().transport_frame());
 
        }
 }
@@ -949,7 +949,7 @@ Strip::handle_fader_touch (Fader& fader, bool touch_on)
        if (touch_on) {
                fader.start_touch (_surface->mcp().transport_frame());
        } else {
-               fader.stop_touch (_surface->mcp().transport_frame(), false);
+               fader.stop_touch (_surface->mcp().transport_frame());
        }
 }
 
index 84c8b47e7475b9376c8d3b70cb722d9251791307..dfe87bbccaefaf15b1ade8b3e5dba9c5d675bf93 100644 (file)
@@ -2838,7 +2838,7 @@ OSC::touch_detect (const char *path, const char* types, lo_arg **argv, int argc,
                                ret = 0;
                        } else {
                                // end touch
-                               control->stop_touch (true, control->session().transport_frame());
+                               control->stop_touch (control->session().transport_frame());
                                ret = 0;
                        }
                        // just in case some crazy surface starts sending control values before touch
@@ -4844,7 +4844,7 @@ OSC::periodic (void)
                if (!(*x).second) {
                        boost::shared_ptr<ARDOUR::AutomationControl> ctrl = (*x).first;
                        // turn touch off
-                       ctrl->stop_touch (true, ctrl->session().transport_frame());
+                       ctrl->stop_touch (ctrl->session().transport_frame());
                        _touch_timeout.erase (x++);
                } else {
                        x++;
index fb2bfd222f55d5e6735dc88ab1b5846a1751a3cb..f012e916734e2bde648875149235331809b69d4f 100644 (file)
@@ -437,7 +437,7 @@ MixLayout::strip_vpot_touch (int n, bool touching)
                        if (touching) {
                                ac->start_touch (session.audible_frame());
                        } else {
-                               ac->stop_touch (true, session.audible_frame());
+                               ac->stop_touch (session.audible_frame());
                        }
                }
        }
index 7b9a348841ac2e0f184a844e1e8b8f8e21b513d5..f29ff41d0658088039df1f08c4435841a5b78ed7 100644 (file)
@@ -1082,7 +1082,7 @@ Push2::other_vpot_touch (int n, bool touching)
                                if (touching) {
                                        ac->start_touch (session->audible_frame());
                                } else {
-                                       ac->stop_touch (true, session->audible_frame());
+                                       ac->stop_touch (session->audible_frame());
                                }
                        }
                }
index ed4c9c3aa3747f3118f02bb9bc7d42f7188bf750..a12ca84cf0770b273131420ba622474394dd8522 100644 (file)
@@ -572,7 +572,7 @@ TrackMixLayout::strip_vpot_touch (int n, bool touching)
                if (touching) {
                        ac->start_touch (session.audible_frame());
                } else {
-                       ac->stop_touch (true, session.audible_frame());
+                       ac->stop_touch (session.audible_frame());
                }
        }
 }