2009-01-15 17:09:23 -05:00
|
|
|
/*
|
2019-08-03 08:34:29 -04:00
|
|
|
* Copyright (C) 2006-2015 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2009 David Robillard <d@drobilla.net>
|
2009-01-15 17:09:23 -05:00
|
|
|
*
|
2019-08-03 08:34:29 -04:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2009-01-15 17:09:23 -05:00
|
|
|
*
|
2019-08-03 08:34:29 -04:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2009-01-15 17:09:23 -05:00
|
|
|
*
|
2019-08-03 08:34:29 -04:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2009-01-15 17:09:23 -05:00
|
|
|
|
2009-10-30 11:30:22 -04:00
|
|
|
#include "ardour/rc_configuration.h"
|
2009-10-29 20:21:40 -04:00
|
|
|
#include "control_protocol/control_protocol.h"
|
2009-01-15 17:09:23 -05:00
|
|
|
#include "osc.h"
|
|
|
|
|
|
|
|
using namespace ARDOUR;
|
2015-04-15 17:21:47 -04:00
|
|
|
using namespace ArdourSurface;
|
2009-01-15 17:09:23 -05:00
|
|
|
|
2013-09-03 08:33:51 -04:00
|
|
|
static ControlProtocol*
|
2023-04-30 21:32:00 -04:00
|
|
|
new_osc_protocol (Session* s)
|
2009-01-15 17:09:23 -05:00
|
|
|
{
|
|
|
|
OSC* osc = new OSC (*s, Config->get_osc_port());
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2009-01-15 17:09:23 -05:00
|
|
|
osc->set_active (true);
|
|
|
|
|
|
|
|
return osc;
|
|
|
|
}
|
|
|
|
|
2013-09-03 08:33:51 -04:00
|
|
|
static void
|
2023-04-30 21:32:00 -04:00
|
|
|
delete_osc_protocol (ControlProtocol* cp)
|
2009-01-15 17:09:23 -05:00
|
|
|
{
|
|
|
|
delete cp;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ControlProtocolDescriptor osc_descriptor = {
|
2023-04-30 21:32:00 -04:00
|
|
|
/* name */ "Open Sound Control (OSC)",
|
|
|
|
/* id */ "uri://ardour.org/surfaces/osc:0",
|
|
|
|
/* module */ 0,
|
|
|
|
/* available */ 0,
|
|
|
|
/* probe_port */ 0,
|
|
|
|
/* match usb */ 0,
|
|
|
|
/* initialize */ new_osc_protocol,
|
|
|
|
/* destroy */ delete_osc_protocol,
|
2009-01-15 17:09:23 -05:00
|
|
|
};
|
|
|
|
|
2014-01-25 13:57:28 -05:00
|
|
|
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &osc_descriptor; }
|
2009-01-15 17:09:23 -05:00
|
|
|
|