diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2006-05-29 10:19:27 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2006-05-29 10:19:27 +0000 |
commit | 55fcd829cd66c6482ca5d2524c11f49e3ba883cf (patch) | |
tree | afaeeba00d17e581ed8456ef0e4fe2e61c0a5a87 /externals/grill/flext | |
parent | 8495e66d1bcfd5a9ea6a183adc2e1a270550cfa8 (diff) |
more robust structure pack setting for Max/MSP @ Windows
attribute generation is now determined exclusively by the object class setup (not library as before).
some minor changes after valgrind run
- preprocessor symbol FLEXT_COMPATIBLE - if defined don't implement specialities of either PD or Max/MSP
fixed bug for Max/MSP when there's no signal inlet
- Max: fixed reported bug (#67), where list elements are distributed over inlets
svn path=/trunk/; revision=5148
Diffstat (limited to 'externals/grill/flext')
-rw-r--r-- | externals/grill/flext/changes.txt | 1 | ||||
-rw-r--r-- | externals/grill/flext/flext.vcproj | 20 | ||||
-rw-r--r-- | externals/grill/flext/source/fldsp.h | 8 | ||||
-rw-r--r-- | externals/grill/flext/source/flext.h | 11 | ||||
-rw-r--r-- | externals/grill/flext/source/flstdc.h | 41 |
5 files changed, 22 insertions, 59 deletions
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index 011a607c..7411357d 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -33,6 +33,7 @@ Version history: - added thisParent type, which refers to the class from which the current flext class is derived (as given in FLEXT_HEADER) - bang method can also by added with FLEXT_(C)ADDMETHOD (FLEXT_(C)ADDBANG is still an alias) - attribute generation is now determined exclusively by each object class setup (not library is before) +- more robust pack setting for Max/MSP @ Windows 0.5.0: - fixes for 64 bit builds (size_t is integer type of pointer size) diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj index b65507d9..685b2db7 100644 --- a/externals/grill/flext/flext.vcproj +++ b/externals/grill/flext/flext.vcproj @@ -690,11 +690,10 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll InlineFunctionExpansion="0" FavorSizeOrSpeed="0" EnableFiberSafeOptimizations="FALSE" - AdditionalIncludeDirectories=""C:\data\prog\audio\maxmspsdk_win\4.5 headers\c74support\max-includes";"C:\data\prog\audio\maxmspsdk_win\4.5 headers\c74support\msp-includes";c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_MAX;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;_WIN32_WINNT=0x501" + AdditionalIncludeDirectories=""C:\data\prog\audio\maxmspsdk\c74support\max-includes";"C:\data\prog\audio\maxmspsdk\c74support\msp-includes";c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=1;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;_WIN32_WINNT=0x501" StringPooling="TRUE" RuntimeLibrary="1" - StructMemberAlignment="2" EnableEnhancedInstructionSet="1" RuntimeTypeInfo="TRUE" UsePrecompiledHeader="2" @@ -745,11 +744,10 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll InlineFunctionExpansion="2" FavorSizeOrSpeed="0" EnableFiberSafeOptimizations="FALSE" - AdditionalIncludeDirectories=""C:\data\prog\audio\maxmspsdk_win\4.5 headers\c74support\max-includes";"C:\data\prog\audio\maxmspsdk_win\4.5 headers\c74support\msp-includes";c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include" - PreprocessorDefinitions="WIN32;_LIB;FLEXT_SYS_MAX;FLEXT_USE_SIMD;FLEXT_EXPORTS;FLEXT_THREADS" + AdditionalIncludeDirectories=""C:\data\prog\audio\maxmspsdk\c74support\max-includes";"C:\data\prog\audio\maxmspsdk\c74support\msp-includes";c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;FLEXT_EXPORTS;FLEXT_THREADS;_WIN32_WINNT=0x502" StringPooling="TRUE" RuntimeLibrary="0" - StructMemberAlignment="2" EnableEnhancedInstructionSet="1" RuntimeTypeInfo="TRUE" UsePrecompiledHeader="2" @@ -1920,7 +1918,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2060,7 +2057,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2197,7 +2193,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2334,7 +2329,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2471,7 +2465,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2608,7 +2601,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2745,7 +2737,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2882,7 +2873,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -3019,7 +3009,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -3160,7 +3149,6 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" - BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration diff --git a/externals/grill/flext/source/fldsp.h b/externals/grill/flext/source/fldsp.h index 7004b891..f4c6f470 100644 --- a/externals/grill/flext/source/fldsp.h +++ b/externals/grill/flext/source/fldsp.h @@ -64,8 +64,14 @@ public: t_sample *const *OutSig() const { int i = CntInSig(); - // we have at least one actual dsp in vector + // in PD we have at least one actual dsp in vector +#if FLEXT_SYS == FLEXT_SYS_PD return vecs+(i?i:1); +#elif FLEXT_SYS == FLEXT_SYS_MAX + return vecs+i; +#else +#error +#endif } //! returns output vector diff --git a/externals/grill/flext/source/flext.h b/externals/grill/flext/source/flext.h index 7fb2be89..71a35ea6 100644 --- a/externals/grill/flext/source/flext.h +++ b/externals/grill/flext/source/flext.h @@ -56,12 +56,6 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif -#if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN -// for wmax alignment must be 2 bytes! -#pragma pack(2) -#endif - - // include all the flext interface definitions #include "fldefs.h" @@ -71,9 +65,4 @@ WARRANTIES, see the file, "license.txt," in this distribution. // include the flext dsp class #include "fldsp.h" -/* -#if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN -#pragma pack(pop) -#endif -*/ #endif // FLEXT_H diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h index 3d699ce1..4d913afe 100644 --- a/externals/grill/flext/source/flstdc.h +++ b/externals/grill/flext/source/flstdc.h @@ -96,6 +96,11 @@ typedef t_clock t_qelem; /* Max/MSP definitions start here */ +// 2-byte alignment for Max/MSP structures +#ifdef _MSC_VER +#pragma pack(push,flext_maxsdk) +#pragma pack(2) +#endif // Include the relevant Max/MSP header files @@ -117,7 +122,6 @@ typedef t_clock t_qelem; #define WIN_EXT_VERSION 1 #endif - // necessary for the old OS9 SDK extern "C" { @@ -137,7 +141,6 @@ extern "C" { #undef WIN_VERSION - typedef t_pxobject t_sigobj; // that's the all-in-one object type of Max/MSP (not very memory-efficent, i guess) typedef t_patcher t_canvas; @@ -187,36 +190,12 @@ typedef void t_binbuf; #define critical_exit(N) #endif -#elif FLEXT_SYS == FLEXT_SYS_JMAX - -extern "C" { - // Wow, the jMax developers made excessive use of C++ reserved words - // good hit! - #define typeid c_typeid_ - #define template c_template_ - #define this c_this_ - #define class c_class_ - - #include <fts/fts.h> - - // undefine them again - #undef typeid - #undef template - #undef this - #undef class -} - -typedef fts_dsp_object t_sigobj; -typedef void t_canvas; // decide type later on - -typedef char t_symbol; -typedef fts_atom_t t_atom; -typedef fts_class_t t_class; -typedef float t_sample; // is there no sample type in jMax? - -typedef fts_timebase_entry_t t_clock; -typedef fts_timebase_entry_t t_qelem; +#ifdef _MSC_VER +#pragma pack(pop,flext_maxsdk) +#endif +#else +#error Platform not supported #endif // FLEXT_SYS |