From ce9b271a92c8c78c3eace6a0da3438ecdae57107 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 7 Oct 2015 13:17:42 -0400 Subject: track Mackie MIDI port connection status as primary trigger for handshake with device --- libs/surfaces/mackie/surface.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'libs/surfaces/mackie/surface.h') diff --git a/libs/surfaces/mackie/surface.h b/libs/surfaces/mackie/surface.h index 1c989ec518..1afa1c0de7 100644 --- a/libs/surfaces/mackie/surface.h +++ b/libs/surfaces/mackie/surface.h @@ -3,6 +3,7 @@ #include +#include "pbd/signals.h" #include "pbd/xml++.h" #include "midi++/types.h" @@ -18,6 +19,7 @@ namespace MIDI { namespace ARDOUR { class Route; + class Port; } class MidiByteArray; @@ -49,7 +51,7 @@ public: uint32_t number() const { return _number; } const std::string& name() { return _name; } - void say_hello (); + void connected (); bool active() const { return _active; } @@ -174,15 +176,25 @@ public: Mackie::JogWheel* _jog_wheel; Fader* _master_fader; float _last_master_gain_written; - + PBD::ScopedConnection port_connection; + void handle_midi_sysex (MIDI::Parser&, MIDI::byte *, size_t count); MidiByteArray host_connection_query (MidiByteArray& bytes); MidiByteArray host_connection_confirmation (const MidiByteArray& bytes); + void say_hello (); void init_controls (); void init_strips (uint32_t n); void setup_master (); void master_gain_changed (); + void connection_handler (boost::weak_ptr, std::string name1, boost::weak_ptr, std::string name2, bool); + + enum ConnectionState { + InputConnected = 0x1, + OutputConnected = 0x2 + }; + + int connection_state; }; } -- cgit v1.2.3