summaryrefslogtreecommitdiff
path: root/gtk2_ardour/transport_control.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-04-26 22:59:54 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2020-04-26 23:00:12 -0600
commit38c61b6dab3b1ae926ec4b791c1fa4dd04463664 (patch)
tree9b6949029d6531df135929eef033453266e7f383 /gtk2_ardour/transport_control.h
parent1983f56592dfea5f74983c3b7207f8c6e0ab7836 (diff)
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
Diffstat (limited to 'gtk2_ardour/transport_control.h')
-rw-r--r--gtk2_ardour/transport_control.h6
1 files changed, 4 insertions, 2 deletions
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 <gtkmm/widget.h>
#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;
};