diff options
Diffstat (limited to 'externals/grill/flext')
-rw-r--r-- | externals/grill/flext/changes.txt | 1 | ||||
-rw-r--r-- | externals/grill/flext/flext.vcproj | 645 | ||||
-rw-r--r-- | externals/grill/flext/makefile.pd-linux | 6 | ||||
-rw-r--r-- | externals/grill/flext/source/flclass.h | 31 | ||||
-rw-r--r-- | externals/grill/flext/source/flext.cpp | 19 | ||||
-rwxr-xr-x | externals/grill/flext/source/flprefix.h | 17 | ||||
-rwxr-xr-x | externals/grill/flext/source/flqueue.cpp | 178 | ||||
-rw-r--r-- | externals/grill/flext/source/flthr.cpp | 3 |
8 files changed, 812 insertions, 88 deletions
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index 696f4266..181c50c1 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -17,6 +17,7 @@ Version history: - added some more SIMD functions - fixed wrong returned result of flext::buffer::set function - fix for linux static exported function name-clash (flext::Setup() single- vs. multi-threading) +- made message queue stuff global (static) for all flext objects 0.4.4: - fixed deadly bug for Max/MSP method-to-symbol-binding proxies diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj index dc1a82c6..f49d92ae 100644 --- a/externals/grill/flext/flext.vcproj +++ b/externals/grill/flext/flext.vcproj @@ -336,6 +336,123 @@ <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> + <Configuration + Name="Shared Debug|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="f:\prog\pd\pd-cvs\src,f:\prog\packs\pthreads,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;FLEXT_PDLOCK" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + PrecompiledHeaderFile=".\pd-msvc\tdl/flext.pch" + AssemblerListingLocation=".\pd-msvc\tdl/" + ObjectFile=".\pd-msvc\tdl/" + ProgramDataBaseFileName=".\pd-msvc\tdl/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib pthreadVC.lib stk_d.lib sndobj.lib" + AdditionalLibraryDirectories="f:\prog\packs\pthreads;"f:\prog\pd\pd-cvs\bin";F:\prog\audio\stk\lib;F:\prog\audio\sndobj\lib" + OptimizeReferences="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Shared Release|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="2" + OmitFramePointers="TRUE" + AdditionalIncludeDirectories="f:\prog\pd\pd-cvs\src,f:\prog\packs\pthreads,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;FLEXT_PDLOCK" + StringPooling="TRUE" + RuntimeLibrary="2" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + PrecompiledHeaderFile=".\pd-msvc\tdl/flext.pch" + AssemblerListingLocation=".\pd-msvc\tdl/" + ObjectFile=".\pd-msvc\tdl/" + ProgramDataBaseFileName=".\pd-msvc\tdl/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="0" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib pthreadVC.lib stk.lib sndobj.lib" + AdditionalLibraryDirectories="f:\prog\packs\pthreads;"f:\prog\pd\pd-cvs\bin";F:\prog\audio\stk\lib;F:\prog\audio\sndobj\lib" + OptimizeReferences="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> </Configurations> <References> </References> @@ -415,6 +532,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flatom_app.cpp"> @@ -472,6 +609,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flatom_part.cpp"> @@ -529,6 +686,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flatom_pr.cpp"> @@ -586,6 +763,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> </Filter> <Filter @@ -647,6 +844,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flbase.h"> @@ -710,6 +927,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flext.h"> @@ -773,6 +1010,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flprefix.h"> @@ -836,6 +1093,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> </Filter> <Filter @@ -897,6 +1174,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flbind.cpp"> @@ -954,6 +1251,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flitem.cpp"> @@ -1011,6 +1328,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flmeth.cpp"> @@ -1068,6 +1405,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flmsg.cpp"> @@ -1125,6 +1482,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flout.cpp"> @@ -1182,6 +1559,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flproxy.cpp"> @@ -1239,6 +1636,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flqueue.cpp"> @@ -1296,6 +1713,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flxlet.cpp"> @@ -1353,6 +1790,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> </Filter> <Filter @@ -1414,6 +1871,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flmspbuffer.h"> @@ -1474,6 +1951,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flsupport.cpp"> @@ -1531,6 +2028,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flsupport.h"> @@ -1591,6 +2108,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flutil.cpp"> @@ -1648,6 +2185,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> </Filter> <Filter @@ -1709,6 +2266,26 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\fldsp.h"> @@ -1773,9 +2350,43 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flsndobj.h"> + <FileConfiguration + Name="Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> </File> </Filter> <Filter @@ -1837,9 +2448,43 @@ AdditionalIncludeDirectories="" PreprocessorDefinitions=""/> </FileConfiguration> + <FileConfiguration + Name="Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flstk.h"> + <FileConfiguration + Name="Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> </File> </Filter> <Filter diff --git a/externals/grill/flext/makefile.pd-linux b/externals/grill/flext/makefile.pd-linux index ad3238e9..8131f25a 100644 --- a/externals/grill/flext/makefile.pd-linux +++ b/externals/grill/flext/makefile.pd-linux @@ -47,12 +47,14 @@ ifdef SNDOBJ INCLUDES+=${SNDOBJ} SRCS+=${SRCS_SNDOBJ} HDRS+=${HDRS_SNDOBJ} +LIBS+=sndobj endif ifdef STK INCLUDES+=${STK} SRCS+=${SRCS_STK} HDRS+=${HDRS_STK} +LIBS+=stk endif MAKEFILE=makefile.pd-linux @@ -117,11 +119,11 @@ $(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS)) chmod 644 $@ $(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS)) - ld -shared -Bdynamic --strip-debug -o $@ $^ + ld -shared -Bdynamic --strip-debug $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) -o $@ $^ chmod 755 $@ $(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS)) - ld -shared -Bdynamic -o $@ $^ + ld -shared -Bdynamic $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) -o $@ $^ chmod 755 $@ diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h index 3add0f13..c5559153 100644 --- a/externals/grill/flext/source/flclass.h +++ b/externals/grill/flext/source/flclass.h @@ -730,17 +730,34 @@ private: // queue stuff - class qmsg; - qmsg *qhead,*qtail; +// class qmsg; +// static qmsg *qhead,*qtail; + + //! Flush messages in the queue + static void QFlush(flext_base *th = NULL); + + //! Queue worker function +// static void QWork(bool qlock,bool syslock); + + //! Start message queue + static void StartQueue(); #if FLEXT_SYS == FLEXT_SYS_JMAX - static void QTick(fts_object_t *c, int winlet, fts_symbol_t s, int ac, const fts_atom_t *at); +// static void QTick(int winlet = 0, fts_symbol_t s = NULL, int ac = 0, const fts_atom_t *at = NULL); +#else // PD or Max +// static void QTick(); +#ifndef FLEXT_QTHR +// static t_qelem *qclk; #else - t_qelem *qclk; - static void QTick(flext_base *th); + //! Queue worker thread function +// static void *QWorker(void *); + //! Queue worker thread conditional +// static ThrCond qthrcond; #endif - void Queue(qmsg *m); +#endif + +// static void Queue(qmsg *m); #ifdef FLEXT_THREADS - ThrMutex qmutex; +// static ThrMutex qmutex; #endif diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp index 2eacb118..fc033b21 100644 --- a/externals/grill/flext/source/flext.cpp +++ b/externals/grill/flext/source/flext.cpp @@ -47,12 +47,6 @@ flext_base::flext_base(): } else attrhead = clattrhead = NULL; - - // message queue ticker - qhead = qtail = NULL; -#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX - qclk = (t_qelem *)(qelem_new(this,(t_method)QTick)); -#endif } flext_base::~flext_base() @@ -67,15 +61,8 @@ flext_base::~flext_base() StopThreads(); #endif - // send remaining pending messages and destroy queue ticker -#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX - while(qhead) QTick(this); - qelem_free((t_qelem *)qclk); -#elif FLEXT_SYS == FLEXT_SYS_JMAX - while(qhead) QTick((fts_object_t *)thisHdr(),0,NULL,0,NULL); - // this is dangerous because there may be other timers on this object! - fts_timebase_remove_object(fts_get_timebase(), (fts_object_t *)thisHdr()); -#endif + // send remaining pending messages for this object + QFlush(this); // delete message lists if(methhead) delete methhead; @@ -171,6 +158,8 @@ void flext_base::Setup(t_classid id) AddMethod(id,0,"getattributes",(methfun)cb_ListAttrib); SetProxies(c); + + StartQueue(); } #if FLEXT_SYS == FLEXT_SYS_JMAX diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h index dae6822c..87f976a7 100755 --- a/externals/grill/flext/source/flprefix.h +++ b/externals/grill/flext/source/flprefix.h @@ -297,7 +297,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. // #pragma message("Compiling for PD") #endif -// set threading model +// ----- set threading model ----- #ifdef FLEXT_THREADS #undef FLEXT_THREADS #if FLEXT_OS == FLEXT_OS_MAC && FLEXT_SYS == FLEXT_SYS_MAX @@ -308,4 +308,19 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif #endif +// ----- set message queue mode ----- +#undef FLEXT_QTHR + +#ifdef FLEXT_PDLOCK + // new PD thread locking functionality shall be used + #if FLEXT_SYS == FLEXT_SYS_PD + #ifdef FLEXT_THREADS + // can only be used with PD and threaded build + #define FLEXT_QTHR + #endif + #else + #error FLEXT_PDLOCK can only be defined with PD + #endif #endif + +#endif // __FLEXT_PREFIX_H diff --git a/externals/grill/flext/source/flqueue.cpp b/externals/grill/flext/source/flqueue.cpp index 9d0b27c6..4c819ae7 100755 --- a/externals/grill/flext/source/flqueue.cpp +++ b/externals/grill/flext/source/flqueue.cpp @@ -19,10 +19,10 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flext.h" #include "flinternal.h" -class flext_base::qmsg +class qmsg { public: - qmsg(): nxt(NULL),tp(tp_none) {} + qmsg(flext_base *b): th(b),nxt(NULL),tp(tp_none) {} ~qmsg(); qmsg *nxt; @@ -33,9 +33,10 @@ public: void SetFloat(int o,float f) { Clear(); out = o; tp = tp_float; _float = f; } void SetInt(int o,int i) { Clear(); out = o; tp = tp_int; _int = i; } void SetSymbol(int o,const t_symbol *s) { Clear(); out = o; tp = tp_sym; _sym = s; } - void SetList(int o,int argc,const t_atom *argv) { Clear(); out = o; tp = tp_list; _list.argc = argc,_list.argv = CopyList(argc,argv); } - void SetAny(int o,const t_symbol *s,int argc,const t_atom *argv) { Clear(); out = o; tp = tp_any; _any.s = s,_any.argc = argc,_any.argv = CopyList(argc,argv); } + void SetList(int o,int argc,const t_atom *argv) { Clear(); out = o; tp = tp_list; _list.argc = argc,_list.argv = flext::CopyList(argc,argv); } + void SetAny(int o,const t_symbol *s,int argc,const t_atom *argv) { Clear(); out = o; tp = tp_any; _any.s = s,_any.argc = argc,_any.argv = flext::CopyList(argc,argv); } + flext_base *th; int out; enum { tp_none,tp_bang,tp_float,tp_int,tp_sym,tp_list,tp_any } tp; union { @@ -47,43 +48,42 @@ public: }; }; -flext_base::qmsg::~qmsg() +qmsg::~qmsg() { Clear(); if(nxt) delete nxt; } -void flext_base::qmsg::Clear() +void qmsg::Clear() { if(tp == tp_list) { if(_list.argv) delete[] _list.argv; } else if(tp == tp_any) { if(_any.argv) delete[] _any.argv; } tp = tp_none; } -#if FLEXT_SYS == FLEXT_SYS_JMAX -void flext_base::QTick(fts_object_t *c, int winlet, fts_symbol_t s, int ac, const fts_atom_t *at) -{ - flext_base *th = thisObject(c); +static qmsg *qhead = NULL,*qtail = NULL; + +#ifdef FLEXT_QTHR +static flext::ThrCond qthrcond; #else -void flext_base::QTick(flext_base *th) -{ +static t_qelem *qclk = NULL; #endif -// post("qtick"); -#if defined(FLEXT_THREADS) && defined(FLEXT_DEBUG) && !defined(FLEXT_PDLOCK) - if(!th->IsSystemThread()) { - error("flext - Queue tick called by wrong thread!"); - return; - } + +#ifdef FLEXT_THREADS +static flext::ThrMutex qmutex; #endif +static void QWork(bool qlock,bool syslock) +{ #ifdef FLEXT_THREADS - th->qmutex.Lock(); + if(qlock) qmutex.Lock(); #endif -#ifdef FLEXT_PDLOCK - pd_lock(); +#ifdef FLEXT_QTHR + if(syslock) pd_lock(); #endif + for(;;) { - qmsg *m = th->qhead; + qmsg *m = qhead; if(!m) break; if(m->out < 0) { @@ -94,30 +94,30 @@ void flext_base::QTick(flext_base *th) switch(m->tp) { case qmsg::tp_bang: - th->m_methodmain(n,sym_bang,0,&tmp); + m->th->m_methodmain(n,flext::sym_bang,0,&tmp); break; case qmsg::tp_float: - SetFloat(tmp,m->_float); - th->m_methodmain(n,sym_float,1,&tmp); + flext::SetFloat(tmp,m->_float); + m->th->m_methodmain(n,flext::sym_float,1,&tmp); break; case qmsg::tp_int: - SetInt(tmp,m->_int); + flext::SetInt(tmp,m->_int); #if FLEXT_SYS == FLEXT_SYS_PD - th->m_methodmain(n,sym_float,1,&tmp); + m->th->m_methodmain(n,flext::sym_float,1,&tmp); #elif FLEXT_SYS == FLEXT_SYS_MAX - th->m_methodmain(n,sym_int,1,&tmp); + m->th->m_methodmain(n,flext::sym_int,1,&tmp); #else #error Not implemented! #endif case qmsg::tp_sym: - SetSymbol(tmp,m->_sym); - th->m_methodmain(n,sym_symbol,1,&tmp); + flext::SetSymbol(tmp,m->_sym); + m->th->m_methodmain(n,flext::sym_symbol,1,&tmp); break; case qmsg::tp_list: - th->m_methodmain(n,sym_list,m->_list.argc,m->_list.argv); + m->th->m_methodmain(n,flext::sym_list,m->_list.argc,m->_list.argv); break; case qmsg::tp_any: - th->m_methodmain(n,m->_any.s,m->_any.argc,m->_any.argv); + m->th->m_methodmain(n,m->_any.s,m->_any.argc,m->_any.argv); break; #ifdef FLEXT_DEBUG default: ERRINTERNAL(); @@ -128,32 +128,64 @@ void flext_base::QTick(flext_base *th) // message to outlet switch(m->tp) { - case qmsg::tp_bang: th->ToOutBang(m->out); break; - case qmsg::tp_float: th->ToOutFloat(m->out,m->_float); break; - case qmsg::tp_int: th->ToOutInt(m->out,m->_int); break; - case qmsg::tp_sym: th->ToOutSymbol(m->out,m->_sym); break; - case qmsg::tp_list: th->ToOutList(m->out,m->_list.argc,m->_list.argv); break; - case qmsg::tp_any: th->ToOutAnything(m->out,m->_any.s,m->_any.argc,m->_any.argv); break; + case qmsg::tp_bang: m->th->ToOutBang(m->out); break; + case qmsg::tp_float: m->th->ToOutFloat(m->out,m->_float); break; + case qmsg::tp_int: m->th->ToOutInt(m->out,m->_int); break; + case qmsg::tp_sym: m->th->ToOutSymbol(m->out,m->_sym); break; + case qmsg::tp_list: m->th->ToOutList(m->out,m->_list.argc,m->_list.argv); break; + case qmsg::tp_any: m->th->ToOutAnything(m->out,m->_any.s,m->_any.argc,m->_any.argv); break; #ifdef FLEXT_DEBUG default: ERRINTERNAL(); #endif } } - th->qhead = m->nxt; - if(!th->qhead) th->qtail = NULL; + qhead = m->nxt; + if(!qhead) qtail = NULL; m->nxt = NULL; delete m; } -#ifdef FLEXT_PDLOCK - pd_unlock(); +#ifdef FLEXT_QTHR + if(syslock) pd_unlock(); +#endif +#ifdef FLEXT_THREADS + if(qlock) qmutex.Unlock(); +#endif +} + +#if FLEXT_SYS == FLEXT_SYS_JMAX +static void QTick(fts_object_t *c,int winlet, fts_symbol_t s, int ac, const fts_atom_t *at) +{ +#else +static void QTick(flext_base *c) +{ +#endif +// post("qtick"); +#if defined(FLEXT_THREADS) && defined(FLEXT_DEBUG) && !defined(FLEXT_QTHR) + if(!flext::IsSystemThread()) { + error("flext - Queue tick called by wrong thread!"); + return; + } #endif + QWork(true,true); +} + +/* +It would be sufficient to only flush messages belonging to object th +But then the order of sent messages is not as intended +*/ +void flext_base::QFlush(flext_base *th) +{ #ifdef FLEXT_THREADS - th->qmutex.Unlock(); + if(!IsSystemThread()) { + error("flext - Queue flush called by wrong thread!"); + return; + } #endif + while(qhead) QWork(true,false); } -void flext_base::Queue(qmsg *m) +static void Queue(qmsg *m) { // post("Queue"); @@ -168,11 +200,11 @@ void flext_base::Queue(qmsg *m) #endif #if FLEXT_SYS == FLEXT_SYS_PD - #ifdef FLEXT_PDLOCK + #ifdef FLEXT_QTHR // wake up a worker thread // (instead of triggering the clock) - clock_delay(qclk,0); - #else + qthrcond.Signal(); + #else clock_delay(qclk,0); #endif #elif FLEXT_SYS == FLEXT_SYS_MAX @@ -181,50 +213,76 @@ void flext_base::Queue(qmsg *m) // this is dangerous because there may be other timers on this object! fts_timebase_add_call(fts_get_timebase(), (fts_object_t *)thisHdr(), QTick, NULL, 0); #else -#error +#error Not implemented +#endif +} + +#ifdef FLEXT_QTHR +void QWorker(flext::thr_params *) +{ + for(;;) { + qthrcond.Wait(); + QWork(true,true); + } +} +#endif + +void flext_base::StartQueue() +{ + // message queue ticker + qhead = qtail = NULL; + +#ifdef FLEXT_QTHR + LaunchThread(QWorker,NULL); +#else +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + qclk = (t_qelem *)(qelem_new(NULL,(t_method)QTick)); +#else +#error Not implemented! +#endif #endif } void flext_base::ToQueueBang(int o) const { - qmsg *m = new qmsg(); + qmsg *m = new qmsg(const_cast<flext_base *>(this)); m->SetBang(o); - const_cast<flext_base &>(*this).Queue(m); + Queue(m); } void flext_base::ToQueueFloat(int o,float f) const { - qmsg *m = new qmsg; + qmsg *m = new qmsg(const_cast<flext_base *>(this)); m->SetFloat(o,f); - const_cast<flext_base &>(*this).Queue(m); + Queue(m); } void flext_base::ToQueueInt(int o,int f) const { - qmsg *m = new qmsg; + qmsg *m = new qmsg(const_cast<flext_base *>(this)); m->SetInt(o,f); - const_cast<flext_base &>(*this).Queue(m); + Queue(m); } void flext_base::ToQueueSymbol(int o,const t_symbol *s) const { - qmsg *m = new qmsg; + qmsg *m = new qmsg(const_cast<flext_base *>(this)); m->SetSymbol(o,s); - const_cast<flext_base &>(*this).Queue(m); + Queue(m); } void flext_base::ToQueueList(int o,int argc,const t_atom *argv) const { - qmsg *m = new qmsg; + qmsg *m = new qmsg(const_cast<flext_base *>(this)); m->SetList(o,argc,argv); - const_cast<flext_base &>(*this).Queue(m); + Queue(m); } void flext_base::ToQueueAnything(int o,const t_symbol *s,int argc,const t_atom *argv) const { - qmsg *m = new qmsg; + qmsg *m = new qmsg(const_cast<flext_base *>(this)); m->SetAny(o,s,argc,argv); - const_cast<flext_base &>(*this).Queue(m); + Queue(m); } diff --git a/externals/grill/flext/source/flthr.cpp b/externals/grill/flext/source/flthr.cpp index 5c4a31c8..3bd5bbf4 100644 --- a/externals/grill/flext/source/flthr.cpp +++ b/externals/grill/flext/source/flthr.cpp @@ -283,8 +283,6 @@ bool flext_base::StopThreads() #endif // --- all object threads have terminated by now ------- - - qmutex.Lock(); // Lock message queue tlmutex.Lock(); // timeout -> hard termination @@ -306,7 +304,6 @@ bool flext_base::StopThreads() thrhead = NULL; tlmutex.Unlock(); - qmutex.Unlock(); } // post("All threads have terminated"); |