diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-01-30 04:36:06 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-01-30 04:36:06 +0000 |
commit | 392f24a84a7ca535a7132cfe0a8da55aa28733ce (patch) | |
tree | 9b546e31a6d682c1abf67afb4c06397c488683a2 /externals/grill/flext | |
parent | c1313aea8746276cc4de4dbd177f6bf732db2a05 (diff) |
""
svn path=/trunk/; revision=366
Diffstat (limited to 'externals/grill/flext')
-rw-r--r-- | externals/grill/flext/flext.dsp | 8 | ||||
-rw-r--r-- | externals/grill/flext/readme.txt | 1 | ||||
-rw-r--r-- | externals/grill/flext/source/fldsp.cpp | 3 | ||||
-rwxr-xr-x | externals/grill/flext/source/flprefix.h | 1 | ||||
-rw-r--r-- | externals/grill/flext/source/flsupport.h | 20 |
5 files changed, 23 insertions, 10 deletions
diff --git a/externals/grill/flext/flext.dsp b/externals/grill/flext/flext.dsp index a0f6b623..ef145039 100644 --- a/externals/grill/flext/flext.dsp +++ b/externals/grill/flext/flext.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Intermediate_Dir "pd-msvc\s" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /G6 /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /I "f:\prog\packs\stk\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /YX"flext.h" /FD /c +# ADD CPP /nologo /G6 /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\audio\sndobj\include" /I "f:\prog\audio\stk\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /YX"flext.h" /FD /c # ADD BASE RSC /l 0xc07 /d "NDEBUG" # ADD RSC /l 0xc07 /d "NDEBUG" BSC32=bscmake.exe @@ -66,7 +66,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "pd-msvc\sd" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /I "f:\prog\packs\stk\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /FR /YX"flext.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\audio\sndobj\include" /I "f:\prog\audio\stk\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /FR /YX"flext.h" /FD /GZ /c # ADD BASE RSC /l 0xc07 /d "_DEBUG" # ADD RSC /l 0xc07 /d "_DEBUG" BSC32=bscmake.exe @@ -89,7 +89,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "pd-msvc\td" # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /I "f:\prog\packs\stk\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "FLEXT_SYS_PD" /D "FLEXT_THREADS" /FR /YX"flext.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\audio\sndobj\include" /I "f:\prog\audio\stk\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "FLEXT_SYS_PD" /D "FLEXT_THREADS" /FR /YX"flext.h" /FD /GZ /c # ADD BASE RSC /l 0xc07 /d "_DEBUG" # ADD RSC /l 0xc07 /d "_DEBUG" BSC32=bscmake.exe @@ -112,7 +112,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "pd-msvc\t" # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /YX /FD /c -# ADD CPP /nologo /G6 /MT /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /I "f:\prog\packs\stk\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /D "FLEXT_THREADS" /YX"flext.h" /FD /c +# ADD CPP /nologo /G6 /MT /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\audio\sndobj\include" /I "f:\prog\audio\stk\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /D "FLEXT_THREADS" /YX"flext.h" /FD /c # ADD BASE RSC /l 0xc07 /d "NDEBUG" # ADD RSC /l 0xc07 /d "NDEBUG" BSC32=bscmake.exe diff --git a/externals/grill/flext/readme.txt b/externals/grill/flext/readme.txt index d2005eed..bcffda75 100644 --- a/externals/grill/flext/readme.txt +++ b/externals/grill/flext/readme.txt @@ -117,6 +117,7 @@ Version history: - introduced default returns for the different flext::GetA* functions - pragma for Metrowerks compilers: enumsalwaysint on, bool on - MaxMSP: added assist string for attribute outlets +- added new POSIX for ThrCond::TimedWait (but still have to find out when to enable it....) 0.4.1: - full port for Max@OSX diff --git a/externals/grill/flext/source/fldsp.cpp b/externals/grill/flext/source/fldsp.cpp index 13eab25d..f6270261 100644 --- a/externals/grill/flext/source/fldsp.cpp +++ b/externals/grill/flext/source/fldsp.cpp @@ -186,8 +186,7 @@ void flext_dsp::m_dsp(int /*n*/,t_signalvec const * /*insigs*/,t_signalvec const void flext_dsp::m_signal(int n,t_sample *const * /*insigs*/,t_sample *const *outs) { - for(int i = 0; i < CntOutSig(); ++i) - memset(outs[i],0,n*sizeof(*outs[i])); + for(int i = 0; i < CntOutSig(); ++i) ZeroMem(outs[i],n*sizeof(*outs[i])); } #if FLEXT_SYS != FLEXT_SYS_MAX diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h index f12d1320..51c88096 100755 --- a/externals/grill/flext/source/flprefix.h +++ b/externals/grill/flext/source/flprefix.h @@ -211,7 +211,6 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif - #if FLEXT_OS == FLEXT_OS_WIN // #pragma message("Compiling for Windows") diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index 3f771ea0..e2350d04 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -16,6 +16,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #define __FLSUPPORT_H #include "flstdc.h" +#include <time.h> class FLEXT_SHARE flext_base; @@ -729,11 +730,24 @@ public: } /*! \brief Wait for condition (for a certain time) - \param time Wait time in seconds + \param ftime Wait time in seconds + \ret 0 = signalled, 1 = timed out + \remark Depending on the implementation ftime may not be fractional. + \remark So if ftime = 0 this may suck away your cpu if used in a signalled loop. */ - bool TimedWait(float time) + bool TimedWait(float ftime) { - timespec tm; tm.tv_sec = (long)time; tm.tv_nsec = (long)((time-(long)time)*1.e9); + timespec tm; +#if 0 // find out when the following is defined + clock_gettime(CLOCK_REALTIME,tm); + tm.tv_nsec += (long)((ftime-(long)ftime)*1.e9); + long nns = tm.tv_nsec%1000000000; + tm.tv_sec += (long)ftime+(tm.tv_nsec-nns)/1000000000; + tm.tv_nsec = nns; +#else + tm.tv_sec = time(NULL)+(long)ftime; + tm.tv_nsec = 0; +#endif Lock(); bool ret = pthread_cond_timedwait(&cond,&mutex,&tm) == 0; Unlock(); |