diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-15 13:25:01 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-03-15 13:25:01 +0000 |
commit | 6fadaae2cbc6ed0bc83136cde7536623894f819d (patch) | |
tree | dcb8ea37c6b9e1cc671a43ce1676a8aa231e0f8c /libs/ardour/osc.cc | |
parent | a1960ba3c0c751e9f5fef4ccae70c46ae713c7cb (diff) |
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
Diffstat (limited to 'libs/ardour/osc.cc')
-rw-r--r-- | libs/ardour/osc.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libs/ardour/osc.cc b/libs/ardour/osc.cc index bb87708f9e..d999386005 100644 --- a/libs/ardour/osc.cc +++ b/libs/ardour/osc.cc @@ -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; } |