// copyright (C) 2004 david griffiths // // 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. // // 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. // // 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., 59 temple place - suite 330, boston, MA 02111-1307, USA. #include #include #include #include #include #include "OSC_server.h" using namespace std; #ifdef NO_LO_ARG_SIZE_DECL extern "C" { size_t lo_arg_size (lo_type type, void * data); }; #endif OSC_server::OSC_server(const string &port) : m_port(port), m_exit(false), m_command_ring_buffer(262144) { //cerr<<"using port: ["<COMMAND_DATA_SIZE) { cerr<<"osc data too big for ringbuffer command"<COMMAND_DATA_SIZE) { cerr<<"osc data too big for ringbuffer command"<s); if (pos+size+1>COMMAND_DATA_SIZE) { cerr<<"osc data too big for ringbuffer command"<s,size); newdata[pos+size]='\0'; pos+=size+1; } break; default: { cerr<<"unsupported type: "<m_command_ring_buffer.send(command)) { //cerr<<"OSC_server - ringbuffer full!"<