make OSC off by default, and add menu item to control it
git-svn-id: svn://localhost/ardour2/trunk@1594 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -38,7 +38,7 @@ CONFIG_VARIABLE (HeaderFormat, native_file_header_format, "native-file-header-f
|
||||
/* OSC */
|
||||
|
||||
CONFIG_VARIABLE (uint32_t, osc_port, "osc-port", 3819)
|
||||
CONFIG_VARIABLE (bool, use_osc, "use-osc", true)
|
||||
CONFIG_VARIABLE (bool, use_osc, "use-osc", false)
|
||||
|
||||
/* crossfades */
|
||||
|
||||
|
||||
@@ -58,6 +58,11 @@ int
|
||||
OSC::start ()
|
||||
{
|
||||
char tmpstr[255];
|
||||
|
||||
if (_osc_server) {
|
||||
/* already started */
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (int j=0; j < 20; ++j) {
|
||||
snprintf(tmpstr, sizeof(tmpstr), "%d", _port);
|
||||
@@ -108,16 +113,22 @@ OSC::start ()
|
||||
int
|
||||
OSC::stop ()
|
||||
{
|
||||
if (_osc_server == 0) {
|
||||
/* already stopped */
|
||||
return 0;
|
||||
}
|
||||
|
||||
// stop server thread
|
||||
terminate_osc_thread();
|
||||
|
||||
lo_server_free (_osc_server);
|
||||
_osc_server = 0;
|
||||
|
||||
if (!_osc_unix_socket_path.empty()) {
|
||||
// unlink it
|
||||
unlink(_osc_unix_socket_path.c_str());
|
||||
}
|
||||
|
||||
// stop server thread
|
||||
terminate_osc_thread();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user