From 38c61b6dab3b1ae926ec4b791c1fa4dd04463664 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 26 Apr 2020 22:59:54 -0600 Subject: fix design and implementation of (GUI) transport controllables to make them usable with MIDI CC control The old code meant that their current value was always zero, and that they would do nothing unless the new value exceeded 0.5 --- gtk2_ardour/transport_control.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gtk2_ardour/transport_control.h') diff --git a/gtk2_ardour/transport_control.h b/gtk2_ardour/transport_control.h index bc38cd3c09..c3f7f0192a 100644 --- a/gtk2_ardour/transport_control.h +++ b/gtk2_ardour/transport_control.h @@ -22,6 +22,8 @@ #include #include "pbd/controllable.h" +#include "ardour/session_handle.h" + /* This is an API implemenetd by AROUR_UI, * and made available to transport-control-UIs */ @@ -34,7 +36,7 @@ public: /* show metronome preferences */ virtual bool click_button_clicked (GdkEventButton *) = 0; - struct TransportControllable : public PBD::Controllable { + struct TransportControllable : public PBD::Controllable, public ARDOUR::SessionHandlePtr { enum ToggleType { Roll = 0, Stop, @@ -47,7 +49,7 @@ public: TransportControllable (std::string name, ToggleType); void set_value (double, PBD::Controllable::GroupControlDisposition group_override); - double get_value (void) const { return 0; } + double get_value (void) const; ToggleType type; }; -- cgit v1.2.3