diff --git a/src/ola2pd/LICENSE.txt b/src/ola2pd/LICENSE.txt old mode 100755 new mode 100644 diff --git a/src/ola2pd/main.cpp b/src/ola2pd/main.cpp index 578c8c2..5c7afb1 100644 --- a/src/ola2pd/main.cpp +++ b/src/ola2pd/main.cpp @@ -81,7 +81,7 @@ public: // --- define inlets and outlets --- AddInAnything(); // default inlet AddOutList(); // outlet for DMX list - post("ola2pd v0.02 - an interface to Open Lighting Arquitecture"); + post("ola2pd v0.03 - an interface to Open Lighting Arquitecture"); post("(C) 2012-2013 Santi Nore libremediaserver@gmail.com"); } void NewDmx(unsigned int universe, diff --git a/src/ola2pd/ola2pd.c b/src/ola2pd/ola2pd.c index 86c8ebb..fc854bf 100644 --- a/src/ola2pd/ola2pd.c +++ b/src/ola2pd/ola2pd.c @@ -1,3 +1,6 @@ + +/////////////////////////////////////////////////////////////////////////////////////////// + /* * ola2pd - interface from Open Lighting Arquitecture to Pure Data * v 0.03 @@ -27,17 +30,22 @@ * */ -#include +#include "m_pd.h" +//#include #include #include #include -#include + +#include + +//#include #include +#include #include #include -#include -#include -#include + +//#include +//#include //static char *version = "$Revision: 0.01 $"; @@ -47,26 +55,24 @@ /*------------------------------------------------------------------------------ * CLASS DEF */ -static t_class *ola2pd_class; +//static t_class *ola2pd_class; typedef struct _ola2pd { t_object x_obj; t_outlet *x_out; - unsigned int x_universe; - unsigned int x_counter; + unsigned int x_universe; + unsigned int x_counter; OlaCallbackClient *x_clientpointer; } t_ola2pd; struct timeval m_last_data; OlaCallbackClientWrapper m_client; - - /*------------------------------------------------------------------------------ * IMPLEMENTATION */ -static void ola2pd_open(t_ola2pd* x) +void ola2pd_open(t_ola2pd* x) { if (x->x_clientpointer == NULL) { @@ -81,7 +87,7 @@ static void ola2pd_open(t_ola2pd* x) } } -static void ola2pd_close(t_ola2pd* x) +void ola2pd_close(t_ola2pd* x) { if (x->x_clientpointer != NULL) { @@ -92,12 +98,12 @@ static void ola2pd_close(t_ola2pd* x) } } -static void ola2pd_universe(t_ola2pd* x, t_floatarg f) +void ola2pd_universe(t_ola2pd* x, t_floatarg f) { x->x_universe = f; } -static void ola2pd_bang(t_ola2pd* x) +void ola2pd_bang(t_ola2pd* x) { if (x->x_clientpointer != NULL) {post("%s listening on universe %d",thisName(),x->x_universe);} else {post("%s configured on universe %d. Send open to start listening",thisName(),x->x_universe);} @@ -144,14 +150,16 @@ void ola2pd::RegisterComplete(const string &error) { } } -static void *ola2pd_new() +t_class *ola2pd_class; + +void *ola2pd_new() { t_ola2pd *x = (t_ola2pd *)pd_new(ola2pd_class); x->x_out = outlet_new((t_object *)x, &s_symbol); x->x_pattern = gensym("empty"); x->x_universe = 0; x->x_counter = 0; - return (x); + return (void *)x; } void ola2pd_setup(void) @@ -162,9 +170,11 @@ void ola2pd_setup(void) class_addmethod(ola2pd_class,(t_method)ola2pd_file,gensym("open"),0); class_addmethod(ola2pd_class,(t_method)ola2pd_type,gensym("close"),0); class_addmethod(ola2pd_class,(t_method)ola2pd_type,gensym("universe"),A_FLOAT, 0); + class_addfloat(ola2pd_class, ola2pd_universe); } + diff --git a/src/ola2pd/ola2pd.pd_linux b/src/ola2pd/ola2pd.pd_linux deleted file mode 100755 index 0c95a32..0000000 Binary files a/src/ola2pd/ola2pd.pd_linux and /dev/null differ