summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/surface_port.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-04-12 16:41:07 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-04-12 16:41:07 +0000
commit0c4fe26b4111e5c7955380d9a7ab55c4c775d6d0 (patch)
tree873e07f1ef5fe386bbebf1cdb259793ca2d62913 /libs/surfaces/mackie/surface_port.h
parent62620122a96af73c9714c4de492c43382c5f0297 (diff)
MCP: switch devices on the fly; name MIDI ports appropriately; fix active state; move sysex parsing into Surface
git-svn-id: svn://localhost/ardour2/branches/3.0@11942 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/surface_port.h')
-rw-r--r--libs/surfaces/mackie/surface_port.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/libs/surfaces/mackie/surface_port.h b/libs/surfaces/mackie/surface_port.h
index 8b66073b4a..1a65d8dbcf 100644
--- a/libs/surfaces/mackie/surface_port.h
+++ b/libs/surfaces/mackie/surface_port.h
@@ -44,42 +44,23 @@ class Surface;
class SurfacePort
{
public:
- SurfacePort (Mackie::Surface&, MIDI::Port& input_port, MIDI::Port& output_port);
+ SurfacePort (Mackie::Surface&);
virtual ~SurfacePort();
- void open();
- void close();
-
- /// read bytes from the port. They'll either end up in the
- /// parser, or if that's not active they'll be returned
- MidiByteArray read();
-
/// an easier way to output bytes via midi
- void write (const MidiByteArray&);
+ int write (const MidiByteArray&);
MIDI::Port& input_port() { return *_input_port; }
const MIDI::Port& input_port() const { return *_input_port; }
MIDI::Port& output_port() { return *_output_port; }
const MIDI::Port& output_port() const { return *_output_port; }
- // emitted when the port goes inactive (ie a read or write failed)
- PBD::Signal0<void> inactive_event;
-
- void handle_midi_sysex (MIDI::Parser&, MIDI::byte *, size_t count);
-
- bool active() const { return _active; }
-
protected:
- MidiByteArray host_connection_query (MidiByteArray& bytes);
- MidiByteArray host_connection_confirmation (const MidiByteArray& bytes);
private:
Mackie::Surface* _surface;
MIDI::Port* _input_port;
MIDI::Port* _output_port;
- bool _active;
-
- PBD::ScopedConnection sysex_connection;
};
std::ostream& operator << (std::ostream& , const SurfacePort& port);