Paul Davis
60fbeedb5f
b) various changes to ControlProtocol model/implementation c) more attempts to get autoscroll to work nicely (unfinished) d) move editor item types into their own header git-svn-id: svn://localhost/trunk/ardour2@506 d708f5d6-7413-0410-9779-e7cbd77b26cf
45 lines
702 B
C++
45 lines
702 B
C++
#include <ardour/control_protocol.h>
|
|
|
|
#include "osc_server.h"
|
|
|
|
using namespace ARDOUR;
|
|
|
|
ControlProtocol*
|
|
new_osc_protocol (ControlProtocolDescriptor* descriptor, Session* s)
|
|
{
|
|
ControlOSC* osc = new ControlOSC (*s, 3891);
|
|
|
|
if (osc->set_active (true)) {
|
|
delete osc;
|
|
return 0;
|
|
}
|
|
|
|
return osc;
|
|
|
|
}
|
|
|
|
void
|
|
delete_osc_protocol (ControlProtocolDescriptor* descriptor, ControlProtocol* cp)
|
|
{
|
|
delete cp;
|
|
}
|
|
|
|
static ControlProtocolDescriptor osc_descriptor = {
|
|
name : "OSC",
|
|
id : "uri://ardour.org/surfaces/osc:0",
|
|
ptr : 0,
|
|
module : 0,
|
|
initialize : new_osc_protocol,
|
|
destroy : delete_osc_protocol
|
|
|
|
};
|
|
|
|
|
|
extern "C" {
|
|
ControlProtocolDescriptor*
|
|
protocol_descriptor () {
|
|
return &osc_descriptor;
|
|
}
|
|
}
|
|
|