diff options
Diffstat (limited to 'externals/grill/flext/source')
-rw-r--r-- | externals/grill/flext/source/flbase.cpp | 20 | ||||
-rw-r--r-- | externals/grill/flext/source/flbase.h | 3 | ||||
-rwxr-xr-x | externals/grill/flext/source/flqueue.cpp | 6 |
3 files changed, 27 insertions, 2 deletions
diff --git a/externals/grill/flext/source/flbase.cpp b/externals/grill/flext/source/flbase.cpp index 2fd25e8e..9b2d5506 100644 --- a/externals/grill/flext/source/flbase.cpp +++ b/externals/grill/flext/source/flbase.cpp @@ -120,3 +120,23 @@ const t_symbol *flext_obj::GetParamSym(const t_symbol *sym,t_canvas *c) return sym; } + +#if FLEXT_SYS == FLEXT_SYS_PD +// this declaration is missing in m_pd.h (0.37-0 and -1) +extern "C" void canvas_getargs(int *argcp, t_atom **argvp); +#endif + + +void flext_obj::CanvasArgs(AtomList &args) const +{ +#if FLEXT_SYS == FLEXT_SYS_PD + int argc; + t_atom *argv; + canvas_getargs(&argc,&argv); + args(argc); + for(int i = 0; i < argc; ++i) args[i] = argv[i]; +#else + #pragma message("Not implemented") + args(0); +#endif +} diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h index 594bfbfc..3c190c99 100644 --- a/externals/grill/flext/source/flbase.h +++ b/externals/grill/flext/source/flbase.h @@ -260,6 +260,9 @@ class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj): //! Convert $0 or #0 symbol into appropriate value static const t_symbol *GetParamSym(const t_symbol *s,t_canvas *c); + //! Get the canvas arguments + void CanvasArgs(AtomList &args) const; + //! @} FLEXT_O_INTERNAL //! @} FLEXT_OBJCLASS diff --git a/externals/grill/flext/source/flqueue.cpp b/externals/grill/flext/source/flqueue.cpp index 747c4cc8..aaf82fef 100755 --- a/externals/grill/flext/source/flqueue.cpp +++ b/externals/grill/flext/source/flqueue.cpp @@ -84,8 +84,10 @@ static flext::ThrMutex qmutex; static void QWork(bool qlock,bool syslock) { for(;;) { - // since qcnt can only be increased from any other function than QWork - // qc will be a minimum guaranteed number of present queue elements + // Since qcnt can only be increased from any other function than QWork + // qc will be a minimum guaranteed number of present queue elements. + // On the other hand, if new queue elements are added by the methods called + // in the loop, these will be sent in the next tick to avoid recursion overflow. int qc = qcnt; if(!qc) break; |