aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext/source/flext.cpp')
-rw-r--r--externals/grill/flext/source/flext.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp
index df0f0b61..acbbf2ad 100644
--- a/externals/grill/flext/source/flext.cpp
+++ b/externals/grill/flext/source/flext.cpp
@@ -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.
@@ -19,7 +19,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
// === flext_base ============================================
-bool flext_base::compatibility = true;
const t_symbol *flext_base::curtag = NULL;
flext_base::FLEXT_CLASSDEF(flext_base)()
@@ -141,35 +140,34 @@ void flext_base::Exit()
}
-void flext_base::AddMessageMethods(t_class *c)
+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);
#elif FLEXT_SYS == FLEXT_SYS_MAX
add_assist(c,cb_assist);
add_dblclick(c,cb_click);
-#else
- #pragma message ("no implementation of loadbang or assist")
#endif
- SetProxies(c);
+ SetProxies(c,dsp);
StartQueue();
-}
-
-void flext_base::AddSignalMethods(t_class *c)
-{
+
+ if(dsp) {
#if FLEXT_SYS == FLEXT_SYS_MAX
- add_dsp(c,cb_dsp);
- dsp_initclass();
+ 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);
+ 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
*/
@@ -180,7 +178,7 @@ void flext_base::Setup(t_classid id)
#if FLEXT_SYS == FLEXT_SYS_MAX
if(!IsLib(id))
#endif
- AddMessageMethods(c);
+ AddMessageMethods(c,IsDSP(id));
if(process_attributes) {
AddMethod(id,0,"getattributes",cb_ListAttrib);