Update of /cvsroot/pure-data/externals/grill/flext/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3248/source
Modified Files: flatom_pr.cpp flattr_ed.cpp flbase.h flclass.h fldsp.cpp fldsp.h flext.cpp flext.h fllib.cpp flmeth.cpp flmsg.cpp flout.cpp flproxy.cpp flsimd.cpp flsupport.h Log Message:
Index: flout.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flout.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** flout.cpp 12 Dec 2005 00:18:21 -0000 1.26 --- flout.cpp 15 May 2006 23:03:52 -0000 1.27 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 120,140 **** case xlet_float: case xlet_int: { ! inlets[ix-1] = NULL; ! char sym[] = "ft??"; ! if(ix >= 10) { ! if(compatibility) { ! // Max allows max. 9 inlets ! post("%s: Only 9 float/int inlets allowed in compatibility mode",thisName()); ! ok = false; ! } ! else { ! if(ix > 99) ! post("%s: Inlet index > 99 not allowed for float/int inlets",thisName()); ! sym[2] = '0'+ix/10,sym[3] = '0'+ix%10; ! } } - else - sym[2] = '0'+ix,sym[3] = 0; - if(ok) in = inlet_new(&x_obj->obj, &x_obj->obj.ob_pd, (t_symbol *)sym_float, gensym(sym)); break; } --- 120,134 ---- case xlet_float: case xlet_int: { ! if(ix > 9) { ! // proxy inlet needed ! (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages ! in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, (t_symbol *)sym_float, (t_symbol *)sym_float); ! } ! else { ! inlets[ix-1] = NULL; ! static char sym[] = " ft ?"; ! sym[4] = '0'+ix; ! in = inlet_new(&x_obj->obj, &x_obj->obj.ob_pd, (t_symbol *)sym_float, gensym(sym)); } break; } *************** *** 153,163 **** case xlet_sig: inlets[ix-1] = NULL; ! if(compatibility && inlist[ix-1].tp != xlet_sig) { post("%s: All signal inlets must be left-aligned in compatibility mode",thisName()); ok = false; } ! else { ! // pd doesn't seem to be able to handle signals and messages into the same inlet... ! in = inlet_new(&x_obj->obj, &x_obj->obj.ob_pd, (t_symbol *)sym_signal, (t_symbol *)sym_signal); ++insigs; --- 147,159 ---- case xlet_sig: inlets[ix-1] = NULL; ! #ifdef FLEXT_COMPATIBLE ! if(inlist[ix-1].tp != xlet_sig) { post("%s: All signal inlets must be left-aligned in compatibility mode",thisName()); ok = false; } ! else ! #endif ! { ! // pd is not able to handle signals and messages into the same inlet... in = inlet_new(&x_obj->obj, &x_obj->obj.ob_pd, (t_symbol *)sym_signal, (t_symbol *)sym_signal); ++insigs;
Index: flbase.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbase.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** flbase.h 12 Dec 2005 00:18:21 -0000 1.36 --- flbase.h 15 May 2006 23:03:52 -0000 1.37 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution.
Index: flsupport.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.h,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** flsupport.h 15 Dec 2005 23:04:06 -0000 1.103 --- flsupport.h 15 May 2006 23:03:52 -0000 1.104 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 489,492 **** --- 489,493 ---- static void SetInt(t_atom &a,int v) { a.a_type = A_FLOAT; a.a_w.w_float = (float)v; }
+ #ifndef FLEXT_COMPATIBLE //! Check whether the atom strictly is a pointer static bool IsPointer(const t_atom &a) { return a.a_type == A_POINTER; } *************** *** 499,502 **** --- 500,504 ---- //! Set the atom to represent a pointer static void SetPointer(t_atom &a,t_gpointer *p) { a.a_type = A_POINTER; a.a_w.w_gpointer = (t_gpointer *)p; } + #endif
#elif FLEXT_SYS == FLEXT_SYS_MAX *************** *** 512,526 **** //! Set the atom to represent an integer static void SetInt(t_atom &a,int v) { a.a_type = A_INT; a.a_w.w_long = v; } - - //! Check whether the atom strictly is a pointer - static bool IsPointer(const t_atom &) { return false; } - //! Check whether the atom can be a pointer - static bool CanbePointer(const t_atom &a) { return IsInt(a); } - //! Access the pointer value (without type check) - static void *GetPointer(const t_atom &) { return NULL; } - //! Check for a pointer and get its value - static void *GetAPointer(const t_atom &a,void *def = NULL) { return IsInt(a)?(void *)GetInt(a):def; } - //! Set the atom to represent a pointer - static void SetPointer(t_atom &a,void *p) { SetInt(a,(int)p); } #else #error "Platform not supported" --- 514,517 ----
Index: flext.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flext.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** flext.cpp 12 Dec 2005 00:18:21 -0000 1.43 --- flext.cpp 15 May 2006 23:03:52 -0000 1.44 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 20,24 **** // === flext_base ============================================
- bool flext_base::compatibility = true; const t_symbol *flext_base::curtag = NULL;
--- 20,23 ---- *************** *** 142,148 ****
! void flext_base::AddMessageMethods(t_class *c) { add_loadbang(c,cb_loadbang); #if FLEXT_SYS == FLEXT_SYS_PD class_addmethod(c,(t_method)cb_click,gensym("click"),A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_NULL); --- 141,148 ----
! void flext_base::AddMessageMethods(t_class *c,bool dsp) { add_loadbang(c,cb_loadbang); + #if FLEXT_SYS == FLEXT_SYS_PD class_addmethod(c,(t_method)cb_click,gensym("click"),A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_NULL); *************** *** 150,174 **** add_assist(c,cb_assist); add_dblclick(c,cb_click); - #else - #pragma message ("no implementation of loadbang or assist") #endif
! SetProxies(c); StartQueue(); ! } ! ! void flext_base::AddSignalMethods(t_class *c) ! { #if FLEXT_SYS == FLEXT_SYS_MAX ! add_dsp(c,cb_dsp); ! dsp_initclass(); #elif FLEXT_SYS == FLEXT_SYS_PD ! CLASS_MAINSIGNALIN(c,flext_hdr,defsig); // float messages going into the left inlet are converted to signal ! add_dsp(c,cb_dsp); #else #error Platform not supported! #endif }
/*! Set up proxy classes and basic methods at class creation time This ensures that they are processed before the registered flext messages --- 150,172 ---- add_assist(c,cb_assist); add_dblclick(c,cb_click); #endif
! SetProxies(c,dsp); StartQueue(); ! ! if(dsp) { #if FLEXT_SYS == FLEXT_SYS_MAX ! add_dsp(c,cb_dsp); ! dsp_initclass(); #elif FLEXT_SYS == FLEXT_SYS_PD ! CLASS_MAINSIGNALIN(c,flext_hdr,defsig); // float messages going into the left inlet are converted to signal ! add_dsp(c,cb_dsp); #else #error Platform not supported! #endif + } }
+ /*! Set up proxy classes and basic methods at class creation time This ensures that they are processed before the registered flext messages *************** *** 181,185 **** if(!IsLib(id)) #endif ! AddMessageMethods(c);
if(process_attributes) { --- 179,183 ---- if(!IsLib(id)) #endif ! AddMessageMethods(c,IsDSP(id));
if(process_attributes) {
Index: flproxy.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flproxy.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** flproxy.cpp 11 Oct 2005 22:22:48 -0000 1.12 --- flproxy.cpp 15 May 2006 23:03:52 -0000 1.13 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 23,45 **** t_class *flext_base::px_class = NULL;
! void flext_base::px_object::px_method(px_object *obj,const t_symbol *s,int argc,t_atom *argv) { obj->base->CbMethodHandler(obj->index,s,argc,argv); }
! void flext_base::cb_px_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv) { thisObject(c)->CbMethodHandler(0,s,argc,argv); }
! #define DEF_IN_FT(IX) \ ! void flext_base::cb_px_ft ## IX(flext_hdr *c,float v) { t_atom atom; SetFloat(atom,v); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); }
- #define ADD_IN_FT(IX) \ - add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT)
#elif FLEXT_SYS == FLEXT_SYS_MAX
! void flext_base::cb_px_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv) { int ci = ((flext_hdr *)c)->curinlet; --- 23,98 ---- t_class *flext_base::px_class = NULL;
! void flext_base::px_object::px_bang(px_object *obj) ! { ! obj->base->CbMethodHandler(obj->index,sym_bang,0,NULL); ! } ! ! void flext_base::px_object::px_float(px_object *obj,t_float f) ! { ! t_atom a; SetFloat(a,f); ! obj->base->CbMethodHandler(obj->index,sym_float,1,&a); ! } ! ! void flext_base::px_object::px_symbol(px_object *obj,const t_symbol *s) ! { ! t_atom a; SetSymbol(a,s); ! obj->base->CbMethodHandler(obj->index,sym_symbol,1,&a); ! } ! ! /* ! void flext_base::px_object::px_pointer(px_object *obj,const t_gpointer *p) ! { ! t_atom a; SetPointer(a,p); ! obj->base->CbMethodHandler(obj->index,sym_pointer,1,&a); ! } ! */ ! ! void flext_base::px_object::px_anything(px_object *obj,const t_symbol *s,int argc,t_atom *argv) { obj->base->CbMethodHandler(obj->index,s,argc,argv); }
! void flext_base::cb_bang(flext_hdr *c) ! { ! thisObject(c)->CbMethodHandler(0,sym_bang,0,NULL); ! } ! ! void flext_base::cb_float(flext_hdr *c,t_float f) ! { ! t_atom a; SetFloat(a,f); ! thisObject(c)->CbMethodHandler(0,sym_float,1,&a); ! } ! ! void flext_base::cb_symbol(flext_hdr *c,const t_symbol *s) ! { ! t_atom a; SetSymbol(a,s); ! thisObject(c)->CbMethodHandler(0,sym_symbol,1,&a); ! } ! ! /* ! void flext_base::cb_pointer(flext_hdr *c,const t_gpointer *p) ! { ! t_atom a; SetPointer(a,p); ! thisObject(c)->CbMethodHandler(0,sym_pointer,1,&a); ! } ! */ ! ! void flext_base::cb_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv) { thisObject(c)->CbMethodHandler(0,s,argc,argv); }
! #define DEF_PROXYMSG(IX) \ ! void flext_base::cb_px_ft ## IX(flext_hdr *c,t_float v) { t_atom atom; SetFloat(atom,v); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); } ! ! #define ADD_PROXYMSG(c,IX) \ ! add_method1(c,cb_px_ft ## IX," ft " #IX,A_FLOAT) ! ! //AddMethod(c,0,flext::MakeSymbol("ft" #IX),cb_px_ft ## IX)
#elif FLEXT_SYS == FLEXT_SYS_MAX
! void flext_base::cb_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv) { int ci = ((flext_hdr *)c)->curinlet; *************** *** 47,51 **** }
! void flext_base::cb_px_int(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); --- 100,104 ---- }
! void flext_base::cb_int(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); *************** *** 54,58 **** }
! void flext_base::cb_px_float(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); --- 107,111 ---- }
! void flext_base::cb_float(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); *************** *** 61,65 **** }
! void flext_base::cb_px_bang(flext_hdr *c) { int ci = ((flext_hdr *)c)->curinlet; --- 114,118 ---- }
! void flext_base::cb_bang(flext_hdr *c) { int ci = ((flext_hdr *)c)->curinlet; *************** *** 68,78 ****
! #define DEF_IN_FT(IX) \ void flext_base::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \ void flext_base::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); }
! #define ADD_IN_FT(IX) \ ! add_method1(c,cb_px_in ## IX,"in" #IX,A_INT); \ ! add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT)
#endif --- 121,142 ----
! #define DEF_PROXYMSG(IX) \ void flext_base::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \ void flext_base::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); }
! //void flext_base::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \ ! //void flext_base::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); } ! ! ! #define ADD_PROXYMSG(c,IX) \ ! addinx((method)(cb_px_in ## IX),IX); \ ! addftx((method)(cb_px_ft ## IX),IX) ! ! //add_method1(c,cb_px_in ## IX,"in" #IX,A_INT); \ ! //add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT) ! ! //AddMethod(c,0,flext::MakeSymbol("in" #IX),cb_px_in ## IX); \ ! //AddMethod(c,0,flext::MakeSymbol("ft" #IX),cb_px_ft ## IX) !
#endif *************** *** 80,107 **** #if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX
! DEF_IN_FT(1) ! DEF_IN_FT(2) ! DEF_IN_FT(3) ! DEF_IN_FT(4) ! DEF_IN_FT(5) ! DEF_IN_FT(6) ! DEF_IN_FT(7) ! DEF_IN_FT(8) ! DEF_IN_FT(9)
! void flext_base::SetProxies(t_class *c) { - // proxy for extra inlets #if FLEXT_SYS == FLEXT_SYS_PD ! add_anything(c,cb_px_anything); // for leftmost inlet ! px_class = class_new(gensym("flext_base proxy"),NULL,NULL,sizeof(px_object),CLASS_PD|CLASS_NOINLET, A_NULL); ! add_anything(px_class,px_object::px_method); // for other inlets
#elif FLEXT_SYS == FLEXT_SYS_MAX ! add_bang(c,cb_px_bang); ! add_method1(c,cb_px_int,"int",A_INT); ! add_method1(c,cb_px_float,"float",A_FLOAT); ! // add_methodG(c,cb_px_anything,"list"); ! add_anything(c,cb_px_anything); #else #error Not implemented! --- 144,186 ---- #if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX
! DEF_PROXYMSG(1) ! DEF_PROXYMSG(2) ! DEF_PROXYMSG(3) ! DEF_PROXYMSG(4) ! DEF_PROXYMSG(5) ! DEF_PROXYMSG(6) ! DEF_PROXYMSG(7) ! DEF_PROXYMSG(8) ! DEF_PROXYMSG(9)
! ! void flext_base::SetProxies(t_class *c,bool dsp) { #if FLEXT_SYS == FLEXT_SYS_PD ! // for leftmost inlet ! class_addbang(c,cb_bang); ! if(!dsp) class_addfloat(c,cb_float); ! class_addsymbol(c,cb_symbol); ! // class_addpointer(c,cb_pointer); ! class_addlist(c,cb_anything); ! class_addanything(c,cb_anything);
+ // proxy for extra inlets + if(!px_class) { + // only once + px_class = class_new(gensym(" flext_base proxy "),NULL,NULL,sizeof(px_object),CLASS_PD|CLASS_NOINLET, A_NULL); + class_addbang(px_class,px_object::px_bang); // for other inlets + class_addfloat(px_class,px_object::px_float); // for other inlets + class_addsymbol(px_class,px_object::px_symbol); // for other inlets + // class_addpointer(px_class,px_object::px_pointer); // for other inlets + class_addlist(px_class,px_object::px_anything); // for other inlets + class_addanything(px_class,px_object::px_anything); // for other inlets + } #elif FLEXT_SYS == FLEXT_SYS_MAX ! addbang((method)cb_bang); ! addint((method)cb_int); ! addfloat((method)cb_float); ! addmess((method)cb_anything,"list",A_GIMME,A_NOTHING); // must be explicitly given, otherwise list elements are distributes over inlets ! addmess((method)cb_anything,"anything",A_GIMME,A_NOTHING); #else #error Not implemented! *************** *** 109,121 ****
// setup non-leftmost ints and floats ! ADD_IN_FT(1); ! ADD_IN_FT(2); ! ADD_IN_FT(3); ! ADD_IN_FT(4); ! ADD_IN_FT(5); ! ADD_IN_FT(6); ! ADD_IN_FT(7); ! ADD_IN_FT(8); ! ADD_IN_FT(9); } #endif --- 188,200 ----
// setup non-leftmost ints and floats ! ADD_PROXYMSG(c,1); ! ADD_PROXYMSG(c,2); ! ADD_PROXYMSG(c,3); ! ADD_PROXYMSG(c,4); ! ADD_PROXYMSG(c,5); ! ADD_PROXYMSG(c,6); ! ADD_PROXYMSG(c,7); ! ADD_PROXYMSG(c,8); ! ADD_PROXYMSG(c,9); } #endif
Index: flmsg.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmsg.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** flmsg.cpp 12 Sep 2005 10:27:40 -0000 1.19 --- flmsg.cpp 15 May 2006 23:03:52 -0000 1.20 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 178,183 **** --- 178,185 ---- else if(IsSymbol(argv[0])) ret = FindMeth(inlet,sym_symbol,1,argv); + #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) else if(IsPointer(argv[0])) ret = FindMeth(inlet,sym_pointer,1,argv); + #endif if(ret) goto end; } *************** *** 211,215 **** if(ret) goto end; } ! #if FLEXT_SYS == FLEXT_SYS_PD else if(s == sym_pointer) { ret = FindMeth(inlet,sym_list,1,argv); --- 213,217 ---- if(ret) goto end; } ! #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) else if(s == sym_pointer) { ret = FindMeth(inlet,sym_list,1,argv); *************** *** 236,240 **** --- 238,244 ---- else if(IsInt(argv[i])) sym = sym_int; else if(IsSymbol(argv[i])) sym = sym_symbol; + #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) else if(IsPointer(argv[i])) sym = sym_pointer; // can pointer atoms occur here? + #endif
if(sym) {
Index: fldsp.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/fldsp.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** fldsp.cpp 11 Oct 2005 22:22:48 -0000 1.30 --- fldsp.cpp 15 May 2006 23:03:52 -0000 1.31 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 21,33 **** void flext_dsp::Setup(t_classid id) { - t_class *c = getClass(id); - - #if FLEXT_SYS == FLEXT_SYS_MAX - if(!IsLib(id)) - #endif - AddSignalMethods(c); - #if FLEXT_SYS == FLEXT_SYS_PD ! add_method1(c,cb_enable,"enable",A_FLOAT); #endif } --- 21,27 ---- void flext_dsp::Setup(t_classid id) { #if FLEXT_SYS == FLEXT_SYS_PD ! // add_method1(c,cb_enable,"enable",A_FLOAT); ! AddMethod(id,0,MakeSymbol("enable"),&cb_enable); #endif } *************** *** 120,123 ****
#if FLEXT_SYS == FLEXT_SYS_PD ! void flext_dsp::cb_enable(flext_hdr *c,t_float on) { thisObject(c)->dspon = on != 0; } #endif --- 114,118 ----
#if FLEXT_SYS == FLEXT_SYS_PD ! //void flext_dsp::cb_enable(flext_hdr *c,t_float on) { thisObject(c)->dspon = on != 0; } ! bool flext_dsp::cb_enable(flext_base *b,float &on) { static_cast<flext_dsp *>(b)->dspon = on != 0; return true; } #endif
Index: fldsp.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/fldsp.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** fldsp.h 11 Oct 2005 22:22:48 -0000 1.19 --- fldsp.h 15 May 2006 23:03:52 -0000 1.20 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 164,168 ****
#if FLEXT_SYS == FLEXT_SYS_PD ! static void cb_enable(flext_hdr *c,t_float on); bool dspon; #endif --- 164,168 ----
#if FLEXT_SYS == FLEXT_SYS_PD ! static bool cb_enable(flext_base *c,float &on); bool dspon; #endif
Index: fllib.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/fllib.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** fllib.cpp 11 Oct 2005 22:22:48 -0000 1.36 --- fllib.cpp 15 May 2006 23:03:52 -0000 1.37 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 214,219 **** // for all classes in library add methods ! flext_base::AddMessageMethods(curlib->clss); ! if(curlib->dsp) flext_base::AddSignalMethods(curlib->clss); #endif
--- 214,218 ---- // for all classes in library add methods ! flext_base::AddMessageMethods(curlib->clss,curlib->dsp); #endif
Index: flext.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flext.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** flext.h 19 Jul 2005 13:17:50 -0000 1.27 --- flext.h 15 May 2006 23:03:52 -0000 1.28 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution.
Index: flatom_pr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flatom_pr.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** flatom_pr.cpp 6 Oct 2005 19:53:34 -0000 1.22 --- flatom_pr.cpp 15 May 2006 23:03:52 -0000 1.23 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 47,54 **** } } else if(IsPointer(a)) { ok = STD::snprintf(buf,bufsz,"%p",GetPointer(a)) > 0; } ! #if FLEXT_SYS == FLEXT_SYS_PD else if(a.a_type == A_DOLLAR) { ok = STD::snprintf(buf,bufsz,"$%d",a.a_w.w_index) > 0; --- 47,56 ---- } } + #if FLEXT_SYS == FLEXT_SYS_PD + #ifndef FLEXT_COMPATIBLE else if(IsPointer(a)) { ok = STD::snprintf(buf,bufsz,"%p",GetPointer(a)) > 0; } ! #endif else if(a.a_type == A_DOLLAR) { ok = STD::snprintf(buf,bufsz,"$%d",a.a_w.w_index) > 0;
Index: flmeth.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmeth.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** flmeth.cpp 11 Oct 2005 22:22:48 -0000 1.21 --- flmeth.cpp 15 May 2006 23:03:52 -0000 1.22 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 65,70 **** } #endif ! #if FLEXT_SYS == FLEXT_SYS_PD ! if(a == a_pointer && flext_base::compatibility) { post("Pointer arguments are not allowed in compatibility mode"); } --- 65,70 ---- } #endif ! #if FLEXT_SYS == FLEXT_SYS_PD && defined(FLEXT_COMPATIBLE) ! if(a == a_pointer) { post("Pointer arguments are not allowed in compatibility mode"); }
Index: flattr_ed.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flattr_ed.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** flattr_ed.cpp 12 Oct 2005 13:59:16 -0000 1.42 --- flattr_ed.cpp 15 May 2006 23:03:52 -0000 1.43 *************** *** 53,58 **** #ifdef FLEXT_ATTRHIDE #ifndef __FLEXT_CLONEWIDGET ! static void (*ori_vis)(t_gobj *c, t_glist *, int vis) = NULL; ! static void (*ori_select)(t_gobj *c, t_glist *, int state) = NULL; #endif #endif --- 53,58 ---- #ifdef FLEXT_ATTRHIDE #ifndef __FLEXT_CLONEWIDGET ! static t_visfn ori_vis = NULL; ! static t_selectfn ori_select = NULL; #endif #endif
Index: flsimd.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsimd.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** flsimd.cpp 1 Sep 2005 23:29:52 -0000 1.21 --- flsimd.cpp 15 May 2006 23:03:52 -0000 1.22 *************** *** 302,306 **** if(cpuinfo.os_support&_CPU_FEATURE_SSE) simdflags += flext::simd_sse; if(cpuinfo.os_support&_CPU_FEATURE_SSE2) simdflags += flext::simd_sse2; ! #elif FLEXT_CPU == FLEXT_CPU_PPC #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
--- 302,306 ---- if(cpuinfo.os_support&_CPU_FEATURE_SSE) simdflags += flext::simd_sse; if(cpuinfo.os_support&_CPU_FEATURE_SSE2) simdflags += flext::simd_sse2; ! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
Index: flclass.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flclass.h,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** flclass.h 12 Dec 2005 00:18:21 -0000 1.67 --- flclass.h 15 May 2006 23:03:52 -0000 1.68 *************** *** 3,7 **** flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. --- 3,7 ---- flext - C++ layer for Max/MSP and pd (pure data) externals
! Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. *************** *** 63,80 **** public:
- /*! \defgroup FLEXT_C_BASE Basic class functionality - @{ - */ - - // --- compatibility mode ---------------------------------------- - - /*! \brief Cross-platform compatibility flag. - If set flext allows only operations valid for all platforms. - Set to true by default! - */ - static bool compatibility; - - //! @} FLEXT_C_BASE - // --- inheritable virtual methods --------------------------------
--- 63,66 ---- *************** *** 841,846 ****
// add class method handlers ! static void AddMessageMethods(t_class *c); ! static void AddSignalMethods(t_class *c);
private: --- 827,831 ----
// add class method handlers ! static void AddMessageMethods(t_class *c,bool dsp);
private: *************** *** 983,986 **** --- 968,977 ---- #endif
+ static void cb_bang(flext_hdr *c); + static void cb_float(flext_hdr *c,t_float f); + static void cb_symbol(flext_hdr *c,const t_symbol *s); + // static void cb_pointer(fltext_hdr *c,const t_gpointer *p); + static void cb_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv); + // proxy object (for additional inlets) static t_class *px_class; *************** *** 993,1016 ****
void init(flext_base *b,int ix) { base = b; index = ix; } ! static void px_method(px_object *c,const t_symbol *s,int argc,t_atom *argv); };
! static void cb_px_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv); ! ! static void cb_px_ft1(flext_hdr *c,float f); ! static void cb_px_ft2(flext_hdr *c,float f); ! static void cb_px_ft3(flext_hdr *c,float f); ! static void cb_px_ft4(flext_hdr *c,float f); ! static void cb_px_ft5(flext_hdr *c,float f); ! static void cb_px_ft6(flext_hdr *c,float f); ! static void cb_px_ft7(flext_hdr *c,float f); ! static void cb_px_ft8(flext_hdr *c,float f); ! static void cb_px_ft9(flext_hdr *c,float f); ! #elif FLEXT_SYS == FLEXT_SYS_MAX typedef object px_object; ! static void cb_px_float(flext_hdr *c,double f); ! static void cb_px_int(flext_hdr *c,long v); ! static void cb_px_bang(flext_hdr *c);
static void cb_px_in1(flext_hdr *c,long v); --- 984,1010 ----
void init(flext_base *b,int ix) { base = b; index = ix; } ! static void px_bang(px_object *c); ! static void px_float(px_object *c,t_float f); ! static void px_symbol(px_object *c,const t_symbol *s); ! // static void px_pointer(px_object *c,const t_gpointer *p); ! static void px_anything(px_object *c,const t_symbol *s,int argc,t_atom *argv); };
! static void cb_px_ft1(flext_hdr *c,t_float f); ! static void cb_px_ft2(flext_hdr *c,t_float f); ! static void cb_px_ft3(flext_hdr *c,t_float f); ! static void cb_px_ft4(flext_hdr *c,t_float f); ! static void cb_px_ft5(flext_hdr *c,t_float f); ! static void cb_px_ft6(flext_hdr *c,t_float f); ! static void cb_px_ft7(flext_hdr *c,t_float f); ! static void cb_px_ft8(flext_hdr *c,t_float f); ! static void cb_px_ft9(flext_hdr *c,t_float f); ! #elif FLEXT_SYS == FLEXT_SYS_MAX typedef object px_object; ! static void cb_bang(flext_hdr *c); ! static void cb_float(flext_hdr *c,double f); ! static void cb_int(flext_hdr *c,long v); ! static void cb_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv);
static void cb_px_in1(flext_hdr *c,long v); *************** *** 1033,1038 **** static void cb_px_ft8(flext_hdr *c,double f); static void cb_px_ft9(flext_hdr *c,double f); - - static void cb_px_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv); #endif
--- 1027,1030 ---- *************** *** 1063,1067 ****
//! set up inlet proxies ! static void SetProxies(t_class *c);
//! initialize inlets (according to class or object constructor definitions) --- 1055,1059 ----
//! set up inlet proxies ! static void SetProxies(t_class *c,bool dsp);
//! initialize inlets (according to class or object constructor definitions)