UF8: parameterize the device name and pass to MackieControlProtocol
This commit is contained in:
parent
845600b261
commit
8fd8eaa01d
@ -34,13 +34,15 @@ using namespace std;
|
||||
using namespace ArdourSurface;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
#define PROTOCOL_NAME ("Mackie")
|
||||
|
||||
static ControlProtocol*
|
||||
new_mackie_protocol (Session* s)
|
||||
{
|
||||
MackieControlProtocol* mcp = 0;
|
||||
|
||||
try {
|
||||
mcp = new MackieControlProtocol (*s);
|
||||
mcp = new MackieControlProtocol (*s, PROTOCOL_NAME);
|
||||
/* do not set active here - wait for set_state() */
|
||||
}
|
||||
catch (exception & e) {
|
||||
@ -65,9 +67,8 @@ delete_mackie_protocol (ControlProtocol* cp)
|
||||
}
|
||||
}
|
||||
|
||||
// Field names commented out by JE - 06-01-2010
|
||||
static ControlProtocolDescriptor mackie_descriptor = {
|
||||
/* name */ "Mackie",
|
||||
/* name */ PROTOCOL_NAME,
|
||||
/* id */ "uri://ardour.org/surfaces/mackie:0",
|
||||
/* module */ 0,
|
||||
/* available */ 0,
|
||||
|
@ -115,12 +115,8 @@ const int MACKIE_NAMESPACE::MackieControlProtocol::MAIN_MODIFIER_MASK = (MackieC
|
||||
|
||||
MACKIE_NAMESPACE::MackieControlProtocol* MACKIE_NAMESPACE::MackieControlProtocol::_instance = 0;
|
||||
|
||||
MackieControlProtocol::MackieControlProtocol (Session& session)
|
||||
#ifdef UF8
|
||||
: ControlProtocol (session, X_("SSL-UFx"))
|
||||
#else
|
||||
: ControlProtocol (session, X_("Mackie"))
|
||||
#endif
|
||||
MackieControlProtocol::MackieControlProtocol (Session& session, const char* pname)
|
||||
: ControlProtocol (session, pname)
|
||||
, AbstractUI<MackieControlUIRequest> (name())
|
||||
, _current_initial_bank (0)
|
||||
, _timecode_last (10, '\0')
|
||||
|
@ -107,7 +107,7 @@ class MackieControlProtocol
|
||||
Zero, /* fader controls primary, but doesn't move, vpot controls secondary */
|
||||
};
|
||||
|
||||
MackieControlProtocol(ARDOUR::Session &);
|
||||
MackieControlProtocol(ARDOUR::Session &, const char* name);
|
||||
virtual ~MackieControlProtocol();
|
||||
|
||||
static MackieControlProtocol* instance() { return _instance; }
|
||||
|
@ -36,6 +36,8 @@ using namespace std;
|
||||
using namespace ArdourSurface;
|
||||
using namespace ArdourSurface::MACKIE_NAMESPACE;
|
||||
|
||||
#define PROTOCOL_NAME ("SSL 360: UF8 UF1")
|
||||
|
||||
static ControlProtocol*
|
||||
new_uf8_protocol (Session* s)
|
||||
{
|
||||
@ -44,7 +46,7 @@ new_uf8_protocol (Session* s)
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "making uf8-protocol");
|
||||
|
||||
try {
|
||||
mcp = new MackieControlProtocol (*s);
|
||||
mcp = new MackieControlProtocol (*s, PROTOCOL_NAME);
|
||||
/* do not set active here - wait for set_state() */
|
||||
}
|
||||
catch (exception & e) {
|
||||
@ -71,7 +73,7 @@ delete_uf8_protocol (ControlProtocol* cp)
|
||||
|
||||
// Field names commented out by JE - 06-01-2010
|
||||
static ControlProtocolDescriptor uf8_descriptor = {
|
||||
/* name */ "SSL UF-8",
|
||||
/* name */ PROTOCOL_NAME,
|
||||
/* id */ "uri://ardour.org/surfaces/ssl_uf8:0",
|
||||
/* module */ 0,
|
||||
/* available */ 0,
|
||||
|
Loading…
Reference in New Issue
Block a user