summaryrefslogtreecommitdiff
path: root/libs/surfaces/generic_midi/generic_midi_control_protocol.h
blob: 77a4dca805dd83ea40e3ec31ee5e6732587bb4b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef ardour_generic_midi_control_protocol_h
#define ardour_generic_midi_control_protocol_h

#include "control_protocol.h"

namespace MIDI {
	class Port;
}

namespace ARDOUR {

class GenericMidiControlProtocol : public ControlProtocol {
  public:
	GenericMidiControlProtocol (Session&);
	virtual ~GenericMidiControlProtocol();

	int set_active (bool yn);
	static bool probe() { return true; }

	void set_port (MIDI::Port*);
	MIDI::Port* port () const { return _port; }

	void send_route_feedback (std::list<Route*>&);
	
  private:
	void route_feedback (ARDOUR::Route&, bool);
	MIDI::Port* _port;

	void port_change ();
};

}

#endif // ardour_generic_midi_control_protocol_h