summaryrefslogtreecommitdiff
path: root/libs/surfaces/powermate/interface.cc
blob: 6012c064d855d7ae09fb027337d39b7eefe600ee (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
	Ardour9pin interface file
	Ben Loftis
	Created: 05/18/06 11:07:56
	Copyright Harrison Audio, LLC, 2007
*/

#include "powermate.h"

using namespace ARDOUR;

ControlProtocol*
new_powermate_protocol (ControlProtocolDescriptor* descriptor, Session* s)
{
	PowermateControlProtocol* pcp = new PowermateControlProtocol (*s);

	if (pcp->set_active (true)) {
		delete pcp;
		return 0;
	}

	return pcp;
	
}

void
delete_powermate_protocol (ControlProtocolDescriptor* descriptor, ControlProtocol* cp)
{
	delete cp;
}

bool
probe_powermate_protocol (ControlProtocolDescriptor* descriptor)
{
	return PowermateControlProtocol::probe ();
}

static ControlProtocolDescriptor powermate_descriptor = {
	name : "powermate",
	id : "uri://ardour.org/ardour/powermate:0",
	ptr : 0,
	module : 0,
	mandatory : 0,
	supports_feedback : false,
	probe : probe_powermate_protocol,
	initialize : new_powermate_protocol,
	destroy : delete_powermate_protocol
};
	

extern "C" {
ControlProtocolDescriptor* 
protocol_descriptor () {
	return &powermate_descriptor;
}
}