2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
/*******************************************************************************/
|
|
|
|
/* Copyright (C) 2010 Jonathan Moore Liles */
|
|
|
|
/* */
|
|
|
|
/* 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; see the file COPYING. If not,write to the Free Software */
|
|
|
|
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
/*******************************************************************************/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <lo/lo.h>
|
2010-01-21 01:33:02 +01:00
|
|
|
#include "Thread.H"
|
2010-01-21 01:33:02 +01:00
|
|
|
#include <list>
|
2013-06-06 00:58:52 +02:00
|
|
|
#include <string>
|
2010-01-21 01:33:02 +01:00
|
|
|
#include <stdlib.h>
|
2012-02-21 09:48:13 +01:00
|
|
|
#include <string.h>
|
2013-06-06 00:58:52 +02:00
|
|
|
#include <map>
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
namespace OSC
|
|
|
|
{
|
|
|
|
class OSC_Value
|
|
|
|
{
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
char _type;
|
|
|
|
|
|
|
|
float f;
|
|
|
|
double d;
|
|
|
|
int i;
|
|
|
|
const char *s;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
OSC_Value ( const OSC_Value &rhs )
|
|
|
|
{
|
|
|
|
_type = rhs._type;
|
|
|
|
|
|
|
|
f =rhs.f;
|
|
|
|
d = rhs.d;
|
|
|
|
i = rhs.i;
|
|
|
|
s = rhs.s;
|
|
|
|
}
|
|
|
|
|
|
|
|
OSC_Value ( )
|
|
|
|
{
|
|
|
|
_type = 0;
|
|
|
|
|
|
|
|
f = 0;
|
|
|
|
d = 0;
|
|
|
|
i = 0;
|
|
|
|
s = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ~OSC_Value ( ) { }
|
|
|
|
virtual char type ( void ) const { return _type; }
|
|
|
|
};
|
|
|
|
|
|
|
|
class OSC_Float : public OSC_Value
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
float value ( void ) const { return f; }
|
|
|
|
|
|
|
|
OSC_Float ( float v )
|
|
|
|
{
|
|
|
|
_type = 'f';
|
|
|
|
f = v;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class OSC_Int : public OSC_Value
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
int value ( void ) const { return i; }
|
|
|
|
|
|
|
|
OSC_Int ( int v )
|
|
|
|
{
|
|
|
|
_type = 'i';
|
|
|
|
i = v;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class OSC_String : public OSC_Value
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
const char * value ( void ) const { return s; }
|
|
|
|
|
|
|
|
OSC_String ( const char *v )
|
|
|
|
{
|
|
|
|
_type = 's';
|
|
|
|
s = v;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-02-21 09:48:13 +01:00
|
|
|
struct Parameter_Limits
|
|
|
|
{
|
|
|
|
float min;
|
|
|
|
float max;
|
|
|
|
float default_value;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Endpoint;
|
|
|
|
class Signal;
|
|
|
|
struct Peer
|
|
|
|
{
|
|
|
|
bool _scanning;
|
|
|
|
|
|
|
|
char *name;
|
|
|
|
lo_address addr;
|
|
|
|
|
|
|
|
std::list<Signal*> _signals;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef int (*signal_handler) ( float value, void *user_data );
|
|
|
|
|
|
|
|
class Signal
|
|
|
|
{
|
2013-06-06 01:26:36 +02:00
|
|
|
// static int next_id;
|
2012-02-21 09:48:13 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2013-04-09 05:56:33 +02:00
|
|
|
enum State {
|
|
|
|
Created = 0,
|
|
|
|
Removed = 1
|
|
|
|
};
|
|
|
|
|
2012-02-21 09:48:13 +01:00
|
|
|
enum Direction {
|
|
|
|
Input,
|
|
|
|
Output,
|
|
|
|
Bidirectional
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
Endpoint *_endpoint;
|
|
|
|
|
2012-02-25 05:23:45 +01:00
|
|
|
Peer *_peer;
|
|
|
|
|
2012-02-21 09:48:13 +01:00
|
|
|
char *_path;
|
|
|
|
char *_documentation;
|
|
|
|
|
|
|
|
float _value;
|
|
|
|
|
|
|
|
Direction _direction;
|
|
|
|
|
|
|
|
signal_handler _handler;
|
|
|
|
void *_user_data;
|
2012-02-26 03:01:46 +01:00
|
|
|
Parameter_Limits _parameter_limits;
|
2012-02-21 09:48:13 +01:00
|
|
|
|
2012-04-17 06:05:34 +02:00
|
|
|
void (*_connection_state_callback)(OSC::Signal *, void*);
|
|
|
|
void *_connection_state_userdata;
|
|
|
|
|
2012-02-21 09:48:13 +01:00
|
|
|
public:
|
|
|
|
|
2013-04-09 05:56:33 +02:00
|
|
|
const char * peer_name ( void ) const {
|
|
|
|
return _peer->name;
|
|
|
|
}
|
|
|
|
|
2012-05-04 07:57:54 +02:00
|
|
|
Signal ( const char *path, Direction dir );
|
2012-02-24 12:52:57 +01:00
|
|
|
~Signal ( );
|
2012-02-21 09:48:13 +01:00
|
|
|
|
2012-02-27 03:47:07 +01:00
|
|
|
Direction direction ( void ) const { return _direction; }
|
2012-02-21 09:48:13 +01:00
|
|
|
|
|
|
|
void parameter_limits ( float min, float max, float default_value )
|
|
|
|
{
|
|
|
|
_parameter_limits.min = min;
|
|
|
|
_parameter_limits.max = max;
|
|
|
|
_parameter_limits.default_value = default_value;
|
|
|
|
_value = default_value;
|
|
|
|
}
|
|
|
|
|
2012-05-04 07:57:54 +02:00
|
|
|
|
|
|
|
void connection_state_callback ( void(*_cb)(OSC::Signal *, void*), void *userdata)
|
|
|
|
{
|
|
|
|
_connection_state_callback = _cb;
|
|
|
|
_connection_state_userdata = userdata;
|
|
|
|
}
|
|
|
|
|
2012-02-26 03:01:46 +01:00
|
|
|
const Parameter_Limits& parameter_limits ( void ) const { return _parameter_limits; }
|
2012-02-21 09:48:13 +01:00
|
|
|
|
2012-02-24 12:52:57 +01:00
|
|
|
const char *path ( void ) const { return _path; }
|
|
|
|
|
|
|
|
void rename ( const char *name );
|
2012-02-21 09:48:13 +01:00
|
|
|
|
|
|
|
/* publishes value to targets */
|
|
|
|
void value ( float v );
|
|
|
|
/* get current value */
|
2012-02-24 12:52:57 +01:00
|
|
|
float value ( void ) const { return _value; }
|
2012-02-21 09:48:13 +01:00
|
|
|
|
2012-02-25 05:23:45 +01:00
|
|
|
bool is_connected_to ( const Signal *s ) const;
|
2013-06-06 01:26:36 +02:00
|
|
|
|
2012-02-21 09:48:13 +01:00
|
|
|
friend class Endpoint;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Method
|
|
|
|
{
|
|
|
|
char *_path;
|
|
|
|
char *_typespec;
|
|
|
|
char *_documentation;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
const char *path ( void ) { return _path; }
|
|
|
|
const char *typespec ( void ) { return _typespec; }
|
|
|
|
|
|
|
|
Method ( );
|
|
|
|
~Method ( );
|
|
|
|
|
|
|
|
friend class Endpoint;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
class Endpoint
|
|
|
|
{
|
2012-05-04 07:57:54 +02:00
|
|
|
Thread _thread;
|
2013-06-06 01:26:36 +02:00
|
|
|
|
|
|
|
friend class Signal;
|
2012-05-04 07:57:54 +02:00
|
|
|
|
|
|
|
// lo_server_thread _st;
|
|
|
|
lo_server _server;
|
2013-06-06 00:58:52 +02:00
|
|
|
lo_address _addr;
|
|
|
|
|
2012-05-04 07:57:54 +02:00
|
|
|
std::list<Peer*> _peers;
|
|
|
|
std::list<Signal*> _signals;
|
|
|
|
std::list<Method*> _methods;
|
|
|
|
|
2013-06-06 00:58:52 +02:00
|
|
|
char *_learning_path;
|
2020-09-25 08:37:32 +02:00
|
|
|
void (*_learning_callback)(void *);
|
|
|
|
void *_learning_userdata;
|
2013-06-06 00:58:52 +02:00
|
|
|
|
|
|
|
class TranslationDestination {
|
|
|
|
|
|
|
|
public:
|
|
|
|
std::string path;
|
|
|
|
float current_value;
|
2013-06-06 01:26:36 +02:00
|
|
|
bool suppress_feedback;
|
|
|
|
|
|
|
|
TranslationDestination ( )
|
|
|
|
{
|
|
|
|
suppress_feedback = false;
|
|
|
|
current_value = -1.0f;
|
|
|
|
}
|
2013-06-06 00:58:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
std::map<std::string,TranslationDestination> _translations;
|
|
|
|
|
2012-05-04 07:57:54 +02:00
|
|
|
void (*_peer_scan_complete_callback)(void*);
|
|
|
|
void *_peer_scan_complete_userdata;
|
2010-01-21 01:33:02 +01:00
|
|
|
|
2012-05-04 07:57:54 +02:00
|
|
|
char *_name;
|
|
|
|
|
|
|
|
static void error_handler(int num, const char *msg, const char *path);
|
2012-02-09 00:39:03 +01:00
|
|
|
|
2012-02-21 09:48:13 +01:00
|
|
|
static int osc_reply ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
|
|
|
|
|
|
|
static int osc_signal_lister ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
2012-02-09 00:39:03 +01:00
|
|
|
static int osc_generic ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
2012-02-21 09:48:13 +01:00
|
|
|
static int osc_sig_handler ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
2012-02-24 12:52:57 +01:00
|
|
|
static int osc_sig_renamed ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
2012-02-26 03:01:46 +01:00
|
|
|
static int osc_sig_removed ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
|
|
|
static int osc_sig_created ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
2012-02-25 05:23:45 +01:00
|
|
|
static int osc_sig_disconnect ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
|
|
|
static int osc_sig_connect ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
|
|
|
static int osc_sig_hello ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data );
|
|
|
|
|
2013-04-09 05:56:33 +02:00
|
|
|
|
|
|
|
Peer * add_peer ( const char *name, const char *url );
|
2012-02-25 05:23:45 +01:00
|
|
|
void scan_peer ( const char *name, const char *url );
|
2012-02-09 00:39:03 +01:00
|
|
|
|
2012-05-04 07:57:54 +02:00
|
|
|
private:
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
static void *osc_thread ( void *arg );
|
|
|
|
void osc_thread ( void );
|
|
|
|
|
2012-02-24 09:59:39 +01:00
|
|
|
OSC::Signal *find_peer_signal_by_path ( Peer *p, const char *path );
|
2013-06-06 01:26:36 +02:00
|
|
|
OSC::Signal *find_signal_by_path ( const char *path );
|
2012-02-24 09:59:39 +01:00
|
|
|
|
2012-02-21 09:48:13 +01:00
|
|
|
Peer *find_peer_by_name ( const char *name );
|
|
|
|
Peer *find_peer_by_address ( lo_address addr );
|
|
|
|
static bool address_matches ( lo_address addr1, lo_address addr2 );
|
|
|
|
|
2012-02-26 03:01:46 +01:00
|
|
|
static Signal *find_target_by_peer_address ( std::list<Signal*> *l, lo_address addr );
|
2012-02-21 09:48:13 +01:00
|
|
|
|
2012-02-26 03:01:46 +01:00
|
|
|
void del_signal ( Signal *signal );
|
|
|
|
void send_signal_rename_notifications( Signal *s );
|
|
|
|
|
2013-04-09 05:56:33 +02:00
|
|
|
|
|
|
|
void (*_peer_signal_notification_callback)( OSC::Signal *, OSC::Signal::State, void*);
|
|
|
|
void *_peer_signal_notification_userdata;
|
2010-01-21 01:33:02 +01:00
|
|
|
|
2013-04-09 05:56:33 +02:00
|
|
|
public:
|
2013-06-06 01:26:36 +02:00
|
|
|
|
2013-06-06 00:58:52 +02:00
|
|
|
void send_feedback ( const char *path, float v );
|
2020-09-25 08:37:32 +02:00
|
|
|
void learn ( const char *path, void (*callback)(void*), void *userdata );
|
2013-06-06 00:58:52 +02:00
|
|
|
|
|
|
|
lo_address address ( void )
|
|
|
|
{
|
|
|
|
return _addr;
|
|
|
|
}
|
|
|
|
|
2013-07-09 06:51:21 +02:00
|
|
|
const char * * get_connections ( const char *path );
|
2013-06-06 01:26:36 +02:00
|
|
|
void clear_translations ( void );
|
|
|
|
void del_translation ( const char *a );
|
2013-06-06 00:58:52 +02:00
|
|
|
void add_translation ( const char *a, const char *b );
|
2013-06-06 01:26:36 +02:00
|
|
|
void rename_translation_destination ( const char *a, const char *b );
|
|
|
|
void rename_translation_source ( const char *a, const char *b );
|
|
|
|
int ntranslations ( void );
|
|
|
|
bool get_translation ( int n, const char **from, const char **to );
|
|
|
|
|
2013-04-09 05:56:33 +02:00
|
|
|
void peer_signal_notification_callback ( void (*cb)(OSC::Signal *, OSC::Signal::State, void*), void *userdata )
|
|
|
|
{
|
|
|
|
_peer_signal_notification_callback = cb;
|
|
|
|
_peer_signal_notification_userdata = userdata;
|
|
|
|
}
|
|
|
|
|
2012-05-04 07:57:54 +02:00
|
|
|
// can be used to point back to owning object.
|
|
|
|
void *owner;
|
|
|
|
|
2013-04-09 05:56:33 +02:00
|
|
|
void list_peer_signals ( void *v );
|
2012-02-21 09:48:13 +01:00
|
|
|
|
2012-02-24 05:34:07 +01:00
|
|
|
int init ( int proto, const char *port = 0 );
|
2012-05-04 07:57:54 +02:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
Endpoint ( );
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
~Endpoint ( );
|
2012-02-26 03:01:46 +01:00
|
|
|
|
|
|
|
bool disconnect_signal ( OSC::Signal *s, OSC::Signal *d );
|
2013-06-06 01:26:36 +02:00
|
|
|
bool disconnect_signal ( OSC::Signal *s, const char *signal_path );
|
2012-02-26 03:01:46 +01:00
|
|
|
bool connect_signal ( OSC::Signal *s, OSC::Signal *d );
|
|
|
|
bool connect_signal ( OSC::Signal *s, const char *peer_name, const char *signal_path );
|
2013-06-06 01:26:36 +02:00
|
|
|
// bool connect_signal ( OSC::Signal *s, const char *peer_name, int signal_id );
|
2012-02-26 03:01:46 +01:00
|
|
|
bool connect_signal ( OSC::Signal *s, const char *peer_and_path );
|
2012-02-21 09:48:13 +01:00
|
|
|
|
2012-02-27 03:47:07 +01:00
|
|
|
Signal * add_signal ( const char *path, Signal::Direction dir, float min, float max, float default_value, signal_handler handler, void *user_data );
|
2012-02-21 09:48:13 +01:00
|
|
|
Method *add_method ( const char *path, const char *typespec, lo_method_handler handler, void *user_data, const char *argument_description );
|
2010-01-21 01:33:02 +01:00
|
|
|
void del_method ( const char *path, const char *typespec );
|
2012-02-21 09:48:13 +01:00
|
|
|
void del_method ( Method* method );
|
2010-01-21 01:33:02 +01:00
|
|
|
void start ( void );
|
|
|
|
void stop ( void );
|
|
|
|
int port ( void ) const;
|
|
|
|
char * url ( void ) const;
|
2010-01-21 01:33:02 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
void check ( void ) const;
|
|
|
|
void wait ( int timeout ) const;
|
|
|
|
void run ( void ) const;
|
|
|
|
|
2012-02-25 05:23:45 +01:00
|
|
|
void name ( const char *name ) { _name = strdup( name ); }
|
|
|
|
const char *name ( void ) { return _name; }
|
|
|
|
|
|
|
|
void hello ( const char *url );
|
2013-04-09 05:56:33 +02:00
|
|
|
void handle_hello ( const char *peer_name, const char *peer_url );
|
2012-02-25 05:23:45 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
int send ( lo_address to, const char *path, std::list< OSC_Value > values );
|
|
|
|
|
|
|
|
/* overloads for common message formats */
|
|
|
|
int send ( lo_address to, const char *path );
|
|
|
|
int send ( lo_address to, const char *path, float v );
|
|
|
|
int send ( lo_address to, const char *path, double v );
|
|
|
|
int send ( lo_address to, const char *path, int v );
|
|
|
|
int send ( lo_address to, const char *path, long v );
|
2012-02-21 09:48:13 +01:00
|
|
|
int send ( lo_address to, const char *path, int v1, int v2 );
|
|
|
|
int send ( lo_address to, const char *path, int v1, float v2 );
|
2012-02-26 03:01:46 +01:00
|
|
|
int send ( lo_address to, const char *path, int v1, int v2, float v3 );
|
2010-01-21 01:33:02 +01:00
|
|
|
int send ( lo_address to, const char *path, const char *v );
|
2012-02-21 09:48:13 +01:00
|
|
|
int send ( lo_address to, const char *path, const char *v1, float v2 );
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, int v2, int v3 );
|
2010-01-21 01:33:02 +01:00
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2 );
|
2010-01-21 01:33:02 +01:00
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3 );
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, int v2, int v3, int v4 );
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2, int v3, int v4, int v5 );
|
|
|
|
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, int v2 );
|
|
|
|
int send ( lo_address to, const char *path, int v1, const char *v2 );
|
2012-02-26 03:01:46 +01:00
|
|
|
int send ( lo_address to, const char *path, const char *v1, int v2, int v3, float v4 );
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, int v4, int v5, int v6 );
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, int v2, const char *v3 );
|
|
|
|
int send ( lo_address to, const char *path, int v1, const char *v2, const char *v3, const char *v4 );
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, int v2, const char *v3, const char *v4, const char *v5 );
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, const char *v4, const char *v5 );
|
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, const char *v4 );
|
|
|
|
|
2012-02-23 09:40:54 +01:00
|
|
|
int send ( lo_address to, const char *path, lo_message msg );
|
|
|
|
|
2013-06-06 01:26:36 +02:00
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, float v4, float v5, float v6 );
|
|
|
|
|
2012-02-21 09:48:13 +01:00
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2, int v3, float v4, float v5, float v6 );
|
|
|
|
|
2012-02-25 05:23:45 +01:00
|
|
|
int send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, int v4, float v5, float v6, float v7 );
|
|
|
|
|
2012-04-17 06:05:34 +02:00
|
|
|
void peer_scan_complete_callback ( void(*_cb)(void*), void *userdata)
|
|
|
|
{
|
|
|
|
_peer_scan_complete_callback = _cb;
|
|
|
|
_peer_scan_complete_userdata = userdata;
|
|
|
|
}
|
|
|
|
|
2012-02-26 03:01:46 +01:00
|
|
|
|
|
|
|
friend Signal::~Signal();
|
|
|
|
friend void Signal::rename ( const char *name );
|
2010-01-21 01:33:02 +01:00
|
|
|
};
|
|
|
|
|
2012-11-06 08:50:28 +01:00
|
|
|
}
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
/* helper macros for defining OSC handlers */
|
2012-02-27 04:35:31 +01:00
|
|
|
/* #define OSC_NAME( name ) osc_ ## name */
|
2010-01-21 01:33:02 +01:00
|
|
|
#define OSC_DMSG() DMESSAGE( "Got OSC message: %s", path );
|
2012-02-27 04:35:31 +01:00
|
|
|
// #define OSC_HANDLER( name ) static int OSC_NAME( name ) ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
|
2012-02-27 04:35:31 +01:00
|
|
|
/* #define OSC_REPLY_OK() ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, "ok" ) */
|
|
|
|
/* #define OSC_REPLY( value ) ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, value ) */
|
|
|
|
/* #define OSC_REPLY_ERR() ((OSC::Endpoint*)user_data)->send( lo_message_get_source( msg ), path, "err" ) */
|
|
|
|
/* #define OSC_ENDPOINT() ((OSC::Endpoint*)user_data) */
|