diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-11-10 03:42:03 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-11-10 03:42:03 +0000 |
commit | 8a2c6d3d86df5076510e02315b354b3194e243e1 (patch) | |
tree | 3dcd8a5d977932f65982851c0f24d989787f4b9a /externals | |
parent | d60f7df8256c9326c08ce207efe4b5609bc64571 (diff) |
""
svn path=/trunk/; revision=1176
Diffstat (limited to 'externals')
-rw-r--r-- | externals/grill/flext/changes.txt | 2 | ||||
-rw-r--r-- | externals/grill/flext/source/flclass.h | 4 | ||||
-rw-r--r-- | externals/grill/flext/source/flout.cpp | 27 | ||||
-rwxr-xr-x | externals/grill/flext/source/flqueue.cpp | 6 | ||||
-rw-r--r-- | externals/grill/flext/source/flsupport.h | 2 | ||||
-rw-r--r-- | externals/grill/pool/config-pd-msvc.txt | 3 | ||||
-rw-r--r-- | externals/grill/vasp/changes.txt | 1 | ||||
-rw-r--r-- | externals/grill/vasp/config-pd-msvc.txt | 3 | ||||
-rw-r--r-- | externals/grill/vasp/makefile.pd-msvc | 2 | ||||
-rw-r--r-- | externals/grill/vasp/source/arg.h | 3 | ||||
-rw-r--r-- | externals/grill/vasp/source/buflib.cpp | 11 | ||||
-rw-r--r-- | externals/grill/vasp/source/env.h | 3 | ||||
-rw-r--r-- | externals/grill/vasp/source/main.cpp | 2 | ||||
-rw-r--r-- | externals/grill/vasp/source/vasp.h | 7 | ||||
-rw-r--r-- | externals/grill/vasp/source/vecblk.h | 3 | ||||
-rw-r--r-- | externals/grill/vst/config-pd-msvc.txt | 28 | ||||
-rw-r--r-- | externals/grill/vst/makefile.pd-msvc | 17 | ||||
-rw-r--r-- | externals/grill/vst/vst.vcproj | 2 |
18 files changed, 62 insertions, 64 deletions
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index b1999338..ed9aaa44 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -25,7 +25,7 @@ Version history: - flext::StopThread function to terminate running threads (started with LaunchThread) - added flext::post() and flext::error() console printing (thread-safe) - added flext::CmpAtom and AtomList::operator < methods ... useful for using lists as keys for STL -- make use of new PD thread locking (PD functions sys_lock() and sys_unlock()) +- make use of new PD thread locking (PD functions sys_lock() and sys_unlock()), queue messages only if necessary - better FLEXT_OSAPI resolution - ListAttributes (or the getattributes message) now lists attributes in the order they were created (first class, then object scope) - enforcing usage of STL diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h index 17842bd2..721c3f5f 100644 --- a/externals/grill/flext/source/flclass.h +++ b/externals/grill/flext/source/flclass.h @@ -835,6 +835,10 @@ private: //! Start message queue static void StartQueue(); +#ifdef FLEXT_QTHR + //! Queue worker function + static void QWorker(thr_params *); +#endif //! Flush messages in the queue static void QFlush(flext_base *th = NULL); diff --git a/externals/grill/flext/source/flout.cpp b/externals/grill/flext/source/flout.cpp index a2f69978..85a9b934 100644 --- a/externals/grill/flext/source/flout.cpp +++ b/externals/grill/flext/source/flout.cpp @@ -38,22 +38,23 @@ void flext_base::ToSysAnything(int n,const t_symbol *s,int argc,const t_atom *ar #error Not implemented #endif -#ifndef FLEXT_THREADS -void flext_base::ToOutBang(int n) const { ToSysBang(n); } -void flext_base::ToOutFloat(int n,float f) const { ToSysFloat(n,f); } -void flext_base::ToOutInt(int n,int f) const { ToSysInt(n,f); } -void flext_base::ToOutSymbol(int n,const t_symbol *s) const { ToSysSymbol(n,s); } -void flext_base::ToOutList(int n,int argc,const t_atom *argv) const { ToSysList(n,argc,argv); } -void flext_base::ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { ToSysAnything(n,s,argc,argv); } +#if defined(FLEXT_THREADS) + #if defined(FLEXT_QTHR) + #define CHKTHR() (IsSystemThread() || IsThread(flext::thrmsgid)) + #else + #define CHKTHR() IsSystemThread() + #endif #else -void flext_base::ToOutBang(int n) const { if(IsSystemThread()) ToSysBang(n); else ToQueueBang(n); } -void flext_base::ToOutFloat(int n,float f) const { if(IsSystemThread()) ToSysFloat(n,f); else ToQueueFloat(n,f); } -void flext_base::ToOutInt(int n,int f) const { if(IsSystemThread()) ToSysInt(n,f); else ToQueueInt(n,f); } -void flext_base::ToOutSymbol(int n,const t_symbol *s) const { if(IsSystemThread()) ToSysSymbol(n,s); else ToQueueSymbol(n,s); } -void flext_base::ToOutList(int n,int argc,const t_atom *argv) const { if(IsSystemThread()) ToSysList(n,argc,argv); else ToQueueList(n,argc,argv); } -void flext_base::ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { if(IsSystemThread()) ToSysAnything(n,s,argc,argv); else ToQueueAnything(n,s,argc,argv); } + #define CHKTHR() true #endif +void flext_base::ToOutBang(int n) const { if(CHKTHR()) ToSysBang(n); else ToQueueBang(n); } +void flext_base::ToOutFloat(int n,float f) const { if(CHKTHR()) ToSysFloat(n,f); else ToQueueFloat(n,f); } +void flext_base::ToOutInt(int n,int f) const { if(CHKTHR()) ToSysInt(n,f); else ToQueueInt(n,f); } +void flext_base::ToOutSymbol(int n,const t_symbol *s) const { if(CHKTHR()) ToSysSymbol(n,s); else ToQueueSymbol(n,s); } +void flext_base::ToOutList(int n,int argc,const t_atom *argv) const { if(CHKTHR()) ToSysList(n,argc,argv); else ToQueueList(n,argc,argv); } +void flext_base::ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { if(CHKTHR()) ToSysAnything(n,s,argc,argv); else ToQueueAnything(n,s,argc,argv); } + bool flext_base::InitInlets() { diff --git a/externals/grill/flext/source/flqueue.cpp b/externals/grill/flext/source/flqueue.cpp index a75b4a89..ee1da752 100755 --- a/externals/grill/flext/source/flqueue.cpp +++ b/externals/grill/flext/source/flqueue.cpp @@ -19,6 +19,9 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flext.h" #include "flinternal.h" +//! Thread id of message queue thread +flext::thrid_t flext::thrmsgid = 0; + class qmsg { public: @@ -237,8 +240,9 @@ static void Queue(qmsg *m) } #ifdef FLEXT_QTHR -void QWorker(flext::thr_params *) +void flext_base::QWorker(thr_params *) { + thrmsgid = GetThreadId(); for(;;) { qthrcond.Wait(); QWork(true,true); diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index f336d0de..5ec2b64a 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -720,7 +720,7 @@ public: protected: - static thrid_t thrhelpid; + static thrid_t thrhelpid,thrmsgid; static bool StartHelper(); static bool StopHelper(); static void ThrHelper(void *); diff --git a/externals/grill/pool/config-pd-msvc.txt b/externals/grill/pool/config-pd-msvc.txt index 9752fa5f..930bd9d4 100644 --- a/externals/grill/pool/config-pd-msvc.txt +++ b/externals/grill/pool/config-pd-msvc.txt @@ -9,7 +9,8 @@ PDPATH=c:\programme\audio\pd FLEXTPATH=$(PDPATH)\flext # where is MS VC++? -MSVCPATH=c:\programme\prog\microsoft visual studio\VC98 +# (only necessary if not started with build environment) +# MSVCPATH=c:\programme\prog\microsoft visual studio\VC98 # where should the external be built? OUTPATH=pd-msvc diff --git a/externals/grill/vasp/changes.txt b/externals/grill/vasp/changes.txt index c9c7a34e..5d79e4dc 100644 --- a/externals/grill/vasp/changes.txt +++ b/externals/grill/vasp/changes.txt @@ -20,6 +20,7 @@ Version history: - ADD: vasp.search (vasp.o=, vasp.f=) objects... @incl attribute (default false) to include current sample into search - ADD: [vasp.channels?] reports number of channels in the first vasp vector (buffer/array) - CHANGE: vasp.min?, vasp.max?, vasp.amin?, vasp.amax?, vasp.rmin?, vasp.rmax? no longer return the reference vasp / return a list of vector maxima/minima +- CHANGE: inherited several classes from the flext class, so that new and delete use the RT-system functions 0.1.2: - FIX: bug in vasp.frames* ... wrong argument diff --git a/externals/grill/vasp/config-pd-msvc.txt b/externals/grill/vasp/config-pd-msvc.txt index 1ae24513..d4b1d0e2 100644 --- a/externals/grill/vasp/config-pd-msvc.txt +++ b/externals/grill/vasp/config-pd-msvc.txt @@ -9,7 +9,8 @@ PDPATH=c:\programme\audio\pd FLEXTPATH=$(PDPATH)\flext # where is MS VC++? -MSVCPATH=c:\programme\prog\microsoft visual studio\VC98 +# (only necessary if not run from within the build environment) +# MSVCPATH=c:\programme\prog\microsoft visual studio\VC98 # where should the external be built? OUTPATH=pd-msvc diff --git a/externals/grill/vasp/makefile.pd-msvc b/externals/grill/vasp/makefile.pd-msvc index 1ab086f8..f43a2b9d 100644 --- a/externals/grill/vasp/makefile.pd-msvc +++ b/externals/grill/vasp/makefile.pd-msvc @@ -17,7 +17,7 @@ LIBS=pd.lib pthreadVC.lib flext_t-pdwin.lib # compiler definitions and flags DEFS=/DFLEXT_SYS=2 /DFLEXT_THREADS -CFLAGS=/GR /GX- /GD /G6 /Ox /MT +CFLAGS=/GR /G6 /Ox /MT /EHsc # the rest can stay untouched # ---------------------------------------------- diff --git a/externals/grill/vasp/source/arg.h b/externals/grill/vasp/source/arg.h index bda3ef01..cd0f70a1 100644 --- a/externals/grill/vasp/source/arg.h +++ b/externals/grill/vasp/source/arg.h @@ -19,7 +19,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. #define VASP_ARG_R(VAL) Argument().SetR(VAL) #define VASP_ARG_CX(RV,IV) Argument().SetCX(RV,IV) -class Argument +class Argument: + public flext { public: Argument(); diff --git a/externals/grill/vasp/source/buflib.cpp b/externals/grill/vasp/source/buflib.cpp index b3595158..41754a20 100644 --- a/externals/grill/vasp/source/buflib.cpp +++ b/externals/grill/vasp/source/buflib.cpp @@ -26,7 +26,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif -class FreeEntry +class FreeEntry: + public flext { public: FreeEntry(const t_symbol *s): sym(s),nxt(NULL) {} @@ -35,7 +36,8 @@ public: FreeEntry *nxt; }; -class BufEntry +class BufEntry: + public flext { public: BufEntry(const t_symbol *s,I fr,BL zero = true); @@ -68,16 +70,17 @@ static V FreeLibSym(const t_symbol *s); BufEntry::BufEntry(const t_symbol *s,I fr,BL zero): sym(s), - alloc(fr),len(fr),data(new S[fr]), + alloc(fr),len(fr), refcnt(0),nxt(NULL) { + data = (S *)NewAligned(fr*sizeof(S)); if(zero) flext::ZeroMem(data,len*sizeof(*data)); } BufEntry::~BufEntry() { if(sym) FreeLibSym(sym); - if(data) delete[] data; + if(data) FreeAligned(data); } V BufEntry::IncRef() { ++refcnt; } diff --git a/externals/grill/vasp/source/env.h b/externals/grill/vasp/source/env.h index 5b00ffae..11ad68ab 100644 --- a/externals/grill/vasp/source/env.h +++ b/externals/grill/vasp/source/env.h @@ -13,7 +13,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "vasp.h" -class Env +class Env: + public flext { public: Env(): cnt(0),pos(NULL),val(NULL) {} diff --git a/externals/grill/vasp/source/main.cpp b/externals/grill/vasp/source/main.cpp index 67d151ac..60352bda 100644 --- a/externals/grill/vasp/source/main.cpp +++ b/externals/grill/vasp/source/main.cpp @@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "classes.h" -const C *VASP_VERSION = "0.1.3pre10"; +const C *VASP_VERSION = "0.1.3pre11"; #include "opfuns.h" diff --git a/externals/grill/vasp/source/vasp.h b/externals/grill/vasp/source/vasp.h index ed63846f..0cc80be8 100644 --- a/externals/grill/vasp/source/vasp.h +++ b/externals/grill/vasp/source/vasp.h @@ -13,10 +13,13 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "vbuffer.h" -class Vasp +class Vasp: + public flext { public: - class Ref { + class Ref: + public flext + { public: Ref(): sym(NULL) {} Ref(VBuffer &b); diff --git a/externals/grill/vasp/source/vecblk.h b/externals/grill/vasp/source/vecblk.h index a938558e..7ca4ca94 100644 --- a/externals/grill/vasp/source/vecblk.h +++ b/externals/grill/vasp/source/vecblk.h @@ -13,7 +13,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "vasp.h" -class VecBlock +class VecBlock: + public flext { public: diff --git a/externals/grill/vst/config-pd-msvc.txt b/externals/grill/vst/config-pd-msvc.txt index 1cb31aab..308bfcc3 100644 --- a/externals/grill/vst/config-pd-msvc.txt +++ b/externals/grill/vst/config-pd-msvc.txt @@ -1,50 +1,26 @@ # vst~ - VST plugin external for PD - # based on the work of Jarno SeppŠnen and Mark Williamson - # - # Copyright (c)Thomas Grill (xovo@gmx.net) - # For information on usage and redistribution, and for a DISCLAIMER OF ALL - # WARRANTIES, see the file, "license.txt," in this distribution. - # - - - # where is PD? - PDPATH=c:\programme\audio\pd - - # where do the flext libraries reside? - FLEXTPATH=$(PDPATH)\flext - - # where is MS VC++? - -MSVCPATH=c:\programme\prog\microsoft visual studio\VC98 - - - +# (only necessary if not run from within the build environment) +# MSVCPATH=c:\programme\prog\microsoft visual studio\VC98 # where should the external be built? - OUTPATH=pd-msvc - - # where should the external be installed? - # (leave blank to omit installation) - INSTDIR=$(PDPATH)\extra - diff --git a/externals/grill/vst/makefile.pd-msvc b/externals/grill/vst/makefile.pd-msvc index eee2a478..cbcb09c3 100644 --- a/externals/grill/vst/makefile.pd-msvc +++ b/externals/grill/vst/makefile.pd-msvc @@ -1,7 +1,7 @@ -# FFTease - A set of Live Spectral Processors -# Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform +# vst~ - VST plugin external for PD +# based on the work of Jarno Seppänen and Mark Williamson # -# Copyright (c)Thomas Grill (xovo@gmx.net) +# Copyright (c) Thomas Grill (xovo@gmx.net) # For information on usage and redistribution, and for a DISCLAIMER OF ALL # WARRANTIES, see the file, "license.txt," in this distribution. # @@ -16,13 +16,14 @@ # includes INCPATH=/I"$(MSVCPATH)\include" /I"$(MSVCPATH)\mfc\include" /I"$(PDPATH)\src" /I"$(FLEXTPATH)" -LIBPATH=/LIBPATH:"$(MSVCPATH)\lib" /LIBPATH:"$(MSVCPATH)\mfc\lib" /LIBPATH:"$(PDPATH)\bin" /LIBPATH:"$(FLEXTPATH)" -LIBS=pd.lib pthreadVC.lib flext_t-pdwin.lib +LIBPATH=/LIBPATH:"$(PDPATH)\bin" /LIBPATH:"$(FLEXTPATH)" /LIBPATH:"$(MSVCPATH)\lib" /LIBPATH:"$(MSVCPATH)\mfc\lib" +LIBS=pd.lib pthreadVC.lib flext_t-pdwin.lib # DelayImp.lib # compiler definitions and flags -DEFS=/DFLEXT_SYS=2 /DFLEXT_THREADS +DEFS=/D_USRDLL /D_WINDLL /D_MBCS /DFLEXT_SYS=2 /DFLEXT_THREADS -CFLAGS=/GR- /GX- /GD /G6 /Ox /MT +CFLAGS=/G6 /Ox /MT /EHsc +# LDFLAGS=/DELAYLOAD:OleAcc.dll # the rest can stay untouched # ---------------------------------------------- @@ -60,7 +61,7 @@ $(OUTPATH): $(OUTPATH)\$(NAME).dll: $(OBJS) cd $(OUTPATH) - link /DLL /out:$(NAME).dll /INCREMENTAL:NO $** $(LIBS) $(LIBPATH) + link /DLL $(LDFLAGS) /out:$(NAME).dll /INCREMENTAL:NO $** $(LIBS) $(LIBPATH) @-del *.exp @-del *.lib cd .. diff --git a/externals/grill/vst/vst.vcproj b/externals/grill/vst/vst.vcproj index 36d8f3c2..56eca6c3 100644 --- a/externals/grill/vst/vst.vcproj +++ b/externals/grill/vst/vst.vcproj @@ -33,7 +33,7 @@ StringPooling="TRUE" RuntimeLibrary="0" EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" + UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> |