X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fmackie%2Fmackie_port.h;h=292fc2ac13866862c557468d1baede77e1ee3103;hb=f450df300c9c057141a4caf79ff6dbfbf58492d9;hp=2ad5cf61548e10056ae389567525c3e260419f72;hpb=99904735e066804358f1d0bd138a84f1e9ecda91;p=ardour.git diff --git a/libs/surfaces/mackie/mackie_port.h b/libs/surfaces/mackie/mackie_port.h index 2ad5cf6154..292fc2ac13 100644 --- a/libs/surfaces/mackie/mackie_port.h +++ b/libs/surfaces/mackie/mackie_port.h @@ -18,14 +18,12 @@ #ifndef mackie_port_h #define mackie_port_h -#include "surface_port.h" - #include -#include -#include - #include +#include "pbd/signals.h" + +#include "surface_port.h" #include "midi_byte_array.h" #include "types.h" @@ -55,12 +53,12 @@ public: virtual const MidiByteArray & sysex_hdr() const; /// Handle device initialisation - void handle_midi_sysex( MIDI::Parser &, MIDI::byte *, size_t ); + void handle_midi_sysex( MIDI::Parser &, MIDI::byte *, size_t count ); /// Handle all control messags - void handle_midi_any( MIDI::Parser &, MIDI::byte *, size_t ); + void handle_midi_any( MIDI::Parser &, MIDI::byte *, size_t count ); - Control & lookup_control( const MidiByteArray & bytes ); + Control & lookup_control( MIDI::byte *, size_t count ); /// return the number of strips associated with this port virtual int strips() const; @@ -71,6 +69,10 @@ public: emulation_t emulation() const { return _emulation; } + /// Connect the any signal from the parser to handle_midi_any + /// unless it's already connected + void connect_any(); + protected: /** The initialisation sequence is fairly complex. First a lock is acquired @@ -105,11 +107,15 @@ protected: */ void probe_emulation( const MidiByteArray & bytes ); + /// Handle timeout events set for controls that don't emit + /// an off event + bool handle_control_timeout_event ( Control * ); + private: MackieControlProtocol & _mcp; port_type_t _port_type; - sigc::connection _any; - sigc::connection _sysex; + PBD::ScopedConnection any_connection; + PBD::ScopedConnection sysex_connection; emulation_t _emulation; bool _initialising;