aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--externals/grill/flext/build.txt2
-rw-r--r--externals/grill/flext/changes.txt1
-rw-r--r--externals/grill/flext/source/flbase.h29
-rw-r--r--externals/grill/flext/source/flclass.h2
-rw-r--r--externals/grill/flext/source/fldefs_setup.h110
-rw-r--r--externals/grill/flext/source/flext.cpp8
-rwxr-xr-xexternals/grill/flext/source/fllib.cpp11
-rwxr-xr-xexternals/grill/flext/source/flmsg.cpp6
-rwxr-xr-xexternals/grill/flext/source/flprefix.h2
-rwxr-xr-xexternals/grill/flext/source/flproxy.cpp20
10 files changed, 143 insertions, 48 deletions
diff --git a/externals/grill/flext/build.txt b/externals/grill/flext/build.txt
index 640b1c04..04eb5248 100644
--- a/externals/grill/flext/build.txt
+++ b/externals/grill/flext/build.txt
@@ -101,7 +101,7 @@ OSX:
Windows:
- Microsoft Visual Studio 6, .NET 2002, .NET 2003 or .NET 2005
- be sure to use the VCVARS32.BAT command on the prompt to set up the environment variables
+ be sure to use the VCVARS32.BAT (or probably SDKVARS.BAT) command on the prompt to set up the environment variables
or
- cygwin with binutils, gcc and make packages
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt
index 469c9ab1..33b06ed6 100644
--- a/externals/grill/flext/changes.txt
+++ b/externals/grill/flext/changes.txt
@@ -39,6 +39,7 @@ Version history:
- more ToOut/Sys* methods
- fixed help name definition at class setup
- added gcc branch hinting
+- PD: possibility to create DSP classes without main DSP inlet (use e.g. FLEXT_DSP0_NEW)
0.5.0:
- fixes for 64 bit builds (size_t is integer type of pointer size)
diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h
index 73b1a21a..640a4688 100644
--- a/externals/grill/flext/source/flbase.h
+++ b/externals/grill/flext/source/flbase.h
@@ -158,11 +158,13 @@ class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj):
static bool HasAttributes(t_classid id);
static bool IsDSP(t_classid id);
+ static bool HasDSPIn(t_classid id);
static bool IsLib(t_classid id);
bool HasAttributes() const;
bool IsLib() const;
bool IsDSP() const;
+ bool HasDSPIn() const;
#if FLEXT_SYS == FLEXT_SYS_MAX
// under Max/MSP it could be necessary to activate DSP also for message objects
@@ -252,7 +254,7 @@ class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj):
// Definitions for library objects
static void lib_init(const char *name,void setupfun());
- static void obj_add(bool lib,bool dsp,bool attr,const char *idname,const char *names,void setupfun(t_classid),FLEXT_CLASSDEF(flext_obj) *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...);
+ static void obj_add(bool lib,bool dsp,bool noi,bool attr,const char *idname,const char *names,void setupfun(t_classid),FLEXT_CLASSDEF(flext_obj) *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...);
#if FLEXT_SYS == FLEXT_SYS_MAX
static flext_hdr *obj_new(const t_symbol *s,short argc,t_atom *argv);
#else
@@ -491,70 +493,69 @@ static void __setup__(t_classid classid) { \
#define ARGMEMBER_t_symtype0(a) ARGMEMBER_t_symptr0(a)
#define ARGCAST(a,tp) ARGMEMBER_##tp(a)
-
-#define REAL_NEW(NAME,NEW_CLASS,DSP,LIB) \
+#define REAL_NEW(NAME,NEW_CLASS,DSP,NOI,LIB) \
flext_obj *NEW_CLASS::__init__(int ,t_atom *) \
{ \
return new NEW_CLASS; \
} \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
- flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,FLEXTTPN_NULL); \
+ flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,FLEXTTPN_NULL); \
} \
FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
-#define REAL_NEW_V(NAME,NEW_CLASS,DSP,LIB) \
+#define REAL_NEW_V(NAME,NEW_CLASS,DSP,NOI,LIB) \
flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
{ \
return new NEW_CLASS(argc,argv); \
} \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
- flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,FLEXTTPN_VAR,FLEXTTPN_NULL); \
+ flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,FLEXTTPN_VAR,FLEXTTPN_NULL); \
} \
FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
-#define REAL_NEW_1(NAME,NEW_CLASS,DSP,LIB, TYPE1) \
+#define REAL_NEW_1(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1) \
flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \
{ \
return new NEW_CLASS(ARGCAST(argv[0],TYPE1)); \
} \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
- flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTPN_NULL); \
+ flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTPN_NULL); \
} \
FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
-#define REAL_NEW_2(NAME,NEW_CLASS,DSP,LIB, TYPE1,TYPE2) \
+#define REAL_NEW_2(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1,TYPE2) \
flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \
{ \
return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2)); \
} \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
- flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTPN_NULL); \
+ flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTPN_NULL); \
} \
FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
-#define REAL_NEW_3(NAME,NEW_CLASS,DSP,LIB, TYPE1, TYPE2, TYPE3) \
+#define REAL_NEW_3(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1, TYPE2, TYPE3) \
flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \
{ \
return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2),ARGCAST(argv[2],TYPE3)); \
} \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
- flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTPN_NULL); \
+ flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTPN_NULL); \
} \
FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
-#define REAL_NEW_4(NAME,NEW_CLASS,DSP,LIB, TYPE1,TYPE2, TYPE3, TYPE4) \
+#define REAL_NEW_4(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1,TYPE2, TYPE3, TYPE4) \
flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \
{ \
return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2),ARGCAST(argv[2],TYPE3),ARGCAST(argv[3],TYPE4)); \
} \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
- flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTP(TYPE4),FLEXTTPN_NULL); \
+ flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTP(TYPE4),FLEXTTPN_NULL); \
} \
FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h
index cbaa5b1b..66fa55d2 100644
--- a/externals/grill/flext/source/flclass.h
+++ b/externals/grill/flext/source/flclass.h
@@ -843,7 +843,7 @@ protected:
static void ToSysMsg(MsgBundle *mb);
// add class method handlers
- static void AddMessageMethods(t_class *c,bool dsp);
+ static void AddMessageMethods(t_class *c,bool dsp,bool dspin);
private:
class pxbnd_object;
diff --git a/externals/grill/flext/source/fldefs_setup.h b/externals/grill/flext/source/fldefs_setup.h
index 11af5d77..17455b39 100644
--- a/externals/grill/flext/source/fldefs_setup.h
+++ b/externals/grill/flext/source/fldefs_setup.h
@@ -59,28 +59,42 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#define FLEXT_NEW(NAME,NEW_CLASS) \
\
-REAL_NEW(NAME,NEW_CLASS,0,0)
+REAL_NEW(NAME,NEW_CLASS,0,0,0)
/*! \brief Implementation of a flext dsp class with no arguments
\ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP(NAME,NEW_CLASS) \
\
-REAL_NEW(NAME,NEW_CLASS,1,0)
+REAL_NEW(NAME,NEW_CLASS,1,0,0)
+
+/*! \brief Implementation of a flext dsp class with no arguments and no dsp inlet
+ \ingroup FLEXT_D_NEW_DSP
+*/
+#define FLEXT_NEW_DSP0(NAME,NEW_CLASS) \
+\
+REAL_NEW(NAME,NEW_CLASS,1,1,0)
/*! \brief Implementation of a flext class (part of a library) with no arguments
\ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB(NAME,NEW_CLASS) \
\
-REAL_NEW(NAME,NEW_CLASS,0,1)
+REAL_NEW(NAME,NEW_CLASS,0,0,1)
/*! \brief Implementation of a flext dsp class (part of a library) with no arguments
\ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP(NAME,NEW_CLASS) \
\
-REAL_NEW(NAME,NEW_CLASS,1,1)
+REAL_NEW(NAME,NEW_CLASS,1,0,1)
+
+/*! \brief Implementation of a flext dsp class (part of a library) with no arguments and no dsp inlet
+ \ingroup FLEXT_D_LIB_DSP
+*/
+#define FLEXT_LIB_DSP0(NAME,NEW_CLASS) \
+\
+REAL_NEW(NAME,NEW_CLASS,1,1,1)
// VARIABLE ARGUMENT LIST
@@ -91,28 +105,42 @@ REAL_NEW(NAME,NEW_CLASS,1,1)
*/
#define FLEXT_NEW_V(NAME,NEW_CLASS) \
\
-REAL_NEW_V(NAME,NEW_CLASS,0,0) \
+REAL_NEW_V(NAME,NEW_CLASS,0,0,0)
/*! \brief Implementation of a flext dsp class with a variable argument list
\ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP_V(NAME,NEW_CLASS) \
\
-REAL_NEW_V(NAME,NEW_CLASS,1,0) \
+REAL_NEW_V(NAME,NEW_CLASS,1,0,0)
+
+/*! \brief Implementation of a flext dsp class with a variable argument list and no dsp inlet
+ \ingroup FLEXT_D_NEW_DSP
+*/
+#define FLEXT_NEW_DSP0_V(NAME,NEW_CLASS) \
+\
+REAL_NEW_V(NAME,NEW_CLASS,1,1,0)
/*! \brief Implementation of a flext class (part of a library) with a variable argument list
\ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB_V(NAME,NEW_CLASS) \
\
-REAL_NEW_V(NAME,NEW_CLASS, 0,1)
+REAL_NEW_V(NAME,NEW_CLASS, 0,0,1)
/*! \brief Implementation of a flext dsp class (part of a library) with a variable argument list
\ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP_V(NAME,NEW_CLASS) \
\
-REAL_NEW_V(NAME,NEW_CLASS, 1,1)
+REAL_NEW_V(NAME,NEW_CLASS, 1,0,1)
+
+/*! \brief Implementation of a flext dsp class (part of a library) with a variable argument list and no dsp inlet
+ \ingroup FLEXT_D_LIB_DSP
+*/
+#define FLEXT_LIB_DSP0_V(NAME,NEW_CLASS) \
+\
+REAL_NEW_V(NAME,NEW_CLASS, 1,1,1)
// ONE ARGUMENT
@@ -123,28 +151,42 @@ REAL_NEW_V(NAME,NEW_CLASS, 1,1)
*/
#define FLEXT_NEW_1(NAME,NEW_CLASS, TYPE) \
\
-REAL_NEW_1(NAME,NEW_CLASS, 0, 0,TYPE) \
+REAL_NEW_1(NAME,NEW_CLASS, 0,0,0, TYPE)
/*! \brief Implementation of a flext dsp class with one argument
\ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP_1(NAME,NEW_CLASS, TYPE) \
\
-REAL_NEW_1(NAME,NEW_CLASS, 1, 0,TYPE) \
+REAL_NEW_1(NAME,NEW_CLASS, 1,0,0, TYPE)
+
+/*! \brief Implementation of a flext dsp class with one argument and no dsp inlet
+ \ingroup FLEXT_D_NEW_DSP
+*/
+#define FLEXT_NEW_DSP0_1(NAME,NEW_CLASS, TYPE) \
+\
+REAL_NEW_1(NAME,NEW_CLASS, 1,1,0, TYPE)
/*! \brief Implementation of a flext class (part of a library) with one argument
\ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB_1(NAME,NEW_CLASS, TYPE) \
\
-REAL_NEW_1(NAME,NEW_CLASS, 0,1,TYPE)
+REAL_NEW_1(NAME,NEW_CLASS, 0,0,1, TYPE)
/*! \brief Implementation of a flext dsp class (part of a library) with one argument
\ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP_1(NAME,NEW_CLASS, TYPE) \
\
-REAL_NEW_1(NAME,NEW_CLASS, 1,1, TYPE)
+REAL_NEW_1(NAME,NEW_CLASS, 1,0,1, TYPE)
+
+/*! \brief Implementation of a flext dsp class (part of a library) with one argument and no dsp inlet
+ \ingroup FLEXT_D_LIB_DSP
+*/
+#define FLEXT_LIB_DSP0_1(NAME,NEW_CLASS, TYPE) \
+\
+REAL_NEW_1(NAME,NEW_CLASS, 1,1,1, TYPE)
// TWO ARGUMENTS
@@ -155,28 +197,42 @@ REAL_NEW_1(NAME,NEW_CLASS, 1,1, TYPE)
*/
#define FLEXT_NEW_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
-REAL_NEW_2(NAME,NEW_CLASS, 0,0, TYPE1, TYPE2) \
+REAL_NEW_2(NAME,NEW_CLASS, 0,0,0, TYPE1, TYPE2)
/*! \brief Implementation of a flext dsp class with 2 arguments
\ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
-REAL_NEW_2(NAME,NEW_CLASS, 1,0, TYPE1, TYPE2) \
+REAL_NEW_2(NAME,NEW_CLASS, 1,0,0, TYPE1, TYPE2)
+
+/*! \brief Implementation of a flext dsp class with 2 arguments and no dsp inlet
+ \ingroup FLEXT_D_NEW_DSP
+*/
+#define FLEXT_NEW_DSP0_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
+\
+REAL_NEW_2(NAME,NEW_CLASS, 1,1,0, TYPE1, TYPE2)
/*! \brief Implementation of a flext class (part of a library) with 2 arguments
\ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
-REAL_NEW_2(NAME,NEW_CLASS, 0,1, TYPE1, TYPE2)
+REAL_NEW_2(NAME,NEW_CLASS, 0,0,1, TYPE1, TYPE2)
/*! \brief Implementation of a flext dsp class (part of a library) with 2 arguments
\ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
-REAL_NEW_2(NAME,NEW_CLASS, 1,1, TYPE1, TYPE2)
+REAL_NEW_2(NAME,NEW_CLASS, 1,0,1, TYPE1, TYPE2)
+
+/*! \brief Implementation of a flext dsp class (part of a library) with 2 arguments and no dsp inlet
+ \ingroup FLEXT_D_LIB_DSP
+*/
+#define FLEXT_LIB_DSP0_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
+\
+REAL_NEW_2(NAME,NEW_CLASS, 1,1,1, TYPE1, TYPE2)
// THREE ARGUMENTS
@@ -187,28 +243,42 @@ REAL_NEW_2(NAME,NEW_CLASS, 1,1, TYPE1, TYPE2)
*/
#define FLEXT_NEW_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
-REAL_NEW_3(NAME,NEW_CLASS, 0,0, TYPE1, TYPE2, TYPE3) \
+REAL_NEW_3(NAME,NEW_CLASS, 0,0,0, TYPE1, TYPE2, TYPE3)
/*! \brief Implementation of a flext dsp class with 3 arguments
\ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
-REAL_NEW_3(NAME,NEW_CLASS, 1,0, TYPE1, TYPE2, TYPE3) \
+REAL_NEW_3(NAME,NEW_CLASS, 1,0,0, TYPE1, TYPE2, TYPE3)
+
+/*! \brief Implementation of a flext dsp class with 3 arguments and no dsp inlet
+ \ingroup FLEXT_D_NEW_DSP
+*/
+#define FLEXT_NEW_DSP0_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
+\
+REAL_NEW_3(NAME,NEW_CLASS, 1,1,0, TYPE1, TYPE2, TYPE3)
/*! \brief Implementation of a flext class (part of a library) with 3 arguments
\ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
-REAL_NEW_3(NAME,NEW_CLASS, 0,1,TYPE1, TYPE2, TYPE3)
+REAL_NEW_3(NAME,NEW_CLASS, 0,0,1, TYPE1, TYPE2, TYPE3)
/*! \brief Implementation of a flext dsp class (part of a library) with 3 arguments
\ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
-REAL_NEW_3(NAME,NEW_CLASS, 1,1, TYPE1, TYPE2, TYPE3)
+REAL_NEW_3(NAME,NEW_CLASS, 1,0,1, TYPE1, TYPE2, TYPE3)
+
+/*! \brief Implementation of a flext dsp class (part of a library) with 3 arguments and no dsp inlet
+ \ingroup FLEXT_D_LIB_DSP
+*/
+#define FLEXT_LIB_DSP0_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
+\
+REAL_NEW_3(NAME,NEW_CLASS, 1,1,1, TYPE1, TYPE2, TYPE3)
// deprecated stuff
diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp
index afb7cdff..4a8e65e2 100644
--- a/externals/grill/flext/source/flext.cpp
+++ b/externals/grill/flext/source/flext.cpp
@@ -140,7 +140,7 @@ void flext_base::Exit()
}
-void flext_base::AddMessageMethods(t_class *c,bool dsp)
+void flext_base::AddMessageMethods(t_class *c,bool dsp,bool dspin)
{
add_loadbang(c,cb_loadbang);
@@ -159,7 +159,8 @@ void flext_base::AddMessageMethods(t_class *c,bool dsp)
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
+ if(dspin)
+ 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!
@@ -178,10 +179,9 @@ void flext_base::Setup(t_classid id)
#if FLEXT_SYS == FLEXT_SYS_MAX
if(!IsLib(id))
#endif
- AddMessageMethods(c,IsDSP(id));
+ AddMessageMethods(c,IsDSP(id),HasDSPIn(id));
if(HasAttributes(id)) {
-// if(process_attributes) {
AddMethod(id,0,"getattributes",cb_ListAttrib);
AddMethod(id,0,"getmethods",cb_ListMethods);
diff --git a/externals/grill/flext/source/fllib.cpp b/externals/grill/flext/source/fllib.cpp
index a7b98335..955350ad 100755
--- a/externals/grill/flext/source/fllib.cpp
+++ b/externals/grill/flext/source/fllib.cpp
@@ -141,7 +141,7 @@ public:
int *argv;
flext_library *lib;
- bool dsp,attr,dist;
+ bool dsp:1,noi:1,attr:1,dist:1;
flext_base::ItemCont meths,attrs;
};
@@ -171,10 +171,12 @@ static flext_class *FindName(const t_symbol *s,flext_class *o = NULL)
t_class *flext_obj::getClass(t_classid cl) { return cl->clss; }
bool flext_obj::HasAttributes(t_classid cl) { return cl->attr; }
bool flext_obj::IsDSP(t_classid cl) { return cl->dsp; }
+bool flext_obj::HasDSPIn(t_classid cl) { return !cl->noi; }
bool flext_obj::IsLib(t_classid cl) { return cl->lib != NULL; }
bool flext_obj::HasAttributes() const { return clss->attr; }
bool flext_obj::IsDSP() const { return clss->dsp; }
+bool flext_obj::HasDSPIn() const { return !clss->noi; }
bool flext_obj::IsLib() const { return clss->lib != NULL; }
#if FLEXT_SYS == FLEXT_SYS_MAX
@@ -224,7 +226,7 @@ void flext_obj::lib_init(const char *name,void setupfun())
curlib = NULL;
}
-void flext_obj::obj_add(bool lib,bool dsp,bool attr,const char *idname,const char *names,void setupfun(t_classid),flext_obj *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...)
+void flext_obj::obj_add(bool lib,bool dsp,bool noi,bool attr,const char *idname,const char *names,void setupfun(t_classid),flext_obj *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...)
{
// get first possible object name
const t_symbol *nsym = MakeSymbol(extract(names));
@@ -274,6 +276,7 @@ void flext_obj::obj_add(bool lib,bool dsp,bool attr,const char *idname,const cha
flext_class *lo = new flext_class(*cl,newfun,freefun);
lo->lib = curlib;
lo->dsp = dsp;
+ lo->noi = noi;
lo->attr = attr;
// post("ADDCLASS %s,%s = %p -> LIBOBJ %p -> %p (lib=%i,dsp=%i)",idname,names,*cl,lo,lo->clss,lib?1:0,dsp?1:0);
@@ -345,10 +348,10 @@ void flext_obj::obj_add(bool lib,bool dsp,bool attr,const char *idname,const cha
setupfun(clid);
}
catch(std::exception &x) {
- error("%s - Exception while initializing class: %s",idname,x.what());
+ error("%s: %s",idname,x.what());
}
catch(char *txt) {
- error("%s - Exception while initializing class: %s",idname,txt);
+ error("%s: %s",idname,txt);
}
catch(...) {
error("%s - Unknown exception while initializing class",idname);
diff --git a/externals/grill/flext/source/flmsg.cpp b/externals/grill/flext/source/flmsg.cpp
index 9d8d8250..2fd06652 100755
--- a/externals/grill/flext/source/flmsg.cpp
+++ b/externals/grill/flext/source/flmsg.cpp
@@ -256,15 +256,15 @@ bool flext_base::CbMethodHandler(int inlet,const t_symbol *s,int argc,const t_at
if(!ret) ret = CbMethodResort(inlet,s,argc,argv);
}
catch(std::exception &x) {
- error("%s - Exception while processing method: %s",thisName(),x.what());
+ error("%s - %s: %s",thisName(),GetString(s),x.what());
ret = false;
}
catch(const char *txt) {
- error("%s - Exception while processing method: %s",thisName(),txt);
+ error("%s - %s: %s",thisName(),GetString(s),txt);
ret = false;
}
catch(...) {
- error("%s - Unknown exception while processing method",thisName());
+ error("%s - %s : Unknown exception while processing method",thisName(),GetString(s));
ret = false;
}
diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h
index 0855f73d..490899de 100755
--- a/externals/grill/flext/source/flprefix.h
+++ b/externals/grill/flext/source/flprefix.h
@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
-Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org)
+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.
diff --git a/externals/grill/flext/source/flproxy.cpp b/externals/grill/flext/source/flproxy.cpp
index 08bf1352..6126d4b7 100755
--- a/externals/grill/flext/source/flproxy.cpp
+++ b/externals/grill/flext/source/flproxy.cpp
@@ -79,6 +79,26 @@ void flext_base::cb_pointer(flext_hdr *c,const t_gpointer *p)
void flext_base::cb_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv)
{
+ if(UNLIKELY(!s)) {
+ // apparently, this happens only in one case... object is a DSP object, but has no main DSP inlet...
+
+ // interpret tag from args
+ if(!argc)
+ s = sym_bang;
+ else if(argc == 1) {
+ if(IsFloat(*argv))
+ s = sym_float;
+ else if(IsSymbol(*argv))
+ s = sym_symbol;
+ else if(IsPointer(*argv))
+ s = sym_pointer;
+ else
+ FLEXT_ASSERT(false);
+ }
+ else
+ s = sym_list;
+ }
+
thisObject(c)->CbMethodHandler(0,s,argc,argv);
}