diff --git a/externals/grill/trunk/flext/.gitignore b/externals/grill/trunk/flext/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8b8127827b1a5bb37cd4a792a3cbed83acd7428a --- /dev/null +++ b/externals/grill/trunk/flext/.gitignore @@ -0,0 +1,57 @@ +.DS_Store +config.txt +pd-darwin/ +max-darwin/ +buildsys/config-*.txt +flext.xcodeproj/project.xcworkspace/ +flext.xcodeproj/xcuserdata/ + + CompiledObject files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# autoconf temporary files +Makefile +Makefile.in +autom4te.cache +compile +config.guess +config.log +config.status +config.sub +configure +depcomp +install-sh +libtool +ltmain.sh +missing +source/.deps +source/Makefile +source/Makefile.in +aclocal.m4 +m4/ diff --git a/externals/grill/trunk/flext/Doxyfile b/externals/grill/trunk/flext/Doxyfile new file mode 100644 index 0000000000000000000000000000000000000000..1c168a0186592dbab53a4dfa1ae6f8c026e8db70 --- /dev/null +++ b/externals/grill/trunk/flext/Doxyfile @@ -0,0 +1,273 @@ +# Doxyfile 1.4.3 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = flext +PROJECT_NUMBER = 0.5.0 +OUTPUT_DIRECTORY = ./doc +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = /Applications/util/ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = \ + source +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.C \ + *.CC \ + *.C++ \ + *.II \ + *.I++ \ + *.H \ + *.HH \ + *.H++ \ + *.CS \ + *.PHP \ + *.PHP3 \ + *.M \ + *.MM +RECURSIVE = NO +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = YES +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = FLEXT_SYS=2 \ + FLEXT_SHARED \ + __DOXYGEN__ +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/externals/grill/trunk/flext/Makefile.am b/externals/grill/trunk/flext/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..e74a630ce9a2160467271fbb485b197fb210968f --- /dev/null +++ b/externals/grill/trunk/flext/Makefile.am @@ -0,0 +1,13 @@ +# +# automake template +# added by tim blechmann +# modified by Thomas Grill +# + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = source # tutorial + +# EXTRA_DIST = flext.doxy +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = $(SYSTEM)-flext.pc diff --git a/externals/grill/trunk/flext/bootstrap.sh b/externals/grill/trunk/flext/bootstrap.sh new file mode 100755 index 0000000000000000000000000000000000000000..4ecf8a7c63d51fc511812600cbf874d2c1f9df34 --- /dev/null +++ b/externals/grill/trunk/flext/bootstrap.sh @@ -0,0 +1,20 @@ +#! /bin/sh + +( + ( + ( + test -x "$(which libtoolize)" && libtoolize --force + ) || + ( + # MacOS has no libtoolize... use glibtoolize instead + test -x "$(which glibtoolize)" && glibtoolize --force + ) + ) && + aclocal && + automake --foreign --add-missing && + autoconf +) || +( + echo Bootstrapping failed + false +) diff --git a/externals/grill/trunk/flext/build.bat b/externals/grill/trunk/flext/build.bat new file mode 100644 index 0000000000000000000000000000000000000000..0f151ac97ae5e0bd577c20d2abbf819713043282 --- /dev/null +++ b/externals/grill/trunk/flext/build.bat @@ -0,0 +1,60 @@ +@echo off + +rem +rem flext - C++ layer for Max/MSP and pd (pure data) externals +rem +rem Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) +rem For information on usage and redistribution, and for a DISCLAIMER OF ALL +rem WARRANTIES, see the file, "license.txt," in this distribution. +rem +rem more information on http://grrrr.org/ext +rem ------------------------------------------------------------------------ +rem +rem To build flext or flext-based externals simply run this script. +rem Running it without arguments will print some help to the console. +rem +rem ------------------------------------------------------------------------ + +echo ------------------------------------------------ + +set flext=%~dp0 + +rem Arguments: +rem %1 - system (pd/max) +rem %2 - compiler (msvc/gcc/mingw/cygwin/bcc/icc) +rem %3 - target (build/clean/install) + +set platform=win +set rtsys=%1 +set compiler=%2 +set target=%3 + +rem --- The subbatch knowns which make utility to use --- +set subbatch=%flext%\buildsys\build-%compiler%.bat + +if "%platform%"=="" goto syntax +if "%rtsys%"=="" goto syntax +if "%compiler%"=="" goto syntax + +if not exist "%subbatch%" goto syntax + +call "%subbatch%" %platform% %rtsys% %target% %4 %5 %6 %7 %8 %9 + +goto end + +rem ----------------------------------------- +:syntax + +echo . +echo SYNTAX: build [system] [compiler] {target} +echo system ... pd / max +echo compiler ... msvc / gcc / mingw / cygwin / bcc / icc +echo target ... all (default) / clean / install +echo . +echo Please make sure that your make program and compiler can be accessed with the +echo system path and that all relevant environment variables are properly set. +echo . +echo For further information read flext/build.txt +echo . + +:end diff --git a/externals/grill/trunk/flext/build.sh b/externals/grill/trunk/flext/build.sh new file mode 100755 index 0000000000000000000000000000000000000000..c467fd45606de43c93218af5e7563db5e1f1dcdd --- /dev/null +++ b/externals/grill/trunk/flext/build.sh @@ -0,0 +1,57 @@ +#! /bin/bash + +# flext - C++ layer for Max/MSP and pd (pure data) externals +# +# Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) +# For information on usage and redistribution, and for a DISCLAIMER OF ALL +# WARRANTIES, see the file, "license.txt," in this distribution. +# +# more information on http://grrrr.org/ext +# ------------------------------------------------------------------------ +# +# To build flext or flext-based externals simply run this script. +# Running it without arguments will print some help to the console. +# +# ------------------------------------------------------------------------ + +flext=${0%/*}/ +if [ "$flext" = "$0"/ ]; then flext=./ ; fi + +# Arguments: +# $1 - system (pd/max) +# $2 - compiler (msvc/gcc/mingw/cygwin/bcc/icc) +# $3 - target (build/clean/install) + +unamesys=$(uname -s) + +case $unamesys in + Linux) platform=lnx;; + Darwin) platform=mac;; + CYGWIN*|MINGW*) platform=win;; + *) echo Platform $unamesys not supported; exit;; +esac + +rtsys=$1 +compiler=$2 +target=$3 + +# --- The subbatch knows which make utility to use --- +subbatch=${flext}buildsys/build-${compiler}.sh + +if + [ -n "$platform" -a -n "$rtsys" -a -n "$compiler" -a -f $subbatch ] +then + sh $subbatch $platform $rtsys $target $4 $5 $6 $7 $8 $9 +else + echo + echo SYNTAX: build.sh [system] [compiler] {target} + echo system ..... pd / max + echo compiler ... msvc / gcc / mingw / cygwin / bcc / icc + echo target ..... build \(default\) / clean / install + echo + echo Please make sure that your make program and compiler can be accessed with the + echo system path and that all relevant environment variables are properly set. + echo + echo For further information read flext/build.txt + echo +fi diff --git a/externals/grill/trunk/flext/build.txt b/externals/grill/trunk/flext/build.txt new file mode 100644 index 0000000000000000000000000000000000000000..961ae99de192d5a4973cf48eaa807926ed05e0cf --- /dev/null +++ b/externals/grill/trunk/flext/build.txt @@ -0,0 +1,279 @@ +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2012 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +---------------------------------------------------------------------------- + +This document consists of the following parts: + +0) Important stuff at the beginning +1) Using the flext build system +1.1) Building and installing flext +1.2) Building externals +1.3) Tested configurations + +2) Using autoconf + +3) Other ways to compile flext and flext-based externals + +---------------------------------------------------------------------------- + +0) Important stuff at the beginning +=================================== + +Please be aware that the build system might have difficulties handling paths with spaces. +Under unix you might get along with escaping your\ path or quoting "your path". +Under Windows escaping doesn't work at all and quoting might not work either - therefore it's +best not to use spaced paths at all. + +---------------------------------------------------------------------------- + +1) Using the flext build system +=============================== + +flext provides a universal build system which supports + +- various operating systems + Windows (win) + Linux (lnx) + MacOSX (mac) +- various real-time systems + Pure Data (pd) + Max/MSP (max) +- various make programs + GNU make (gnumake) + Microsoft nmake (nmake) +- various compilers + Microsoft Visual C/C++ 6.0, .NET 2002/2003/2005/2008 (msvc) + GNU gcc 2.95 and above (gcc,cygwin,mingw) + +Useful combinations of the above are + +under Windows: +pd msvc, using nmake +pd cygwin, using GNU make +pd mingw, using GNU make (from the CMD prompt, not msys!) +max msvc, using nmake +max cygwin, using GNU make +max mingw, using GNU make (from the CMD prompt, not msys!) +pd bcc, using Borland make + +under Linux or MacOSX: +pd gcc, using GNU make + +under MacOSX: +max gcc, using GNU make - Mach-O externals only (Max 4.5 upwards) + + +There are two central scripts in the flext folder which invoke the building process: +- build.sh for bash shells (Linux, MacOSX, cygwin) +- build.bat for the Windows command prompt + +A project needs to provide some information in order to be built properly. +By default, this resides in a file called package.txt + + +Please note, that the build system is shell-oriented, which means, that you'll have +to launch a command prompt (cmd.exe under Windows) and probably also set some +environment variables for your development system (e.g. run vcvars32.bat included with Microsoft Visual Studio) + +By invoking one of the build scripts (e.g. with "bash build.sh" under unix, +or just "build" unter Windows) you'll get some lines of help. +Operating System, real-time system and compiler need to be provided as arguments. + + +See buildsys/readme.txt for developer-centered information. + + +1.1) Prerequisites +================== + +Linux: +- A gnu g/g++ compiler should be present on any system. + The command "g++ --version" should show version 2.95 at least. Compiler version >= 3.3 is recommended. + +OSX: +- The developer package must be installed which contains all necessary parts. + +Windows: +- Microsoft Visual Studio 6, .NET 2002/2003/2005/2008 + Be sure to use the VCVARS32.BAT (or probably SDKVARS.BAT) command on the prompt to set up the environment variables + Also be sure NOT to put flext or other externals into a path containing spaces!! +or +- cygwin with binutils, gcc and make packages + +Max: +- The Max/MSP SDK must be installed. On OSX, the frameworks therein must be copied to /Library/Frameworks + + +1.2) Building and installing flext +================================== + +Flext can build itself using the build system. +From the flext main directory, run the build script + +e.g. under Windows + build pd msvc +or under unix with + bash build.sh pd gcc + +When you run it for the first time, one or more configuration files will be created +from templates - you will get a message on the console. +You should edit the files to adapt it to your system. + +Depending on your platform these will have name like +buildsys/config-win-pd-msvc.txt +or +buildsys/config-lnx-pd-gcc.txt +or +buildsys/config-mac-max-gcc.txt + + +After editing the files you will have to run the build script again to ensure that flext is built. + +After successfully building everything, you can install flext with (under Windows) + build pd msvc install +or (under unix) + bash build.sh pd gcc install + + +You will probably have to have superuser rights in order to install things +into the default location. +(try "sudo" or "su -c" prefixes, or log in as root) + + +1.3) Building externals +======================= + +The flext build system can be used to compile flext-based externals or also +native Pd and Max/MSP externals, provided there is a package.txt file in the project folder. + +In the shell, change to the project folder. +Then, simply run the flext build script, + +e.g. under Windows + ..\flext\build pd msvc +Then install your newly built external with + ..\flext\build pd msvc install +You can clean up the intermediate build folders with + ..\flext\build pd msvc clean + +or under unix with + bash ../flext/build.sh pd gcc +Then install your external with + bash ../flext/build.sh pd gcc install +You can clean up the intermediate build folders with + bash ../flext/build.sh pd gcc clean + + +1.4) Tested configurations +========================== + +Both flext and flext-based externals have been successfully built with the +following combination of platform-system-compiler, build type. +A missing combination does not necessarily mean that it won't work. + +win-pd-msvc, single/multi/shared +win-pd-bcc, single/multi/shared +win-pd-mingw, single/multi/shared (from CMD prompt, not MSYS) +win-pd-cygwin, single/multi/shared +win-max-msvc, single/multi/shared +win-max-cygwin, single/multi/shared +win-max-mingw, single/multi/shared + + +mac-pd-gcc, single/multi/shared +mac-max-gcc, single/multi/shared + +lnx-pd-gcc, single/multi/shared + +---------------------------------------------------------------------------- + +2) Using autoconf +================= + +Thanks to Tim Blechmann, flext can also be built using autoconf. +This only works under unix shells (like bash). + +When starting from a fresh cvs-based copy of flext first run +./bootstrap.sh + +then you can run +./configure --help +to get a page of options. + +You need to pass the path to the Pd source files or the Max SDK to the ./configure script, +e.g. on OS X with something like +./configure --enable-system=pd --with-sysdir=/Applications/Pd-0.40-2/Contents/Resources/src + +then build flext with +make + +and install it with +sudo make install + + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +MINGW: the specs file for certain gcc versions seems to be wrong and needs to be fixed before building flext + +- locate the specs file with "gcc --print-file specs" +- open this file with your favourite editor +- search for the line "*md_startfile_prefix:" +- change the next line "/mingw/lib" to "/lib" +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +---------------------------------------------------------------------------- + +3) Other ways to compile flext and flext-based externals +======================================================== + +Flext can be compiled straightforward as a static or shared library, in release or debug mode. + +Some preprocessor symbols must be defined depending on the build mode and the realtime system it is targetted for. + +for Max/MSP: FLEXT_SYS = 1 +for Pd: FLEXT_SYS = 2 + +for a debug build: FLEXT_DEBUG + +for a static single-threaded library: nothing needs to be defined +for a static multi-threaded library: FLEXT_THREADS +for a shared library (always multi-threaded): FLEXT_SHARED + + + +- Windows - Microsoft Visual Studio projects (.vcproj files) + + Please have a look at the projects delivered with flext and flext-based externals. + +- MacOSX - Apple Xcode projects (.xcode bundles) + + Please have a look at the projects delivered with flext and flext-based externals. + + Xcode projects often use some Source Trees (definable in the Xcode Preferences). + - Flext - the flext main folder + - PD - the Pd installation + - Max SDK - the Max SDK (path ending with "c74support") + - Max Common - Max common files (normally /Library/Application\ Support/Cycling\ \'74 ) + +- MacOSX - Metrowerks Codewarrior (.mcp files) + + You should have the following "Source Trees" (CW preferences, not project specific!) defined: + "OS X Volume" - Pointing to your OSX boot drive + "flext" - Pointing to the flext main directory + "Cycling74 OSX" - Pointing to the SDK for Max/MSP - the path should end with /c74support + + With your project using flext use the prefix file "flcwmax-x.h" or, + alternatively "flcwmax-x-thr.h" for threading support. + +- MacOS9 - Metrowerks Codewarrior (.mcp files) + + You should have the following "Source Trees" (CW preferences, not project specific!) defined: + "flext" - Pointing to the flext main directory + "Cycling74" - Pointing to the Cycling 74 SDK + "MP SDK" - Pointing to the Multiprocessing SDK (for threading support) + + With your project using flext use the prefix file "flcwmax.h" or, + alternatively "flcwmax-thr.h" for threading support. diff --git a/externals/grill/trunk/flext/build/bmake-win-bcc.inc b/externals/grill/trunk/flext/build/bmake-win-bcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..a54bb3679257d85fbf64e9289b3fc33ca8196e28 --- /dev/null +++ b/externals/grill/trunk/flext/build/bmake-win-bcc.inc @@ -0,0 +1,17 @@ +!ifdef SIMD +DEFS=$(DEFS) /DFLEXT_USE_SIMD +!endif + +!ifdef SNDOBJ +SRCS=$(SRCS) $(SRCS_SNDOBJ) +HDRS=$(HDRS) $(HDRS_SNDOBJ) +INCPATH=$(INCPATH) /I$(SNDOBJ)\include +LIBS=$(LIBS) $(SNDOBJ)\lib\sndobj.lib +!endif + +!ifdef STK +SRCS=$(SRCS) $(SRCS_STK) +HDRS=$(HDRS) $(HDRS_STK) +INCPATH=$(INCPATH) /I$(STK)\include +LIBS=$(LIBS) $(STK)\lib\stk.lib +!endif diff --git a/externals/grill/trunk/flext/build/config-lnx.def b/externals/grill/trunk/flext/build/config-lnx.def new file mode 100644 index 0000000000000000000000000000000000000000..88c43f4d74773b65316c3b2ab7be593cd3d207eb --- /dev/null +++ b/externals/grill/trunk/flext/build/config-lnx.def @@ -0,0 +1,2 @@ +# comment out to inhibit SIMD (Altivec/SSE) usage +SIMD=1 diff --git a/externals/grill/trunk/flext/build/config-mac.def b/externals/grill/trunk/flext/build/config-mac.def new file mode 100644 index 0000000000000000000000000000000000000000..88c43f4d74773b65316c3b2ab7be593cd3d207eb --- /dev/null +++ b/externals/grill/trunk/flext/build/config-mac.def @@ -0,0 +1,2 @@ +# comment out to inhibit SIMD (Altivec/SSE) usage +SIMD=1 diff --git a/externals/grill/trunk/flext/build/config-win.def b/externals/grill/trunk/flext/build/config-win.def new file mode 100644 index 0000000000000000000000000000000000000000..88c43f4d74773b65316c3b2ab7be593cd3d207eb --- /dev/null +++ b/externals/grill/trunk/flext/build/config-win.def @@ -0,0 +1,2 @@ +# comment out to inhibit SIMD (Altivec/SSE) usage +SIMD=1 diff --git a/externals/grill/trunk/flext/build/gnumake-lnx-gcc.inc b/externals/grill/trunk/flext/build/gnumake-lnx-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..aec212c554f5658c1023f49682bed4d0d014662f --- /dev/null +++ b/externals/grill/trunk/flext/build/gnumake-lnx-gcc.inc @@ -0,0 +1,13 @@ +ifdef SIMD +DEFS += -DFLEXT_USE_SIMD +endif + +ifdef SNDOBJ_LIB +SRCS+=$(SRCS_SNDOBJ) +HDRS+=$(HDRS_SNDOBJ) +endif + +ifdef STK_LIB +SRCS+=$(SRCS_STK) +HDRS+=$(HDRS_STK) +endif diff --git a/externals/grill/trunk/flext/build/gnumake-lnx-icc.inc b/externals/grill/trunk/flext/build/gnumake-lnx-icc.inc new file mode 100644 index 0000000000000000000000000000000000000000..aec212c554f5658c1023f49682bed4d0d014662f --- /dev/null +++ b/externals/grill/trunk/flext/build/gnumake-lnx-icc.inc @@ -0,0 +1,13 @@ +ifdef SIMD +DEFS += -DFLEXT_USE_SIMD +endif + +ifdef SNDOBJ_LIB +SRCS+=$(SRCS_SNDOBJ) +HDRS+=$(HDRS_SNDOBJ) +endif + +ifdef STK_LIB +SRCS+=$(SRCS_STK) +HDRS+=$(HDRS_STK) +endif diff --git a/externals/grill/trunk/flext/build/gnumake-mac-gcc.inc b/externals/grill/trunk/flext/build/gnumake-mac-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..aec212c554f5658c1023f49682bed4d0d014662f --- /dev/null +++ b/externals/grill/trunk/flext/build/gnumake-mac-gcc.inc @@ -0,0 +1,13 @@ +ifdef SIMD +DEFS += -DFLEXT_USE_SIMD +endif + +ifdef SNDOBJ_LIB +SRCS+=$(SRCS_SNDOBJ) +HDRS+=$(HDRS_SNDOBJ) +endif + +ifdef STK_LIB +SRCS+=$(SRCS_STK) +HDRS+=$(HDRS_STK) +endif diff --git a/externals/grill/trunk/flext/build/gnumake-win-cygwin.inc b/externals/grill/trunk/flext/build/gnumake-win-cygwin.inc new file mode 100644 index 0000000000000000000000000000000000000000..1eb1ce7715a7d7322ce76340dcd834e78146cd0e --- /dev/null +++ b/externals/grill/trunk/flext/build/gnumake-win-cygwin.inc @@ -0,0 +1,17 @@ +ifdef SIMD +DEFS += -DFLEXT_USE_SIMD +endif + +ifdef SNDOBJ +SRCS+=$(SRCS_SNDOBJ) +HDRS+=$(HDRS_SNDOBJ) +INCPATH+=-I$(SNDOBJ) +LIBS+=-lsndobj +endif + +ifdef STK +SRCS+=$(SRCS_STK) +HDRS+=$(HDRS_STK) +INCPATH+=-I$(STK) +LIBS+=-lstk +endif diff --git a/externals/grill/trunk/flext/build/gnumake-win-gcc.inc b/externals/grill/trunk/flext/build/gnumake-win-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..480511f89f8a4db0804b68b6a512c970607de59d --- /dev/null +++ b/externals/grill/trunk/flext/build/gnumake-win-gcc.inc @@ -0,0 +1,17 @@ +ifdef SIMD +DEFS += -DFLEXT_USE_SIMD +endif + +ifdef ATOMICOPSPATH +DEFS += -DUSE_ATOMIC_OPS +endif + +ifdef SNDOBJ_LIB +SRCS+=$(SRCS_SNDOBJ) +HDRS+=$(HDRS_SNDOBJ) +endif + +ifdef STK_LIB +SRCS+=$(SRCS_STK) +HDRS+=$(HDRS_STK) +endif diff --git a/externals/grill/trunk/flext/build/gnumake-win-mingw.inc b/externals/grill/trunk/flext/build/gnumake-win-mingw.inc new file mode 100644 index 0000000000000000000000000000000000000000..1eb1ce7715a7d7322ce76340dcd834e78146cd0e --- /dev/null +++ b/externals/grill/trunk/flext/build/gnumake-win-mingw.inc @@ -0,0 +1,17 @@ +ifdef SIMD +DEFS += -DFLEXT_USE_SIMD +endif + +ifdef SNDOBJ +SRCS+=$(SRCS_SNDOBJ) +HDRS+=$(HDRS_SNDOBJ) +INCPATH+=-I$(SNDOBJ) +LIBS+=-lsndobj +endif + +ifdef STK +SRCS+=$(SRCS_STK) +HDRS+=$(HDRS_STK) +INCPATH+=-I$(STK) +LIBS+=-lstk +endif diff --git a/externals/grill/trunk/flext/build/nmake-win-msvc.inc b/externals/grill/trunk/flext/build/nmake-win-msvc.inc new file mode 100644 index 0000000000000000000000000000000000000000..1c3362e12bfcac6d0f22eb5eede61024ad5beddc --- /dev/null +++ b/externals/grill/trunk/flext/build/nmake-win-msvc.inc @@ -0,0 +1,13 @@ +!ifdef SIMD +DEFS=$(DEFS) /DFLEXT_USE_SIMD +!endif + +!ifdef SNDOBJ_LIB +SRCS=$(SRCS) $(SRCS_SNDOBJ) +HDRS=$(HDRS) $(HDRS_SNDOBJ) +!endif + +!ifdef STK_LIB +SRCS=$(SRCS) $(SRCS_STK) +HDRS=$(HDRS) $(HDRS_STK) +!endif diff --git a/externals/grill/trunk/flext/buildsys/bmake-ext.inc b/externals/grill/trunk/flext/buildsys/bmake-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..1455c83e3783ed91e46ff51930897ed1e4c77244 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/bmake-ext.inc @@ -0,0 +1 @@ +OUTNAME=$(NAME) diff --git a/externals/grill/trunk/flext/buildsys/bmake-flext.inc b/externals/grill/trunk/flext/buildsys/bmake-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..2e7faf0c3b87b059410f69e7d2ef74180aed7af2 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/bmake-flext.inc @@ -0,0 +1,3 @@ +DEFS=$(DEFS) /DFLEXT_EXPORTS + +OUTNAME=$(FLEXTNAME) diff --git a/externals/grill/trunk/flext/buildsys/bmake-sub.mak b/externals/grill/trunk/flext/buildsys/bmake-sub.mak new file mode 100644 index 0000000000000000000000000000000000000000..f55fcc4fdf553e29b64190885ae8355c29e8548e --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/bmake-sub.mak @@ -0,0 +1,44 @@ +# include flext version number +!include $(BUILDPATH)version.inc + +# general settings +!include $(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt + +############################### +# project-specific definitions + +# package info +!if "$(PKGINFO)" != "" && "$(PKGINFO)" != "1" +!include $(PKGINFO) +!endif + +# special package settings +!ifdef USRCONFIG +!include $(USRCONFIG) +!endif + +# package specific make stuff +!ifdef USRMAKE +!include $(USRMAKE) +!endif + +############################## +# flext-specific make stuff + +!include $(BUILDPATH)bmake.inc + +!include $(BUILDPATH)bmake-$(BUILDCLASS).inc + +############################## +# platform-specific make stuff + +!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\bmake-$(COMPILER).inc + +!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\bmake-$(COMPILER)-$(BUILDCLASS).inc + +############################## +# general make stuff + +!include $(BUILDPATH)$(PLATFORM)\bmake-$(COMPILER).inc + +!include $(BUILDPATH)$(PLATFORM)\bmake-$(COMPILER)-$(BUILDCLASS).inc diff --git a/externals/grill/trunk/flext/buildsys/bmake.inc b/externals/grill/trunk/flext/buildsys/bmake.inc new file mode 100644 index 0000000000000000000000000000000000000000..c8dac6fa8180be57e43cf10ba15d2bcb37c350b0 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/bmake.inc @@ -0,0 +1,67 @@ +############################################## +# flext defines +############################################## + +CFLAGS=$(CFLAGS) $(UFLAGS) + +!ifdef DEBUG +CFLAGS=$(CFLAGS) /D_DEBUG $(DFLAGS) +!else +CFLAGS=$(CFLAGS) /DNDEBUG $(OFLAGS) +!endif + + +!ifdef SHARED +# --- shared --- +DEFS=$(DEFS) /DFLEXT_SHARED + +!else +!ifdef THREADED +# --- static multi-threaded --- +DEFS=$(DEFS) /DFLEXT_THREADS + +!else +# --- static single-threaded --- + +!endif +!endif + +############################################## +# name of flext library +############################################## + +!ifdef SHARED +TYPEEXT=_ +!else +!ifdef THREADED +TYPEEXT=_t +!else +TYPEEXT=_s +!endif +!endif + +!ifdef DEBUG +MODEEXT=d +!else +!ifdef PROFILE +MODEEXT=p +!else +MODEEXT= +!ifdef SHARED +TYPEEXT= +!endif +!endif +!endif + +FLEXTNAME=flext-$(RTSYS)$(TYPEEXT)$(MODEEXT) + +############################################## +# product name and folder +############################################## + +!ifndef SRCDIR +SRCDIR=. +!endif + +OUTNAME=$(NAME) +OUTSUB=$(TARGETMODE)-$(TARGETTYPE) diff --git a/externals/grill/trunk/flext/buildsys/bmake.mak b/externals/grill/trunk/flext/buildsys/bmake.mak new file mode 100644 index 0000000000000000000000000000000000000000..c3d8f55a81f89c6369be892e8753b6aa6610ef76 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/bmake.mak @@ -0,0 +1,110 @@ +# required settings: +# +# PLATFORM - win/mac/lnx +# RTSYS - pd/max +# COMPILER - msvc/gcc/mingw/cygwin +# BUILDPATH including trailing \ + +############################################### +# package info + +!ifndef PKGINFO +PKGINFO=package.txt +!endif + +!if "$(PKGINFO)" != "" && "$(PKGINFO)" != "1" +!include $(PKGINFO) +!endif + +!ifndef NAME +!error NAME variable must be defined (name of target) +!endif + +!ifndef SRCS +!error SRCS variable must be defined (list of source files) +!endif + +############################################### +# check variables + +!ifndef BUILDCLASS +BUILDCLASS=ext +!endif + +!ifndef BUILDMODE +BUILDMODE=release +!endif + +!ifndef BUILDTYPE +BUILDTYPE=single +!endif + +############################## + +#!ifndef TARGETMODE +#TARGETMODE=$(BUILDMODE) +#!endif + +#!ifndef TARGETTYPE +#TARGETTYPE=$(BUILDTYPE) +#!endif + +############################################### + +SYSCONFIG=$(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt +SYSDEFAULT=$(BUILDPATH)$(PLATFORM)\$(RTSYS)\config-$(COMPILER).def + +MAKE_OPTIONS=-f $(BUILDPATH)bmake-sub.mak -N \ + PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \ + BUILDPATH=$(BUILDPATH) PKGINFO=$(PKGINFO) BUILDCLASS=$(BUILDCLASS) + +############################################### + +!ifdef BUILDDIR +USRCONFIG=config.txt +USRDEFAULT=$(BUILDDIR)\config-$(PLATFORM).def + +USRMAKE=$(BUILDDIR)\bmake-$(PLATFORM)-$(COMPILER).inc + +MAKE_OPTIONS=$(MAKE_OPTIONS) $(MFLAGS) USRCONFIG=$(USRCONFIG) USRMAKE=$(USRMAKE) +!endif + +############################################### +# include file describing default target dependencies + +!include $(BUILDPATH)targets.inc + +!include $(BUILDPATH)targets-$(BUILDCLASS).inc + +############################################### + +.precious: $(SYSCONFIG) $(USRCONFIG) + +$(SYSCONFIG): $(SYSDEFAULT) + @copy $** $@ + @echo ------------------------------------------------------------------------- + @echo A default system configuration file has been created. + @echo Please edit $(SYSCONFIG) + @echo to match your platform and start again. + @echo ------------------------------------------------------------------------- + @exit 1 + +!ifdef BUILDDIR +$(USRCONFIG): $(USRDEFAULT) + @copy $** $@ + @echo ------------------------------------------------------------------------- + @echo A default package configuration file has been created. + @echo Please edit $(USRCONFIG) and start again. + @echo ------------------------------------------------------------------------- + @exit 1 + +$(USRDEFAULT) $(USRMAKE): + @echo ------------------------------------------------------------------------- + @echo Your combination of platform, system and compiler is not supported yet. + @echo Required files: + @echo $(USRDEFAULT) + @echo and + @echo $(USRMAKE) + @echo ------------------------------------------------------------------------- + @exit 1 +!endif diff --git a/externals/grill/trunk/flext/buildsys/build-bcc.bat b/externals/grill/trunk/flext/buildsys/build-bcc.bat new file mode 100644 index 0000000000000000000000000000000000000000..bf5c4bff1a7c15e5b8a361f25a1d6207cc06f34f --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/build-bcc.bat @@ -0,0 +1,3 @@ +@set build=%~dp0 + +make -f %build%bmake.mak -N PLATFORM=%1 RTSYS=%2 COMPILER=bcc BUILDPATH=%build% %3 %4 %5 %6 %7 %8 %9 diff --git a/externals/grill/trunk/flext/buildsys/build-cygwin.sh b/externals/grill/trunk/flext/buildsys/build-cygwin.sh new file mode 100755 index 0000000000000000000000000000000000000000..606eaaded1145b1f5d3ff78d7febe62b6cc15d7a --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/build-cygwin.sh @@ -0,0 +1,5 @@ +#! /bin/bash + +build=${0%/*}/ + +make -f ${build}gnumake.mak PLATFORM=$1 RTSYS=$2 COMPILER=cygwin BUILDPATH=${build} $3 $4 $5 $6 $7 $8 $9 diff --git a/externals/grill/trunk/flext/buildsys/build-gcc.sh b/externals/grill/trunk/flext/buildsys/build-gcc.sh new file mode 100755 index 0000000000000000000000000000000000000000..5b4800b8eaffae2969e4c094807c29ac6f29969d --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/build-gcc.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +build=${0%/*}/ + +if [ $(which make) ]; then + MAKE=make +elif [ $(which mingw32-make) ]; then + MAKE=mingw32-make +else + echo make utility not found + exit +fi + +$MAKE -f ${build}gnumake.mak PLATFORM=$1 RTSYS=$2 COMPILER=gcc BUILDPATH=${build} $3 $4 $5 $6 $7 $8 $9 diff --git a/externals/grill/trunk/flext/buildsys/build-icc.sh b/externals/grill/trunk/flext/buildsys/build-icc.sh new file mode 100755 index 0000000000000000000000000000000000000000..d110da66b06aa1046c370b24fd6c5fe770ff3b60 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/build-icc.sh @@ -0,0 +1,5 @@ +#! /bin/bash + +build=${0%/*}/ + +make -f ${build}gnumake.mak PLATFORM=$1 RTSYS=$2 COMPILER=icc BUILDPATH=${build} $3 $4 $5 $6 $7 $8 $9 diff --git a/externals/grill/trunk/flext/buildsys/build-mingw.bat b/externals/grill/trunk/flext/buildsys/build-mingw.bat new file mode 100644 index 0000000000000000000000000000000000000000..11a39ed33157add84f7936a50d91ceb04f914d31 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/build-mingw.bat @@ -0,0 +1,3 @@ +@set build=%~dp0 + +mingw32-make -f %build%gnumake.mak PLATFORM=%1 RTSYS=%2 COMPILER=mingw BUILDPATH=%build% %3 %4 %5 %6 %7 %8 %9 diff --git a/externals/grill/trunk/flext/buildsys/build-msvc.bat b/externals/grill/trunk/flext/buildsys/build-msvc.bat new file mode 100644 index 0000000000000000000000000000000000000000..894e3308c50ea72b355863a413db8d6c679f49cb --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/build-msvc.bat @@ -0,0 +1,7 @@ +@set build=%~dp0 + +@rem workaround for MSVC 2005 command prompt, where LIBPATH is predefined +@set LIBPATH= + +@echo on +nmake -f "%build%nmake.mak" PLATFORM=%1 RTSYS=%2 COMPILER=msvc BUILDPATH=%build% %3 %4 %5 %6 %7 %8 %9 diff --git a/externals/grill/trunk/flext/buildsys/gnumake-ext.inc b/externals/grill/trunk/flext/buildsys/gnumake-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..1455c83e3783ed91e46ff51930897ed1e4c77244 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/gnumake-ext.inc @@ -0,0 +1 @@ +OUTNAME=$(NAME) diff --git a/externals/grill/trunk/flext/buildsys/gnumake-flext.inc b/externals/grill/trunk/flext/buildsys/gnumake-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..64204656e5b6f6100351b9738721cc38f1ee3aa8 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/gnumake-flext.inc @@ -0,0 +1,3 @@ +DEFS+=-DFLEXT_EXPORTS + +OUTNAME=lib$(FLEXTNAME) diff --git a/externals/grill/trunk/flext/buildsys/gnumake-sub.mak b/externals/grill/trunk/flext/buildsys/gnumake-sub.mak new file mode 100644 index 0000000000000000000000000000000000000000..17aa589fe63419592fe1d8ec2871a555da083bce --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/gnumake-sub.mak @@ -0,0 +1,44 @@ +# include flext version number +include $(BUILDPATH)version.inc + +# system settings +include $(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt + +############################### +# project specific definitions + +# package info +ifneq ($(PKGINFO),) + include $(PKGINFO) +endif + +# special settings +ifdef USRCONFIG + include $(USRCONFIG) +endif + +# package specific make stuff +ifdef USRMAKE + include $(USRMAKE) +endif + +############################## +# flext-specific definitions + +include $(BUILDPATH)gnumake.inc + +include $(BUILDPATH)gnumake-$(BUILDCLASS).inc + +############################## +# platform-specific make stuff + +include $(BUILDPATH)$(PLATFORM)/$(RTSYS)/gnumake-$(COMPILER).inc + +include $(BUILDPATH)$(PLATFORM)/$(RTSYS)/gnumake-$(COMPILER)-$(BUILDCLASS).inc + +############################## +# general make stuff + +include $(BUILDPATH)$(PLATFORM)/gnumake-$(COMPILER).inc + +include $(BUILDPATH)$(PLATFORM)/gnumake-$(COMPILER)-$(BUILDCLASS).inc diff --git a/externals/grill/trunk/flext/buildsys/gnumake.inc b/externals/grill/trunk/flext/buildsys/gnumake.inc new file mode 100644 index 0000000000000000000000000000000000000000..48dda304bd3d6ccde0298f355d3fa039b56068e8 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/gnumake.inc @@ -0,0 +1,97 @@ +############################################## +# cross-compilation +############################################## + +#ifndef ARCH +#ifeq ("$(shell uname -p)","powerpc") +#ARCH := ppc +#else +#ARCH := $(shell uname -p) +#endif +#endif + +############################################## +# some compiler definitions +############################################## + +CFLAGS += $(UFLAGS) + +$(foreach arch,$(ARCH),$(eval CFLAGS_$(arch) += $$(UFLAGS_$(arch)) ) ) + + +ifdef DEBUG + +DEFS += -D_DEBUG +CFLAGS += $(DFLAGS) + +define ARCH_FLAGS +CFLAGS_$(1) += $$(DFLAGS_$(1)) +endef + +else ## profile and release + +DEFS += -DNDEBUG +CFLAGS += $(OFLAGS) + +define ARCH_FLAGS +CFLAGS_$(1) += $$(OFLAGS_$(1)) +endef + +endif + +$(foreach arch,$(ARCH),$(eval $(call ARCH_FLAGS,$(arch)))) + + +ifdef SHARED +# --- shared --- +DEFS += -DFLEXT_SHARED + +else +ifdef THREADED +# --- static multi-threaded --- +DEFS += -DFLEXT_THREADS + +else +# --- static single-threaded --- + +endif +endif + +############################################## +# name of flext library +############################################## + +ifdef SHARED +TYPEEXT := _ +else +ifdef THREADED +TYPEEXT := _t +else +TYPEEXT := _s +endif +endif + +ifdef DEBUG +MODEEXT := d +else +ifdef PROFILE +MODEEXT := p +else +MODEEXT := +ifdef SHARED +TYPEEXT := +endif +endif +endif + +FLEXTNAME := flext-$(RTSYS)$(TYPEEXT)$(MODEEXT) + +############################################## +# product name and folder +############################################## + +ifndef SRCDIR +SRCDIR := . +endif + +OUTSUB := $(TARGETMODE)-$(TARGETTYPE) diff --git a/externals/grill/trunk/flext/buildsys/gnumake.mak b/externals/grill/trunk/flext/buildsys/gnumake.mak new file mode 100644 index 0000000000000000000000000000000000000000..39e5b909d51e0d2cd52fba280fcf54d4ff0e5a1f --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/gnumake.mak @@ -0,0 +1,142 @@ +# required settings: +# +# PLATFORM - win/mac/lnx +# RTSYS - pd/max +# COMPILER - msvc/gcc/mingw/cygwin +# BUILDPATH including trailing / + +############################################### +# package info + +ifndef PKGINFO +PKGINFO=package.txt +endif + +ifneq ($(PKGINFO),) +include $(PKGINFO) +endif + +ifndef NAME +$(error "NAME variable must be defined (name of target)") +endif + +ifndef SRCS +$(error "SRCS variable must be defined (list of source files)") +endif + +############################################### +# check variables + +ifndef BUILDCLASS +BUILDCLASS := ext +endif + +ifndef BUILDMODE +BUILDMODE := release +endif + +ifndef BUILDTYPE +BUILDTYPE := single +endif + +############################## + +#ifndef TARGETMODE +#TARGETMODE := $(BUILDMODE) +#endif + +#ifndef TARGETTYPE +#TARGETTYPE := $(BUILDTYPE) +#endif + +############################################### + +ifeq ($(PLATFORM),win) + # substitute eventual \ by / + UBUILDPATH := $(subst \,/,$(BUILDPATH)) +else + UBUILDPATH := $(BUILDPATH) +endif + +############################################### + +SYSCONFIG := $(UBUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt +SYSDEFAULT := $(UBUILDPATH)$(PLATFORM)/$(RTSYS)/config-$(COMPILER).def + +MAKE_OPTIONS := -f $(UBUILDPATH)gnumake-sub.mak \ + $(MFLAGS) PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \ + BUILDPATH=$(UBUILDPATH) PKGINFO=$(PKGINFO) BUILDCLASS=$(BUILDCLASS) + +############################################### + +ifdef BUILDDIR +USRCONFIG := config.txt +USRDEFAULT := $(BUILDDIR)/config-$(PLATFORM).def + +USRMAKE := $(BUILDDIR)/gnumake-$(PLATFORM)-$(COMPILER).inc + +MAKE_OPTIONS += USRCONFIG=$(USRCONFIG) USRMAKE=$(USRMAKE) +endif + +############################################### +# include file describing default target dependencies + +.PHONY : all build clean install profile + +include $(BUILDPATH)targets.inc + +include $(BUILDPATH)targets-$(BUILDCLASS).inc + +############################################### + +.PRECIOUS: $(SYSCONFIG) $(USRCONFIG) + +$(SYSCONFIG): $(SYSDEFAULT) +ifeq ($(COMPILER),mingw) + @copy $(subst /,\,$<) $(subst /,\,$@) +else + @cp $< $@ +endif + @echo ------------------------------------------------------------------------- + @echo A default system configuration file has been created. + @echo Please edit $(SYSCONFIG) + @echo to match your platform, then start again. + @echo ------------------------------------------------------------------------- +ifeq ($(COMPILER),mingw) + @exit 1 +else + @false +endif + +ifdef BUILDDIR +$(USRCONFIG): $(USRDEFAULT) +ifeq ($(COMPILER),mingw) + @copy $(subst /,\,$<) $(subst /,\,$@) +else + @cp $< $@ +endif + @echo ------------------------------------------------------------------------- + @echo A default package configuration file has been created. + @echo Please edit $(USRCONFIG), then start again. + @echo ------------------------------------------------------------------------- +ifeq ($(COMPILER),mingw) + @exit 1 +else + @false +endif + +$(USRDEFAULT) $(USRMAKE): + @echo ------------------------------------------------------------------------- + @echo Your combination of platform, system and compiler is not supported yet. + @echo Required files: + @echo $(USRDEFAULT) + @echo and + @echo $(USRMAKE) + @echo ------------------------------------------------------------------------- +ifeq ($(COMPILER),mingw) + @exit 1 +else + @false +endif + +endif diff --git a/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc-ext.inc b/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..1fca83ac8c449cf9ec3f248cec11a4ff99c78061 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc-ext.inc @@ -0,0 +1,56 @@ +# build class specific settings + +TARGET=$(TARGETPATH)/$(TARGETNAME) +INSTTARGET=$(TARGET) + +INCPATH += -I$(FLEXTINC) +LIBPATH += -L$(FLEXTLIB) + +#ifdef SHARED +#LIBS += -l$(FLEXTNAME).$(FLEXTMAJOR).$(FLEXTMINOR) +#else +LIBS += -l$(FLEXTNAME) +#endif + +############################################## + +# default target +_build_: $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +$(TARGETPATH): + mkdir -p $@ + +$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp + -mkdir -p $(dir $@) + $(CXX) -c $(CXXFLAGS) $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGETPATH)/%.o : $(SRCDIR)/%.c + -mkdir -p $(dir $@) + $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGET):: $(TARGETPATH) + +$(TARGET):: $(COBJS) $(CPPOBJS) + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) + chmod 755 $@ +ifndef DEBUG +ifndef PROFILE + strip --strip-unneeded $@ +endif +endif + +############################################## + +_clean_: + -rm -rf $(TARGETPATH) + +############################################## + +$(INSTPATH): + -mkdir -p $@ + +_install_: $(INSTPATH) + install $(TARGET) $(INSTPATH) diff --git a/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc-flext.inc b/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..19ac082e3dffbe899143e13c5a4819af1fdc8823 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc-flext.inc @@ -0,0 +1,75 @@ +# build class specific settings + +CMPNAME=$(OUTNAME).$(EXT).$(FLEXTMAJOR).$(FLEXTMINOR) +VERNAME=$(CMPNAME).$(FLEXTMICRO) +TARGET=$(TARGETPATH)/$(VERNAME) +INSTTARGET=$(TARGET) + +ifdef SHARED +LDFLAGS += -Wl,-soname,$(CMPNAME) +endif + +############################################## + +# default target +_build_: $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +$(TARGETPATH): + -mkdir -p $@ + +$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp + -mkdir -p $(dir $@) + $(CXX) -c $(CXXFLAGS) $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGETPATH)/%.o : $(SRCDIR)/%.c + -mkdir -p $(dir $@) + $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGET) :: $(TARGETPATH) + +$(TARGET) :: $(COBJS) $(CPPOBJS) +ifdef SHARED + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) + chmod 755 $@ +ifndef DEBUG +ifndef PROFILE + strip --strip-unneeded $@ +endif +endif +else + $(AR) rc $@ $(COBJS) $(CPPOBJS) +endif + +############################################## + +_clean_: + -rm -rf $(TARGETPATH) + +############################################## + +$(FLEXTINC) $(FLEXTLIB) $(FLEXTSYS) $(FLEXTBIN): + -mkdir -p $@ + +_install_: $(FLEXTINC) $(FLEXTLIB) $(FLEXTSYS) $(FLEXTBIN) + install $(TARGET) $(FLEXTLIB) +ifdef SHARED + /sbin/ldconfig -l $(FLEXTLIB)/$(VERNAME) + -ln -sf $(CMPNAME) $(FLEXTLIB)/$(OUTNAME).$(EXT) +else + -ln -sf $(VERNAME) $(FLEXTLIB)/$(TARGETNAME) +endif +# make directories + for f in $(dir $(patsubst %,$(FLEXTINC)/%,$(HDRS) $(SRCS))); do mkdir -p $$f; done +# install headers (each one separately as relative paths might occur) + for f in $(HDRS) $(SRCS); do install $(SRCDIR)/$$f $(FLEXTINC)/$$f; done +# transfer build system +# cp -rf buildsys $(FLEXTSYS) +# install build.sh $(FLEXTSYS) +# chmod -R a+rx $(FLEXTSYS) +# make convenience script +# echo bash $(FLEXTSYS)/build.sh $$\* > $(FLEXTBIN)/flext-build.sh +# chmod a+rx $(FLEXTBIN)/flext-build.sh + diff --git a/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc.inc b/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..fb4074aacf49d2d8d4f5494ac798f9cc54e2cd42 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/gnumake-gcc.inc @@ -0,0 +1,80 @@ +############################################## + +CFLAGS += -I/usr/include/pd +LDFLAGS += -L/usr/lib + +############################################## + +ifndef FLEXTINC +FLEXTINC=$(FLEXTPREFIX)/include/flext +endif +ifndef FLEXTLIB +FLEXTLIB=$(FLEXTPREFIX)/lib +endif +ifndef FLEXTSYS +FLEXTSYS=$(FLEXTPREFIX)/lib/flext +endif +ifndef FLEXTBIN +FLEXTBIN=$(FLEXTPREFIX)/bin +endif + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGETNAME=$(OUTNAME).$(EXT) + +############################################## + +CFLAGS += -pthread -fPIC -fvisibility-inlines-hidden +LDFLAGS += -pthread -shared + +############################################## + +ifdef DEBUG +CFLAGS += -g +LDFLAGS += -g +else +ifdef PROFILE +CFLAGS += -g -pg +LDFLAGS += -g -pg +else +LDFLAGS += -Wl,-S +endif +endif + +############################################## + +ifdef STK_INC +INCPATH += -I$(STK_INC) +endif +ifdef STK_LIB +LIBS += $(STK_LIB) +endif + +############################################## + +ifdef SNDOBJ_INC +INCPATH += -I$(SNDOBJ_INC) +endif +ifdef SNDOBJ_LIB +LIBS += $(SNDOBJ_LIB) +endif + +############################################## + +ifdef LOCKFREE +INCPATH += -I$(LOCKFREE) +endif + +ifdef ATOMIC_OPS +INCPATH += -I$(ATOMIC_OPS)/src +DEFS += -DUSE_ATOMIC_OPS +endif + +############################################## + +CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS))) diff --git a/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc-ext.inc b/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..bcfdf422f5bbf1be6166adec89f5ee7679c63763 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc-ext.inc @@ -0,0 +1,56 @@ +# build class specific settings + +TARGET=$(TARGETPATH)/$(TARGETNAME) +INSTTARGET=$(TARGET) + +INCPATH += -I$(FLEXTINC) +LIBPATH += -L$(FLEXTLIB) + +ifdef SHARED +LIBS += -l$(FLEXTNAME).$(FLEXTMAJOR).$(FLEXTMINOR) +else +LIBS += -l$(FLEXTNAME) +endif + +############################################## + +# default target +_build_: $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +$(TARGETPATH): + -mkdir -p $@ + +$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp + -mkdir -p $(dir $@) + icc -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGETPATH)/%.o : $(SRCDIR)/%.c + -mkdir -p $(dir $@) + icc -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGET):: $(TARGETPATH) + +$(TARGET):: $(COBJS) $(CPPOBJS) + icc $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) + chmod 755 $@ +ifndef DEBUG +ifndef PROFILE + strip --strip-unneeded $@ +endif +endif + +############################################## + +_clean_: + -rm -rf $(TARGETPATH) + +############################################## + +$(INSTPATH): + -mkdir -p $@ + +_install_: $(INSTPATH) + install $(TARGET) $(INSTPATH) diff --git a/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc-flext.inc b/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..e6b55ff0f6e2399da49cdbb3b6cf499abb9029e5 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc-flext.inc @@ -0,0 +1,72 @@ +# build class specific settings + +CMPNAME=$(OUTNAME).$(EXT).$(FLEXTMAJOR).$(FLEXTMINOR) +VERNAME=$(CMPNAME).$(FLEXTMICRO) +TARGET=$(TARGETPATH)/$(VERNAME) +INSTTARGET=$(TARGET) + +ifdef SHARED +LDFLAGS += -Wl,-soname,$(CMPNAME) +endif + +############################################## + +# default target +_build_: $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +$(TARGETPATH): + -mkdir -p $@ + +$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp + -mkdir -p $(dir $@) + icc -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGETPATH)/%.o : $(SRCDIR)/%.c + -mkdir -p $(dir $@) + icc -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGET) :: $(TARGETPATH) + +$(TARGET) :: $(COBJS) $(CPPOBJS) +ifdef SHARED + icc $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) + chmod 755 $@ +ifndef DEBUG +ifndef PROFILE + strip --strip-unneeded $@ +endif +endif +else + $(AR) rc $@ $(COBJS) $(CPPOBJS) +endif + +############################################## + +_clean_: + -rm -rf $(TARGETPATH) + +############################################## + +$(FLEXTINC) $(FLEXTLIB) $(FLEXTSYS) $(FLEXTBIN): + -mkdir -p $@ + +_install_: $(FLEXTINC) $(FLEXTLIB) $(FLEXTSYS) $(FLEXTBIN) + install $(TARGET) $(FLEXTLIB) +ifdef SHARED + /sbin/ldconfig -l $(FLEXTLIB)/$(VERNAME) + -ln -sf $(CMPNAME) $(FLEXTLIB)/$(OUTNAME).$(EXT) +else + -ln -sf $(VERNAME) $(FLEXTLIB)/$(TARGETNAME) +endif + install $(patsubst %,$(SRCDIR)/%,$(HDRS) $(SRCS)) $(FLEXTINC) +# transfer build system +# cp -rf buildsys $(FLEXTSYS) +# install build.sh $(FLEXTSYS) +# chmod -R a+rx $(FLEXTSYS) +# make convenience script +# echo bash $(FLEXTSYS)/build.sh $$\* > $(FLEXTBIN)/flext-build.sh +# chmod a+rx $(FLEXTBIN)/flext-build.sh + diff --git a/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc.inc b/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc.inc new file mode 100644 index 0000000000000000000000000000000000000000..b95dd55a0bfd4fc07a7780a95454432d6ea20abd --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/gnumake-icc.inc @@ -0,0 +1,64 @@ +############################################## + +ifndef FLEXTINC +FLEXTINC=$(FLEXTPREFIX)/include/flext +endif +ifndef FLEXTLIB +FLEXTLIB=$(FLEXTPREFIX)/lib +endif +ifndef FLEXTSYS +FLEXTSYS=$(FLEXTPREFIX)/lib/flext +endif +ifndef FLEXTBIN +FLEXTBIN=$(FLEXTPREFIX)/bin +endif + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGETNAME=$(OUTNAME).$(EXT) + +############################################## + +CFLAGS += +LDFLAGS += -shared -Wl,-x + +############################################## + +ifdef DEBUG +CFLAGS += -g +LDFLAGS += -g +else +ifdef PROFILE +CFLAGS += -g -qp +LDFLAGS += -g -qp +else +LDFLAGS += -Wl,-S +endif +endif + +############################################## + +ifdef STK_INC +INCPATH += -I$(STK_INC) +endif +ifdef STK_LIB +LIBS += $(STK_LIB) +endif + +############################################## + +ifdef SNDOBJ_INC +INCPATH += -I$(SNDOBJ_INC) +endif +ifdef SNDOBJ_LIB +LIBS += $(SNDOBJ_LIB) +endif + +############################################## + +CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS))) diff --git a/externals/grill/trunk/flext/buildsys/lnx/pd/config-gcc.def b/externals/grill/trunk/flext/buildsys/lnx/pd/config-gcc.def new file mode 100644 index 0000000000000000000000000000000000000000..b79c09d67f1707a2aad634e4b19ff166837e5d77 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/pd/config-gcc.def @@ -0,0 +1,61 @@ +# where is the PD source package? +# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder) +PDPATH=/usr/local/src/pd + +############################################################### + +# prefix for flext installation +# headers are in $(FLEXTPREFIX)/include/flext +# libraries are in $(FLEXTPREFIX)/lib +# build system is in $(FLEXTPREFIX)/lib/flext + +FLEXTPREFIX=/usr/local + +############################################################### + +# where should the external be built? +OUTPATH=pd-linux + +# where should the external be installed? +INSTPATH=/usr/local/lib/pd/extra + +############################################################### + +# STK (synthesis tool kit) support +# http://ccrma.stanford.edu/software/stk + +# where to find the STK header files (e.g. stk.h) +STK_INC=/usr/local/include/stk + +# where to find the STK library (normally libstk.a) +# (comment out STK_LIB if you don't use STK) +#STK_LIB=/usr/local/lib/libstk.a + +############################################################### + +# SndObj support +# http://music.nuim.ie//musictec/SndObj + +# where to find the SndObj header files (e.g. sndobj.h) +SNDOBJ_INC=/usr/local/include/sndobj + +# where to find the SndObj library (normally libsndobj.a) +# (comment out STK_LIB if you don't use SndObj) +#SNDOBJ_LIB=/usr/local/lib/libsndobj.a + +############################################################### + +# make flags (e.g. use multiprocessor) +#MFLAGS=-j 2 + +# user defined compiler flags +# (check if they match your system!) +UFLAGS=-ffast-math +# don't overload new and delete operators +UFLAGS+=-DFLEXT_USE_CMEM + +# user defined optimization flags +# (check if they match your system!) +OFLAGS=-O3 +# optimizations for build system +OFLAGS+=-march=native diff --git a/externals/grill/trunk/flext/buildsys/lnx/pd/config-icc.def b/externals/grill/trunk/flext/buildsys/lnx/pd/config-icc.def new file mode 100644 index 0000000000000000000000000000000000000000..45c17e5a6190001f4867a978def59eb55a0854f6 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/pd/config-icc.def @@ -0,0 +1,61 @@ +# where is the PD source package? +# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder) +PDPATH=/usr/local/src/pd + +############################################################### + +# prefix for flext installation +# headers are in $(FLEXTPREFIX)/include/flext +# libraries are in $(FLEXTPREFIX)/lib +# build system is in $(FLEXTPREFIX)/lib/flext + +FLEXTPREFIX=/usr/local + +############################################################### + +# where should the external be built? +OUTPATH=pd-linux + +# where should the external be installed? +INSTPATH=/usr/local/lib/pd/extra + +############################################################### + +# STK (synthesis tool kit) support +# http://ccrma.stanford.edu/software/stk + +# where to find the STK header files (e.g. stk.h) +STK_INC=/usr/local/include/stk + +# where to find the STK library (normally libstk.a) +# (comment out STK_LIB if you don't use STK) +#STK_LIB=/usr/local/lib/libstk.a + +############################################################### + +# SndObj support +# http://music.nuim.ie//musictec/SndObj + +# where to find the SndObj header files (e.g. sndobj.h) +SNDOBJ_INC=/usr/local/include/sndobj + +# where to find the SndObj library (normally libsndobj.a) +# (comment out STK_LIB if you don't use SndObj) +#SNDOBJ_LIB=/usr/local/lib/libsndobj.a + +############################################################### + +# make flags (e.g. use multiprocessor) +#MFLAGS=-j 2 + +# user defined compiler flags +# (check if they match your system!) +UFLAGS= +# don't overload new and delete operators +UFLAGS+=-DFLEXT_USE_CMEM + +# user defined optimization flags +# (check if they match your system!) +OFLAGS=-O3 -Ob2 -ip +# optimizations for Pentium 4 +OFLAGS+=-mcpu=pentium4 -march=pentium4 -xMKW diff --git a/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc-ext.inc b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..88feb24985003f95ae711a708c786163bb34e3f6 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc-ext.inc @@ -0,0 +1 @@ +EXT=pd_linux diff --git a/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc-flext.inc b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..cecaa37a4c13e88ece46b9d94a31e156ff6ef595 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc-flext.inc @@ -0,0 +1,6 @@ +ifdef SHARED +EXT=so +else +EXT=a +endif + diff --git a/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc.inc b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..806e45c370b82869729508e9166237e5b389f488 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-gcc.inc @@ -0,0 +1,4 @@ +DEFS += -DFLEXT_SYS=2 -DPD + +INCPATH += -I$(PDPATH)/src -I$(PDPATH)/include -I$(PDPATH)/include/pd +LIBPATH += -L$(PDPATH)/bin diff --git a/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc-ext.inc b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..88feb24985003f95ae711a708c786163bb34e3f6 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc-ext.inc @@ -0,0 +1 @@ +EXT=pd_linux diff --git a/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc-flext.inc b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..cecaa37a4c13e88ece46b9d94a31e156ff6ef595 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc-flext.inc @@ -0,0 +1,6 @@ +ifdef SHARED +EXT=so +else +EXT=a +endif + diff --git a/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc.inc b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc.inc new file mode 100644 index 0000000000000000000000000000000000000000..806e45c370b82869729508e9166237e5b389f488 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/lnx/pd/gnumake-icc.inc @@ -0,0 +1,4 @@ +DEFS += -DFLEXT_SYS=2 -DPD + +INCPATH += -I$(PDPATH)/src -I$(PDPATH)/include -I$(PDPATH)/include/pd +LIBPATH += -L$(PDPATH)/bin diff --git a/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-ext.inc b/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..4ea5b0c6e6694c0367bce319594007386cae5a9d --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-ext.inc @@ -0,0 +1,39 @@ +# build class specific settings + +LDFLAGS += -framework ApplicationServices + +INCPATH += -I$(FLEXTINC) +LIBPATH += -L$(FLEXTLIB) +LIBS += -l$(FLEXTNAME) + +# common compilation stuff +include $(BUILDPATH)$(PLATFORM)/gnumake-gcc-targets.inc + +##### linking ################### + +$(TARGET) :: $(OBJPATH) $(TARGETPATH) + +$(TARGET) :: $(PRECOMDST) $(COBJS) $(CPPOBJS) + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) +ifdef DEBUG +else +ifdef PROFILE +else + strip -x $@ +endif +endif + chmod 755 $@ + +ifdef TARGETPOST +$(TARGET) :: $(TARGETPOST) +endif + +################################### + +# Attention: $@ doesn't work for paths with spaces.... +$(INSTPATH): + -mkdir -p $(INSTPATH) + +_install_:: $(INSTPATH) +# copy plain file or whole bundle + cp -R $(INSTTARGET) $(INSTPATH) diff --git a/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-flext.inc b/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..2b8cf4dc1bb652e49b848ae28c6ed9a4239dc795 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-flext.inc @@ -0,0 +1,80 @@ +# build class specific settings + +ifdef SHARED +LDFLAGS += -install_name $(FLEXTLIB)/$(TARGETNAME) +LDFLAGS += -current_version $(FLEXTMAJOR).$(FLEXTMINOR).$(FLEXTMICRO) +LDFLAGS += -compatibility_version $(FLEXTMAJOR).$(FLEXTMINOR) +LDFLAGS += -preload -seg1addr 0xd0000000 +endif + +# common compilation stuff +include $(BUILDPATH)$(PLATFORM)/gnumake-gcc-targets.inc + +##### linking ################### + +$(TARGET) :: $(OBJPATH) $(TARGETPATH) + +$(TARGET) :: $(PRECOMDST) $(COBJS) $(CPPOBJS) +ifdef SHARED + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) +ifdef DEBUG +else +ifdef PROFILE +else + strip -x $@ +endif +endif + chmod 755 $@ +else + libtool -static -o $@ $(COBJS) $(CPPOBJS) +endif + +ifdef TARGETPOST +$(TARGET) :: $(TARGETPOST) +endif + +################################### + +$(FLEXTINC): + -mkdir -p $@ + +$(FLEXTLIB): + -mkdir -p $@ + +_install_: $(FLEXTINC) $(FLEXTLIB) +ifdef FLEXTFRAMEWORK +# --- install as framework --- + mkdir -p $(FLEXTFRAMEWORK)/Versions/$(FLEXTMAJOR).$(FLEXTMINOR)/Headers + ln -sfh ./$(FLEXTMAJOR).$(FLEXTMINOR) $(FLEXTFRAMEWORK)/Versions/Current + ln -sfh ./Versions/Current/Headers $(FLEXTFRAMEWORK)/Headers + install $(TARGET) $(FLEXTFRAMEWORK)/Versions/Current +ifdef SHARED + # make link without lib... and extension + ln -sf ./Versions/Current/$(VERNAME) $(FLEXTFRAMEWORK)/$(patsubst lib%,%,$(basename $(TARGETNAME))) +else + ranlib $(FRAMEWORK)/Versions/Current/$(VERNAME) + ln -sf ./Versions/Current/$(VERNAME) $(FLEXTFRAMEWORK)/$(TARGETNAME) +endif + install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTFRAMEWORK)/Headers +else +# --- install as dynamic library --- + install $(TARGET) $(FLEXTLIB) +ifndef SHARED +# have to rerun ranlib at install dir ?! + ranlib $(FLEXTLIB)/$(VERNAME) +endif +ifdef VERNAME + ln -sf $(VERNAME) $(FLEXTLIB)/$(TARGETNAME) +endif +# make directories + for f in $(dir $(patsubst %,$(FLEXTINC)/%,$(HDRS) $(SRCS))); do mkdir -p $$f; done +# install headers (each one separately as relative paths might occur) + for f in $(HDRS) $(SRCS); do install $(SRCDIR)/$$f $(FLEXTINC)/$$f; done +endif +# transfer build system +# cp -rf buildsys $(FLEXTSYS) +# install build.sh $(FLEXTSYS) +# chmod -R a+rx $(FLEXTSYS) +# make convenience script +# echo bash $(FLEXTSYS)/build.sh $$\* > $(FLEXTBIN)/flext-build.sh +# chmod a+rx $(FLEXTBIN)/flext-build.sh diff --git a/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-targets.inc b/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-targets.inc new file mode 100644 index 0000000000000000000000000000000000000000..e1c25df06b8782164529752104817a7147dcc3f9 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc-targets.inc @@ -0,0 +1,87 @@ +############################################## + +CSRCS := $(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS := $(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS := $(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS := $(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS))) + +############################################## + +# default target +_build_: $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +# Attention: $@ doesn't work for paths with spaces.... +$(OBJPATH): + -mkdir -p $(OBJPATH) + +# Attention: $@ doesn't work for paths with spaces.... +$(TARGETPATH): + -mkdir -p $(TARGETPATH) + +##### precompiled header file ################### + +ifdef PRECOMPILE +PRECOMSRC := $(SRCDIR)/$(PRECOMPILE) +else +PRECOMSRC := $(FLEXTINC)/flext.h +endif + +ifdef PRECOMSRC +PRECOMDST := $(OBJPATH)/$(notdir $(PRECOMSRC)).gch +PRECOMINC := -I $(OBJPATH) +endif + +$(PRECOMDST) : $(PRECOMSRC) $(patsubst %,$(SRCDIR)/%,$(HDRS)) + -mkdir -p $(dir $@) + $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $(PRECOMSRC) -o $@ + + +ifndef ARCH +##### non-architecture-specific compilation ################### + +$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp + -mkdir -p $(dir $@) + $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(DEFS) $(PRECOMINC) $(INCPATH) $^ -o $@ + +$(OBJPATH)/%.o : $(SRCDIR)/%.c + -mkdir -p $(dir $@) + $(CC) -c $(CFLAGS) $(DEFS) $(PRECOMINC) $(INCPATH) $^ -o $@ + +else # ARCH +##### architecture-specific compilation ################### + +define ARCH_COMPILE +$(OBJPATH)/%.opp_$(1) : $(SRCDIR)/%.cpp + -mkdir -p $(dir $$@) + $(CXX) -c $(CFLAGS) $(CXXFLAGS) -arch $(1) $$(CFLAGS_$(1)) $(DEFS) $(PRECOMINC) $(INCPATH) $$^ -o $$@ + +$(OBJPATH)/%.o_$(1) : $(SRCDIR)/%.c + -mkdir -p $(dir $$@) + $(CC) -c $(CFLAGS) -arch $(1) $$(CFLAGS_$(1)) $(DEFS) $(PRECOMINC) $(INCPATH) $$^ -o $$@ +endef + +##### make fat object file ################### + +$(OBJPATH)/%.opp : $(foreach arch,$(ARCH),$(OBJPATH)/%.opp_$(arch)) + lipo $^ -create -output $@ + +$(OBJPATH)/%.o : $(foreach arch,$(ARCH),$(OBJPATH)/%.o_$(arch)) + lipo $^ -create -output $@ + +endif # ARCH + +# implement for all archs in ARCH +# for some strange reason this must be OUTSIDE an ifdef/endif clause +$(foreach arch,$(ARCH),$(eval $(call ARCH_COMPILE,$(arch)))) + + +############################################## + +_clean_: + -rm -rf $(TARGETPATH) + -rm -rf $(OBJPATH) + +############################################## diff --git a/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc.inc b/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..27527e506442adb7714af660e78538a26cba5632 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/gnumake-gcc.inc @@ -0,0 +1,86 @@ +############################################## + +ifneq (,$(findstring Frameworks,$(FLEXTPREFIX))) +FLEXTFRAMEWORK := $(FLEXTPREFIX)/flext.framework +endif + +ifdef FLEXTFRAMEWORK +ifndef FLEXTLIB +FLEXTLIB := $(FLEXTFRAMEWORK) +endif +ifndef FLEXTINC +FLEXTINC := $(FLEXTFRAMEWORK)/Headers +endif +ifndef FLEXTSYS +FLEXTSYS := $(FLEXTFRAMEWORK)/Resources +endif +else +ifndef FLEXTLIB +FLEXTLIB := $(FLEXTPREFIX)/lib +endif +ifndef FLEXTINC +FLEXTINC := $(FLEXTPREFIX)/include/flext +endif +ifndef FLEXTSYS +FLEXTSYS := $(FLEXTPREFIX)/lib/flext +endif +endif + +FLEXTBIN := $(FLEXTPREFIX)/bin + +############################################## + +CXXFLAGS += -fvisibility-inlines-hidden +LDFLAGS += -dynamic -framework Accelerate + +############################################## + +ifdef DEBUG +CFLAGS += -g +LDFLAGS += -g +else +ifdef PROFILE +CFLAGS += -g +LDFLAGS += -g +else +LDFLAGS += -Wl,-S +endif +endif + +############################################## + +ifdef STK_INC +INCPATH += -I$(STK_INC) +endif +ifdef STK_LIB +LIBS += $(STK_LIB) +endif + +############################################## + +ifdef SNDOBJ_INC +INCPATH += -I$(SNDOBJ_INC) +endif +ifdef SNDOBJ_LIB +LIBS += $(SNDOBJ_LIB) +endif + +############################################## + +ifdef LOCKFREE +INCPATH += -I$(LOCKFREE) +endif + +ifdef ATOMIC_OPS +INCPATH += -I$(ATOMIC_OPS)/src +DEFS += -DUSE_ATOMIC_OPS +endif + +############################################## + +LDFLAGS += $(patsubst %,-arch %,$(ARCH)) + +ifdef OSXSDK +CFLAGS += -isysroot $(OSXSDK) +LDFLAGS += -isysroot $(OSXSDK) +endif diff --git a/externals/grill/trunk/flext/buildsys/mac/max/config-gcc.def b/externals/grill/trunk/flext/buildsys/mac/max/config-gcc.def new file mode 100644 index 0000000000000000000000000000000000000000..c88710cca46425b79e31eeb58d4359e8e2749dd6 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/max/config-gcc.def @@ -0,0 +1,89 @@ +# where are the Max/MSP SDK header files? +# for now, please use MaxSDK-5.?.?, avoid MaxSDK-6.?.? +# you can run your externals with Max 6 nevertheless + +MAXSDKPATH=/Applications/MaxMSP\ 4.6/MaxMSP-SDK/c74support + +############################################################### + +# prefix for flext installation +# headers are in $(FLEXTPREFIX)/include/flext +# libraries are in $(FLEXTPREFIX)/lib +# build system is in $(FLEXTPREFIX)/lib/flext + +FLEXTPREFIX=/usr/local + +############################################################### + +# where should the external be built? +OUTPATH=max-darwin + +# where should the external be installed? +INSTPATH=/Applications/MaxMSP\ 4.6/Cycling\ \'74/externals/flext + +# where should the initialization files be installed? +INITPATH=/Applications/MaxMSP\ 4.6/Cycling\ \'74/init + +# where should the help files be installed? +HELPPATH=/Applications/MaxMSP\ 4.6/max-help/flext + +############################################################### + +# STK (synthesis tool kit) support +# http://ccrma.stanford.edu/software/stk + +# where to find the STK header files (e.g. stk.h) +#STK_INC=/usr/local/include/stk + +# where to find the STK library (normally libstk.a) +# (comment out STK_LIB if you don't use STK) +#STK_LIB=/usr/local/lib/libstk.a + +############################################################### + +# SndObj support +# http://music.nuim.ie//musictec/SndObj + +# where to find the SndObj header files (e.g. sndobj.h) +#SNDOBJ_INC=/usr/local/include/sndobj + +# where to find the SndObj library (normally libsndobj.a) +# (comment out STK_LIB if you don't use SndObj) +#SNDOBJ_LIB=/usr/local/lib/libsndobj.a + +############################################################### + +# make flags (e.g. use multiprocessor) +MFLAGS=-j 2 + +# user defined compiler flags +UFLAGS += -ffast-math -mmacosx-version-min=10.6 -march=native + +# user defined linker flags +LDFLAGS += -mmacosx-version-min=10.6 + +# user defined optimization flags +# for now, don't use -O3 !(Max will hang) +OFLAGS += -Os -mtune=native # -ftree-vectorize + +# user defined debugging flags +DFLAGS += + +# architecture-specific flags (optional) +UFLAGS_ppc += -faltivec +OFLAGS_ppc += +DFLAGS_ppc += + +UFLAGS_i386 += +OFLAGS_i386 += +DFLAGS_i386 += + +UFLAGS_x86_64 += +OFLAGS_x86_64 += +DFLAGS_x86_64 += + +# list of architectures to build +ARCH=i386 #ppc x86_64 ppc64 + +# SDK for 10.4 +#OSXSDK=/Developer/SDKs/MacOSX10.4u.sdk diff --git a/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc-ext.inc b/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..5266a69894f822f1354782cedf84954914efa9db --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc-ext.inc @@ -0,0 +1,23 @@ +EXT=mxo + +############################################## + +LDFLAGS += -bundle + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) + +# bundle name (build site) +INSTTARGET=$(OBJPATH)/$(OUTNAME).$(EXT) +# folder inside bundle (build site) +TARGETPATH=$(INSTTARGET)/Contents/MacOS +# file inside bundle (build site) +TARGET=$(TARGETPATH)/$(OUTNAME) + +# post build target +TARGETPOST=$(INSTTARGET)/Contents/Pkginfo + +$(INSTTARGET)/Contents/Pkginfo: + echo "iLaX????" >> $@ + diff --git a/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc-flext.inc b/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..3d52680444f3e486a7a1b7e7e5a07b830d2016a9 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc-flext.inc @@ -0,0 +1,20 @@ +ifdef SHARED +EXT=dylib +else +EXT=a +endif + +############################################## + +LDFLAGS += -dynamiclib + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) +TARGETPATH=$(OBJPATH) + +TARGETNAME=$(OUTNAME).$(EXT) +VERNAME=$(OUTNAME).$(FLEXTMAJOR).$(FLEXTMINOR).$(FLEXTMICRO).$(EXT) +TARGET=$(TARGETPATH)/$(VERNAME) + +INSTTARGET=$(TARGET) diff --git a/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc.inc b/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..44313f626f6794eb395c1f123b9379bb9d64e9bc --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/max/gnumake-gcc.inc @@ -0,0 +1,6 @@ +DEFS += -DFLEXT_SYS=1 + +INCPATH += -I$(MAXSDKPATH)/max-includes -I$(MAXSDKPATH)/jit-includes -I$(MAXSDKPATH)/msp-includes + +LDFLAGS += -framework MaxAPI -framework MaxAudioAPI + diff --git a/externals/grill/trunk/flext/buildsys/mac/pd/config-gcc.def b/externals/grill/trunk/flext/buildsys/mac/pd/config-gcc.def new file mode 100644 index 0000000000000000000000000000000000000000..58db1eb8922eca223f6080b4c9223cda358f48c6 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/pd/config-gcc.def @@ -0,0 +1,83 @@ +# where is the PD installation including source code? +# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder) +PDPATH=/Applications/Pd-0.42-5.app/Contents/Resources + +# where is the PD executable? +PDBIN=$(PDPATH)/bin/pd + +############################################################### + +# prefix for flext installation +# headers are in $(FLEXTPREFIX)/include/flext +# libraries are in $(FLEXTPREFIX)/lib +# build system is in $(FLEXTPREFIX)/lib/flext + +FLEXTPREFIX=/usr/local + +############################################################### + +# where should the external be built? +OUTPATH=pd-darwin + +# where should the external be installed? +INSTPATH=$(PDPATH)/extra + +############################################################### + +# STK (synthesis tool kit) support +# http://ccrma.stanford.edu/software/stk + +# where to find the STK header files (e.g. stk.h) +#STK_INC=/usr/local/include/stk + +# where to find the STK library (normally libstk.a) +# (comment out STK_LIB if you don't use STK) +#STK_LIB=/usr/local/lib/libstk.a + +############################################################### + +# SndObj support +# http://music.nuim.ie//musictec/SndObj + +# where to find the SndObj header files (e.g. sndobj.h) +#SNDOBJ_INC=/usr/local/include/sndobj + +# where to find the SndObj library (normally libsndobj.a) +# (comment out SNDOBJ_LIB if you don't use SndObj) +#SNDOBJ_LIB=/usr/local/lib/libsndobj.a + +############################################################### + +# make flags (e.g. use multiprocessor) +MFLAGS=-j 2 + +# user defined compiler flags +UFLAGS += -ffast-math -mmacosx-version-min=10.6 -march=native + +# user defined linker flags +LDFLAGS += -mmacosx-version-min=10.6 + +# user defined optimization flags +OFLAGS += -O3 -mtune=native + +# user defined debugging flags +DFLAGS += + +# architecture-specific flags (optional) +UFLAGS_ppc += -faltivec +OFLAGS_ppc += +DFLAGS_ppc += + +UFLAGS_i386 += +OFLAGS_i386 += +DFLAGS_i386 += + +UFLAGS_x86_64 += +OFLAGS_x86_64 += +DFLAGS_x86_64 += + +# cross-compilation (optional) +ARCH=i386 x86_64 # ppc ppc64 + +# SDK for 10.6 +#OSXSDK=/Developer/SDKs/MacOSX10.6u.sdk diff --git a/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc-ext.inc b/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..f5dffdb89e456766546e755a1dcc5eeb61cfeefa --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc-ext.inc @@ -0,0 +1,10 @@ +EXT=pd_darwin + +#LDFLAGS += -bundle -bundle_loader $(PDBIN) + +# it seems we are having symbol name clashes with the following "new preferred method" +# so we rather stick to the above "deprecated method" +LDFLAGS += -dynamiclib -undefined dynamic_lookup + +TARGET=$(TARGETPATH)/$(TARGETNAME) +INSTTARGET=$(TARGET) diff --git a/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc-flext.inc b/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..782606fc88f4393aeb95a823203c7fccf6b4e890 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc-flext.inc @@ -0,0 +1,11 @@ +ifdef SHARED +EXT=dylib +else +EXT=a +endif + +LDFLAGS += -dynamiclib -flat_namespace -undefined suppress + +VERNAME=$(OUTNAME).$(FLEXTMAJOR).$(FLEXTMINOR).$(FLEXTMICRO).$(EXT) +TARGET=$(TARGETPATH)/$(VERNAME) +INSTTARGET=$(TARGET) diff --git a/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc.inc b/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..0d49b85e42f9b275e8376b807dfad4c63e258c0a --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/mac/pd/gnumake-gcc.inc @@ -0,0 +1,10 @@ +DEFS += -DFLEXT_SYS=2 -DPD + +INCPATH += -I$(PDPATH)/src -I$(PDPATH)/include -I$(PDPATH)/include/pd +LIBPATH += -L$(PDPATH)/bin + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGETNAME=$(OUTNAME).$(EXT) diff --git a/externals/grill/trunk/flext/buildsys/nmake-ext.inc b/externals/grill/trunk/flext/buildsys/nmake-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..1455c83e3783ed91e46ff51930897ed1e4c77244 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/nmake-ext.inc @@ -0,0 +1 @@ +OUTNAME=$(NAME) diff --git a/externals/grill/trunk/flext/buildsys/nmake-flext.inc b/externals/grill/trunk/flext/buildsys/nmake-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..2e7faf0c3b87b059410f69e7d2ef74180aed7af2 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/nmake-flext.inc @@ -0,0 +1,3 @@ +DEFS=$(DEFS) /DFLEXT_EXPORTS + +OUTNAME=$(FLEXTNAME) diff --git a/externals/grill/trunk/flext/buildsys/nmake-shlib.inc b/externals/grill/trunk/flext/buildsys/nmake-shlib.inc new file mode 100644 index 0000000000000000000000000000000000000000..1455c83e3783ed91e46ff51930897ed1e4c77244 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/nmake-shlib.inc @@ -0,0 +1 @@ +OUTNAME=$(NAME) diff --git a/externals/grill/trunk/flext/buildsys/nmake-sub.mak b/externals/grill/trunk/flext/buildsys/nmake-sub.mak new file mode 100644 index 0000000000000000000000000000000000000000..c8b78044aa17a66461f6359faa39aa5da7a86867 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/nmake-sub.mak @@ -0,0 +1,44 @@ +# include flext version number +!include $(BUILDPATH)version.inc + +# general settings +!include $(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt + +############################## +# project-specific definitions + +# package info +!if "$(PKGINFO)" != "" +!include $(PKGINFO) +!endif + +# special package settings +!ifdef USRCONFIG +!include $(USRCONFIG) +!endif + +# package specific make stuff +!ifdef USRMAKE +!include $(USRMAKE) +!endif + +############################## +# flext-specific definitions + +!include $(BUILDPATH)nmake.inc + +!include $(BUILDPATH)nmake-$(BUILDCLASS).inc + +############################## +# platform-specific make stuff + +!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\nmake-$(COMPILER).inc + +!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\nmake-$(COMPILER)-$(BUILDCLASS).inc + +############################## +# general make stuff + +!include $(BUILDPATH)$(PLATFORM)\nmake-$(COMPILER).inc + +!include $(BUILDPATH)$(PLATFORM)\nmake-$(COMPILER)-$(BUILDCLASS).inc diff --git a/externals/grill/trunk/flext/buildsys/nmake.inc b/externals/grill/trunk/flext/buildsys/nmake.inc new file mode 100644 index 0000000000000000000000000000000000000000..fd1bb50d9425ee669660bdd511bbbf7b155cdd4d --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/nmake.inc @@ -0,0 +1,64 @@ +############################################## +# flext defines +############################################## + +CFLAGS=$(CFLAGS) $(UFLAGS) + +!ifdef DEBUG +CFLAGS=$(CFLAGS) /D_DEBUG $(DFLAGS) +!else +CFLAGS=$(CFLAGS) /DNDEBUG $(OFLAGS) +!endif + + +!ifdef SHARED +# --- shared --- +DEFS=$(DEFS) /DFLEXT_SHARED + +!elseifdef THREADED +# --- static multi-threaded --- +DEFS=$(DEFS) /DFLEXT_THREADS + +!else +# --- static single-threaded --- + +!endif + +############################################## +# name of flext library +############################################## + +!ifdef SHARED +TYPEEXT=_ +!else +!ifdef THREADED +TYPEEXT=_t +!else +TYPEEXT=_s +!endif +!endif + +!ifdef DEBUG +MODEEXT=d +!else +!ifdef PROFILE +MODEEXT=p +!else +MODEEXT= +!ifdef SHARED +TYPEEXT= +!endif +!endif +!endif + +FLEXTNAME=flext-$(RTSYS)$(TYPEEXT)$(MODEEXT) + +############################################## +# product name and folder +############################################## + +!ifndef SRCDIR +SRCDIR=. +!endif + +OUTSUB=$(TARGETMODE)-$(TARGETTYPE) diff --git a/externals/grill/trunk/flext/buildsys/nmake.mak b/externals/grill/trunk/flext/buildsys/nmake.mak new file mode 100644 index 0000000000000000000000000000000000000000..c44cb8a0484eb85f424e36bfb5d5cb424c6a7a2b --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/nmake.mak @@ -0,0 +1,110 @@ +# required settings: +# +# PLATFORM - win/mac/lnx +# RTSYS - pd/max +# COMPILER - msvc/gcc/mingw/cygwin +# BUILDPATH including trailing \ + +############################################### +# package info + +!ifndef PKGINFO +PKGINFO=package.txt +!endif + +!if "$(PKGINFO)" != "" +!include $(PKGINFO) +!endif + +!ifndef NAME +!error NAME variable must be defined (name of target) +!endif + +!ifndef SRCS +!error SRCS variable must be defined (list of source files) +!endif + +############################################### +# check variables + +!ifndef BUILDCLASS +BUILDCLASS=ext +!endif + +!ifndef BUILDMODE +BUILDMODE=release +!endif + +!ifndef BUILDTYPE +BUILDTYPE=single +!endif + +############################## + +#!ifndef TARGETMODE +#TARGETMODE=$(BUILDMODE) +#!endif + +#!ifndef TARGETTYPE +#TARGETTYPE=$(BUILDTYPE) +#!endif + +############################################### + +SYSCONFIG=$(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt +SYSDEFAULT=$(BUILDPATH)$(PLATFORM)\$(RTSYS)\config-$(COMPILER).def + +MAKE_OPTIONS=/NOLOGO /f $(BUILDPATH)nmake-sub.mak \ + PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \ + BUILDPATH=$(BUILDPATH) PKGINFO=$(PKGINFO) BUILDCLASS=$(BUILDCLASS) + +############################################### + +!ifdef BUILDDIR +USRCONFIG=config.txt +USRDEFAULT=$(BUILDDIR)\config-$(PLATFORM).def + +USRMAKE=$(BUILDDIR)\nmake-$(PLATFORM)-$(COMPILER).inc + +MAKE_OPTIONS=$(MAKE_OPTIONS) $(MFLAGS) USRCONFIG=$(USRCONFIG) USRMAKE=$(USRMAKE) +!endif + +############################################### +# include file describing default target dependencies + +!include $(BUILDPATH)\targets.inc + +!include $(BUILDPATH)\targets-$(BUILDCLASS).inc + +############################################### + +.precious: $(SYSCONFIG) $(USRCONFIG) + +$(SYSCONFIG): $(SYSDEFAULT) + @copy $** $@ + @echo ------------------------------------------------------------------------- + @echo A default system configuration file has been created. + @echo Please edit $(SYSCONFIG) + @echo to match your platform and start again. + @echo ------------------------------------------------------------------------- + @exit 1 + +!ifdef BUILDDIR +$(USRCONFIG): $(USRDEFAULT) + @copy $** $@ + @echo ------------------------------------------------------------------------- + @echo A default package configuration file has been created. + @echo Please edit $(USRCONFIG) and start again. + @echo ------------------------------------------------------------------------- + @exit 1 + +$(USRDEFAULT) $(USRMAKE): + @echo ------------------------------------------------------------------------- + @echo Your combination of platform, system and compiler is not supported yet. + @echo Required files: + @echo $(USRDEFAULT) + @echo and + @echo $(USRMAKE) + @echo ------------------------------------------------------------------------- + @exit 1 +!endif diff --git a/externals/grill/trunk/flext/buildsys/readme.txt b/externals/grill/trunk/flext/buildsys/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..4fa74ad439b972807e16dcb8036f476a6ec44ee5 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/readme.txt @@ -0,0 +1,180 @@ +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +---------------------------------------------------------------------------- + +At the moment this is more like a sketchboard, but i'll promise to bring some +order into it some fine day in the not too distant future. + +---------------------------------------------------------------------------- + +Build scripts +============= + +Depending on platform the build process is run with +build.sh +or +build.bat + + +Arguments: PLATFORM SYSTEM COMPILER {TARGET} {definitions} + +PLATFORM: win / lnx / mac +SYSTEM: pd / max +COMPILER: msvc / gcc / mingw / cygwin / bcc / icc + +TARGET: (default is all) + all, build - build package in default style + install - install package + clean - clean build products + + config - test if configuration needs refreshing + +or + build-MODE-TYPE + install-MODE-TYPE + clean-MODE-TYPE + +with + MODE: default, all, release, debug, profile + TYPE: default, all, single, multi, shared + + +Additional definitions can be passed to the make program +like + "PKGINFO=info.txt" (defines new filename for package information) +or + "PKGINFO=" (package information will be skipped - only for config target) + +For more macro names, see below + + +For each of the supported combinations of PLATFORM, SYSTEM and COMPILER +a MAKE program has been chosen, normally the one that comes with the compiler. + +For gcc it is GNU make (gnumake) +For msvc it is Microsoft make (nmake) +For bcc it is Borland make (bmake) + + + +Package info (package.txt) +========================== + +Package information contains vital information for the build process. +Obligatory are only: + +NAME: resulting filename of the build product +SRCS: list of source files + + +Normally also used are: + +HDRS: used header files, which SRCS files are dependent upon +SRCDIR: source folder (relative to project folder), default is . + + +Other settings: + +PRECOMPILE: prefix header file (in SRCDIR) for all source files, + will be precompiled if supported by the compiler + +BUILDCLASS: can currently be flext or ext, default is ext. + flext will build the flext system + ext will build a flext-based external + +BUILDMODE: release or debug, default is release + if release, optimization flags will be used + if debug, debug information will be generated + if profile, profiling information will be generated (with debug info and optimization) + +BUILDTYPE: single, multi or shared, default is single + if single, it will be linked against the single-threaded static flext library + if multi, it will be linked against the multi-threaded static flext library + if shared, it will be linked against the shared flext library + +BUILDDIR: relative folder with additional build settings + + + +Additional build settings (BUILDDIR) +==================================== + +If BUILDDIR is defined, all PLATFORM-SYSTEM-COMPILER combinations to support +must are mirrored by the respective .def and .inc files in the BUILDDIR. + + +config-PLATFORM.def files (e.g. config-lnx.def) : + + These files can contain additional macro definitions, that are private + to the project. + The definitions should be strictly in the form SETTING=value, without any + make-specific macros etc. + The .def files work as templates that get copied to a user-editable + config.txt file when the build process is first started. + + +MAKE-PLATFORM-COMPILER.inc files +(e.g. gnumake-lnx-gcc.inc or nmake-win-msvc.inc): + + These files (which are no considered to be edited by the user) can contain + specific modifications to compiler flags, include file paths etc. + + For gnumake this would e.g. be + INCPATH += -I/usr/local/include/python2.3 + + for nmake or bmake e.g. + INCPATH = $(INCPATH) -I"c:\program files\Python2.3\include" + + +Structure of build system +========================= + +The build system has several levels of information, which are evaluated in the +following order (see also buildsys/MAKE-sub.mak) + +Project level: +- PKGINFO file (e.g. package.txt) +- USRCONFIG file (e.g. config.txt) +- USRMAKE file (e.g. build/gnumake-lnx-gcc.inc) + +General definitions (in buildsys): + +- MAKE.inc (e.g. buildsys/gnumake.inc) + contains evaluation of flext library name, build directory etc. +- MAKE-BUILDCLASS.inc (e.g. buildsys/gnumake-ext.inc) + contains some more flag settings + +Real-time-system-dependent definitions (in buildsys/PLATFORM/SYSTEM): + +- MAKE-COMPILER.inc (e.g. buildsys/lnx/pd/gnumake-gcc.inc) + contains general real-time-system dependent info (e.g. paths, FLEXT_SYS setting) +- MAKE-COMPILER-BUILDCLASS.inc (e.g. buildsys/lnx/pd/gnumake-gcc-ext.inc) + contains specific real-time-system dependent info (e.g. extension of binary) + +Platform-dependent definitions (in buildsys/PLATFORM): + +- MAKE-COMPILER.inc (e.g. buildsys/lnx/gnumake-gcc.inc) + contains general platform-specific flags +- MAKE-COMPILER-BUILDCLASS.inc (e.g. buildsys/lnx/gnumake-gcc-ext.inc) + contains the actual make targets (_build_,_clean_ and _install_) + + +Macro names +=============== + +PKGINFO - filename for package information (must reside in project folder) + +UFLAGS - user defined compiler flags +OFLAGS - user defined optimization flags (not used in debug builds) + +CFLAGS - compiler flags +LDFLAGS - linker flags + +INCPATH - include file path (must come with e.g. -I ) +LIBPATH - library path (must come with e.g. -L ) + +LIBS - libraries to link in (must come with e.g. -l ) diff --git a/externals/grill/trunk/flext/buildsys/targets-ext.inc b/externals/grill/trunk/flext/buildsys/targets-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..b8031522ff579bdc94696475eaffc84c358e4191 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/targets-ext.inc @@ -0,0 +1,51 @@ +build-default-default: build-$(BUILDMODE)-$(BUILDTYPE) + +build-all-default: build-all-$(BUILDTYPE) + +build-release-default: build-release-$(BUILDTYPE) + +build-debug-default: build-debug-$(BUILDTYPE) + +build-profile-default: build-profile-$(BUILDTYPE) + +build-default-all: build-$(BUILDMODE)-all + +build-default-single: build-$(BUILDMODE)-single + +build-default-multi: build-$(BUILDMODE)-multi + +build-default-shared: build-$(BUILDMODE)-shared + + +install-default-default: install-$(BUILDMODE)-$(BUILDTYPE) + +install-all-default: install-all-$(BUILDTYPE) + +install-release-default: install-release-$(BUILDTYPE) + +install-debug-default: install-debug-$(BUILDTYPE) + +install-default-all: install-$(BUILDMODE)-all + +install-default-single: install-$(BUILDMODE)-single + +install-default-multi: install-$(BUILDMODE)-multi + +install-default-shared: install-$(BUILDMODE)-shared + + +clean-default-default: clean-$(BUILDMODE)-$(BUILDTYPE) + +clean-all-default: clean-all-$(BUILDTYPE) + +clean-release-default: clean-release-$(BUILDTYPE) + +clean-debug-default: clean-debug-$(BUILDTYPE) + +clean-default-all: clean-$(BUILDMODE)-all + +clean-default-single: clean-$(BUILDMODE)-single + +clean-default-multi: clean-$(BUILDMODE)-multi + +clean-default-shared: clean-$(BUILDMODE)-shared diff --git a/externals/grill/trunk/flext/buildsys/targets-flext.inc b/externals/grill/trunk/flext/buildsys/targets-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..e0e984cfba0411ba1c2a293046d68f64c7032a99 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/targets-flext.inc @@ -0,0 +1,52 @@ +build-default-default: build-all-all + +build-all-default: build-all-all + +build-release-default: build-release-all + +build-debug-default: build-debug-all + +build-profile-default: build-profile-all + +build-default-all: build-all-all + +build-default-single: build-all-single + +build-default-multi: build-all-multi + +build-default-shared: build-all-shared + + +install-default-default: install-all-all + +install-all-default: install-all-all + +install-release-default: install-release-all + +install-debug-default: install-debug-all + +install-default-all: install-all-all + +install-default-single: install-all-single + +install-default-multi: install-all-multi + +install-default-shared: install-all-shared + + +clean-default-default: clean-all-all + +clean-all-default: clean-all-all + +clean-release-default: clean-release-all + +clean-debug-default: clean-debug-all + +clean-default-all: clean-all-all + +clean-default-single: clean-all-single + +clean-default-multi: clean-all-multi + +clean-default-shared: clean-all-shared + diff --git a/externals/grill/trunk/flext/buildsys/targets-shlib.inc b/externals/grill/trunk/flext/buildsys/targets-shlib.inc new file mode 100644 index 0000000000000000000000000000000000000000..b8031522ff579bdc94696475eaffc84c358e4191 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/targets-shlib.inc @@ -0,0 +1,51 @@ +build-default-default: build-$(BUILDMODE)-$(BUILDTYPE) + +build-all-default: build-all-$(BUILDTYPE) + +build-release-default: build-release-$(BUILDTYPE) + +build-debug-default: build-debug-$(BUILDTYPE) + +build-profile-default: build-profile-$(BUILDTYPE) + +build-default-all: build-$(BUILDMODE)-all + +build-default-single: build-$(BUILDMODE)-single + +build-default-multi: build-$(BUILDMODE)-multi + +build-default-shared: build-$(BUILDMODE)-shared + + +install-default-default: install-$(BUILDMODE)-$(BUILDTYPE) + +install-all-default: install-all-$(BUILDTYPE) + +install-release-default: install-release-$(BUILDTYPE) + +install-debug-default: install-debug-$(BUILDTYPE) + +install-default-all: install-$(BUILDMODE)-all + +install-default-single: install-$(BUILDMODE)-single + +install-default-multi: install-$(BUILDMODE)-multi + +install-default-shared: install-$(BUILDMODE)-shared + + +clean-default-default: clean-$(BUILDMODE)-$(BUILDTYPE) + +clean-all-default: clean-all-$(BUILDTYPE) + +clean-release-default: clean-release-$(BUILDTYPE) + +clean-debug-default: clean-debug-$(BUILDTYPE) + +clean-default-all: clean-$(BUILDMODE)-all + +clean-default-single: clean-$(BUILDMODE)-single + +clean-default-multi: clean-$(BUILDMODE)-multi + +clean-default-shared: clean-$(BUILDMODE)-shared diff --git a/externals/grill/trunk/flext/buildsys/targets.inc b/externals/grill/trunk/flext/buildsys/targets.inc new file mode 100644 index 0000000000000000000000000000000000000000..3107b342a665287768edbe68156838f2c2e01136 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/targets.inc @@ -0,0 +1,148 @@ +all: build + +build: build-default-default + +profile: build-profile-default + +clean: clean-default-default + +install: install-default-default + +########################################################### + +build-all-all: build-release-all build-debug-all + +build-release-all: build-release-single build-release-multi build-release-shared + +build-debug-all: build-debug-single build-debug-multi build-debug-shared + +build-profile-all: build-profile-single build-profile-multi build-profile-shared + +build-all-single: build-release-single build-debug-single + +build-all-multi: build-release-multi build-debug-multi + +build-all-shared: build-release-shared build-debug-shared + +################################################### + +install-all-all: install-release-all install-debug-all + +install-release-all: install-release-single install-release-multi install-release-shared + +install-debug-all: install-debug-single install-debug-multi install-debug-shared + +install-profile-all: install-profile-single install-profile-multi install-profile-shared + +install-all-single: install-release-single install-debug-single + +install-all-multi: install-release-multi install-debug-multi + +install-all-shared: install-release-shared install-debug-shared + +################################################### + +clean-all-all: clean-release-all clean-debug-all + +clean-release-all: clean-release-single clean-release-multi clean-release-shared + +clean-debug-all: clean-debug-single clean-debug-multi clean-debug-shared + +clean-profile-all: clean-profile-single clean-profile-multi clean-profile-shared + +clean-all-single: clean-release-single clean-debug-single + +clean-all-multi: clean-release-multi clean-debug-multi + +clean-all-shared: clean-release-shared clean-debug-shared + +########################################################### + +build-release-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=single _build_ + +build-debug-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=single DEBUG=1 _build_ + +build-profile-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=single PROFILE=1 _build_ + +build-release-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=multi THREADED=1 _build_ + +build-debug-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=multi THREADED=1 DEBUG=1 _build_ + +build-profile-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=multi THREADED=1 PROFILE=1 _build_ + +build-release-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=shared SHARED=1 _build_ + +build-debug-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=shared SHARED=1 DEBUG=1 _build_ + +build-profile-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=shared SHARED=1 PROFILE=1 _build_ + +########################################################### + +install-release-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=single _install_ + +install-debug-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=single DEBUG=1 _install_ + +install-profile-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=single PROFILE=1 _install_ + +install-release-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=multi THREADED=1 _install_ + +install-debug-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=multi THREADED=1 DEBUG=1 _install_ + +install-profile-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=multi THREADED=1 PROFILE=1 _install_ + +install-release-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=shared SHARED=1 _install_ + +install-debug-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=shared SHARED=1 DEBUG=1 _install_ + +install-profile-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=shared SHARED=1 PROFILE=1 _install_ + +########################################################### + +clean-release-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=single _clean_ + +clean-debug-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=single DEBUG=1 _clean_ + +clean-profile-single: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=single PROFILE=1 _clean_ + +clean-release-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=multi THREADED=1 _clean_ + +clean-debug-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=multi THREADED=1 DEBUG=1 _clean_ + +clean-profile-multi: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=multi THREADED=1 PROFILE=1 _clean_ + +clean-release-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=release TARGETTYPE=shared SHARED=1 _clean_ + +clean-debug-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=debug TARGETTYPE=shared SHARED=1 DEBUG=1 _clean_ + +clean-profile-shared: config + $(MAKE) $(MAKE_OPTIONS) TARGETMODE=profile TARGETTYPE=shared SHARED=1 PROFILE=1 _clean_ + +########################################################### + +config: $(USRMAKE) $(SYSCONFIG) $(USRCONFIG) diff --git a/externals/grill/trunk/flext/buildsys/version.inc b/externals/grill/trunk/flext/buildsys/version.inc new file mode 100644 index 0000000000000000000000000000000000000000..e97bf347b0db75cc5ec435c818ba282a55d52e9a --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/version.inc @@ -0,0 +1,3 @@ +FLEXTMAJOR=0 +FLEXTMINOR=6 +FLEXTMICRO=0 diff --git a/externals/grill/trunk/flext/buildsys/win/bmake-bcc-ext.inc b/externals/grill/trunk/flext/buildsys/win/bmake-bcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..89f4adcb2f3ff5889ed4a57f6c7e1865849cf91b --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/bmake-bcc-ext.inc @@ -0,0 +1,63 @@ +# build class specific settings + +INCPATH=$(INCPATH) -I$(FLEXTINC) +LIBPATH=$(LIBPATH) -L$(FLEXTLIB) +LIBS=$(LIBS) $(FLEXTNAME).lib + +!ifndef SHARED +!ifdef SNDOBJ +LIBS=$(LIBS) $(SNDOBJ)\lib\SndObj.lib +!endif + +!ifdef STK +LIBS=$(LIBS) $(STK)\src\Stk.obj +!endif +!endif + +############################################## + +# default target +_build_: $(TARGET) + +$(OUTPATH): + if not exist $@ mkdir $@ > nul + +$(TARGETPATH): $(OUTPATH) + if not exist $@ mkdir $@ > nul + +SETUPFUNCTION=$(NAME)_setup + +$(TARGETPATH)\$(NAME).def: $(TARGETPATH) + @echo EXPORTS $(SETUPFUNCTION) = _$(SETUPFUNCTION) > $@ +# this next line fixes a strange problem with implib - lacking underscore?! + @echo IMPORTS _rtext_retext=PD.rtext_retext >> $@ + +$(TARGET) :: $(TARGETPATH)\$(NAME).def + +{$(SRCDIR)}.cpp{}.obj: + bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $< + +{$(SRCDIR)}.c{}.obj: + bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $< + +$(TARGET) :: $(TARGETPATH) + +$(TARGET) :: $(OBJS) + @cd $(TARGETPATH) + ilink32 $(LDFLAGS) $(LIBPATH) -L. $(OBJS) ,$(<F),,$(LIBS),$(NAME).def + @cd ..\.. + +############################################## +# remove build + +_clean_: + -del /q $(TARGETPATH)\*.* > nul + -rmdir /q $(TARGETPATH) > nul + +############################################## + +$(INSTPATH): + if not exist $@ mkdir $@ > nul + +_install_: $(INSTPATH) + copy $(TARGET) $(INSTPATH) > nul diff --git a/externals/grill/trunk/flext/buildsys/win/bmake-bcc-flext.inc b/externals/grill/trunk/flext/buildsys/win/bmake-bcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..66e56b2283ec6ba7b6cf7b1044dee6ec0b098880 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/bmake-bcc-flext.inc @@ -0,0 +1,84 @@ +# build class specific settings + +!ifdef SHARED + +!ifdef SNDOBJ +LIBS=$(LIBS) $(SNDOBJ)\lib\SndObj.lib +SRCS=$(SRCS) $(SRCS_SNDOBJ) +!endif + +!ifdef STK +LIBS=$(LIBS) $(STK)\src\Stk.obj +SRCS=$(SRCS) $(SRCS_STKOBJ) +!endif + +!endif + +############################################## + +# default target +_build_: $(TARGET) + +$(OUTPATH): + if not exist $@ mkdir $@ > nul + +$(TARGETPATH): $(OUTPATH) + if not exist $@ mkdir $@ > nul + +{$(SRCDIR)}.cpp{}.obj: + bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $< + +{$(SRCDIR)}.c{}.obj: + bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $< + + +$(TARGETPATH)\pd.lib : $(PDPATH)\bin\pd.dll + implib -a $< $** + +$(TARGETPATH)\pthreadVC.lib : $(PDPATH)\bin\pthreadVC.dll + implib -a $< $** + +PDTARGETS=$(TARGETPATH)\pd.lib $(TARGETPATH)\pthreadVC.lib + + +$(TARGET) :: $(TARGETPATH) $(PDTARGETS) + +$(TARGET) :: $(OBJS) + @cd $(TARGETPATH) +!ifdef SHARED + ilink32 $(LDFLAGS) $(LIBPATH) -L. $(OBJS) ,$(<F),,$(LIBS) + implib -a $(<B).lib $(<F) +!else + -del $(<F) + tlib "$(<F)" +$(OBJS: = +) +!endif + @cd ..\.. + +############################################## + +_clean_: + -del /q $(TARGETPATH)\*.* > nul + -rmdir /q $(TARGETPATH) > nul + +############################################## + +!ifdef SHARED +FLEXTLIBINST=$(FLEXTSHLIB) +!else +FLEXTLIBINST=$(FLEXTLIB) +!endif + +_install_: + @if not exist $(FLEXTINC) mkdir $(FLEXTINC) > nul + @if not exist $(FLEXTLIB) mkdir $(FLEXTLIB) > nul + @if not exist $(FLEXTLIBINST) mkdir $(FLEXTLIBINST) > nul + + copy $(TARGET) $(FLEXTLIBINST) > nul +!ifdef SHARED +# copy import library + copy $(TARGET:.dll=.lib) $(FLEXTLIB) > nul +!endif +# copy headers + for %%i in ($(HDRS) $(SRCS)) do @copy $(SRCDIR)\%%i $(FLEXTINC) > nul +# copy import libraries + for %%i in ($(PDTARGETS)) do @copy %%i $(FLEXTLIB) > nul diff --git a/externals/grill/trunk/flext/buildsys/win/bmake-bcc.inc b/externals/grill/trunk/flext/buildsys/win/bmake-bcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..20fec55871751bfeeb9e708844af1699e59e92b0 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/bmake-bcc.inc @@ -0,0 +1,47 @@ +!ifdef BCCPATH +INCPATH=$(INCPATH) -I$(BCCPATH)\include +LIBPATH=$(LIBPATH) -L$(BCCPATH)\lib +!endif + +!ifdef SNDOBJ +INCPATH=$(INCPATH) /I$(SNDOBJ)\include +!endif + +!ifdef STK +INCPATH=$(INCPATH) /I$(STK)\include +!endif + +############################################## + +OBJPATH=$(OUTPATH)\$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT) + +############################################## +# use precompiled headers + +!ifdef PRECOMPILE +CFLAGS=$(CFLAGS) -Hh=$(PRECOMPILE) -H=$(OBJPATH)\precompiled.pch +!endif + +############################################## + +LIBS=$(LIBS) cw32.lib import32.lib C0D32.OBJ +CFLAGS=$(CFLAGS) -tWD -tWM -w-8004 -w-8027 -w-8057 +LDFLAGS=$(LDFLAGS) /C /Tpd + +# default Windows flags as defined from VC IDE +CFLAGS=$(CFLAGS) /DWIN32 /D_WINDOWS + +############################################## + +!ifdef DEBUG +CFLAGS=$(CFLAGS) -v +LDFLAGS=$(LDFLAGS) /v +!endif + +############################################## +# convert both *.c and *.cpp + +OBJSTMP= $(SRCS:.c=.obj) +OBJS= $(OBJSTMP:.objpp=.obj) diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin-ext.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..141d50930a131cbad44a959deb8967e8418961b1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin-ext.inc @@ -0,0 +1,42 @@ +# build class specific settings + +INCPATH += -I$(FLEXTINC) +LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB) +LIBS += -l$(FLEXTNAME) + +############################################## + +# default target +_build_: $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +$(TARGETPATH): + -mkdir -p $@ + +$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp + $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGETPATH)/%.o : $(SRCDIR)/%.c + $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGET) :: $(TARGETPATH) + +$(TARGET) :: $(COBJS) $(CPPOBJS) + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) $(SYSLIBS) + strip --strip-unneeded $@ + chmod 755 $@ + +############################################## + +_clean_: + rm $(COBJS) $(CPPOBJS) $(TARGET) + +############################################## + +$(INSTPATH): + -mkdir -p $(INSTPATH) + +_install_: $(INSTPATH) + install $(TARGET) $(INSTPATH) diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin-flext.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..ccecaee6243b3d379cf33b01f2ad6847f203d2bf --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin-flext.inc @@ -0,0 +1,52 @@ +# build class specific settings + +############################################## + +# default target +_build_: $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +$(TARGETPATH): + -mkdir -p $@ + +$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp + $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGETPATH)/%.o : $(SRCDIR)/%.c + $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ + +$(TARGET) :: $(TARGETPATH) + +$(TARGET) :: $(COBJS) $(CPPOBJS) +ifdef SHARED + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) $(SYSLIBS) + chmod 755 $@ + strip --strip-unneeded $@ +else + $(AR) rc $@ $(COBJS) $(CPPOBJS) +endif + +############################################## + +_clean_: + rm $(COBJS) $(CPPOBJS) $(TARGET) + +############################################## + +ifdef SHARED +FLEXTLIBINST=$(FLEXTSHLIB) +else +FLEXTLIBINST=$(FLEXTLIB) +endif + +$(FLEXTINC): + -mkdir -p $(FLEXTINC) + +$(FLEXTLIBINST): + -mkdir -p $(FLEXTLIBINST) + +_install_: $(FLEXTINC) $(FLEXTLIBINST) + install $(TARGET) $(FLEXTLIBINST) + install $(patsubst %,$(SRCDIR)/%,$(HDRS) $(SRCS)) $(FLEXTINC) diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin.inc new file mode 100644 index 0000000000000000000000000000000000000000..1969879405afcc117c2acd0216ba6b30d8553864 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-cygwin.inc @@ -0,0 +1,34 @@ +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) +INCPATH += -I/usr/include + +############################################## + +CFLAGS += -mno-cygwin -include /usr/include/stdlib.h +LDFLAGS += -shared -mno-cygwin + +# default Windows flags as defined from VC IDE +CFLAGS += -DWIN32 -D_WINDOWS + +############################################## + +ifdef DEBUG +CFLAGS += -g +else +ifdef PROFILE +CFLAGS += -g -pg +LDFLAGS += -pg +else +LDFLAGS += -Wl,-S +endif +endif + +############################################## + +CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS))) diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-ext.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..a4523b0dfd4cddb36755c490497b58da8ca89e5d --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-ext.inc @@ -0,0 +1,37 @@ +# build class specific settings + +INCPATH += -I$(FLEXTINC) +LIBPATH += -L$(FLEXTLIB) +LIBS += -l$(FLEXTNAME) + +# common compilation stuff +include $(BUILDPATH)$(PLATFORM)/gnumake-gcc-targets.inc + +##### linking ################### + +$(TARGET) :: $(OBJPATH) $(TARGETPATH) + +$(TARGET) :: $(PRECOMDST) $(COBJS) $(CPPOBJS) + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) +ifdef DEBUG +else +ifdef PROFILE +else + strip -x $@ +endif +endif + chmod 755 $@ + +ifdef TARGETPOST +$(TARGET) :: $(TARGETPOST) +endif + +################################### + +# Attention: $@ doesn't work for paths with spaces.... +$(INSTPATH): + -mkdir -p $(INSTPATH) + +_install_:: $(INSTPATH) +# copy plain file or whole bundle + cp -R $(INSTTARGET) $(INSTPATH) diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-flext.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..d2d945880c7825883f9374fcb168ea9ed0858f38 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-flext.inc @@ -0,0 +1,57 @@ +# build class specific settings + +#ifdef SHARED +#LDFLAGS += -install_name $(FLEXTLIB)/$(TARGETNAME) +#LDFLAGS += -current_version $(FLEXTMAJOR).$(FLEXTMINOR).$(FLEXTMICRO) +#LDFLAGS += -compatibility_version $(FLEXTMAJOR).$(FLEXTMINOR) +#LDFLAGS += -preload -seg1addr 0xd0000000 +#endif + +# common compilation stuff +include $(BUILDPATH)$(PLATFORM)/gnumake-gcc-targets.inc + +##### linking ################### + +$(TARGET) :: $(OBJPATH) $(TARGETPATH) + +$(TARGET) :: $(PRECOMDST) $(COBJS) $(CPPOBJS) +ifdef SHARED + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) +ifdef DEBUG +else +ifdef PROFILE +else + strip -x $@ +endif +endif + chmod 755 $@ +else + $(AR) rc $@ $(COBJS) $(CPPOBJS) +endif + +ifdef TARGETPOST +$(TARGET) :: $(TARGETPOST) +endif + +################################### + +$(FLEXTINC): + -mkdir -p $@ + +$(FLEXTLIB): + -mkdir -p $@ + +_install_: $(FLEXTINC) $(FLEXTLIB) +# --- install as dynamic library --- + install $(TARGET) $(FLEXTLIB) +ifdef VERNAME + ln -sf $(VERNAME) $(FLEXTLIB)/$(TARGETNAME) +endif + install $(patsubst %,$(SRCDIR)/%,$(HDRS) $(SRCS)) $(FLEXTINC) +# transfer build system +# cp -rf buildsys $(FLEXTSYS) +# install build.sh $(FLEXTSYS) +# chmod -R a+rx $(FLEXTSYS) +# make convenience script +# echo bash $(FLEXTSYS)/build.sh $$\* > $(FLEXTBIN)/flext-build.sh +# chmod a+rx $(FLEXTBIN)/flext-build.sh diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-targets.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-targets.inc new file mode 100644 index 0000000000000000000000000000000000000000..2ed9218ca7be13ecf1658c00ca4536a1ec264109 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-gcc-targets.inc @@ -0,0 +1,56 @@ +############################################## + +CSRCS := $(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS := $(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS := $(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS := $(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS))) + +############################################## + +# default target +_build_: $(TARGET) + +$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) + touch $@ + +# Attention: $@ doesn't work for paths with spaces.... +$(OBJPATH): + -mkdir -p $(OBJPATH) + +# Attention: $@ doesn't work for paths with spaces.... +$(TARGETPATH): + -mkdir -p $(TARGETPATH) + +##### precompiled header file ################### + +ifdef PRECOMPILE +PRECOMSRC := $(SRCDIR)/$(PRECOMPILE) +else +PRECOMSRC := $(FLEXTINC)/flext.h +endif + +ifdef PRECOMSRC +PRECOMDST := $(OBJPATH)/$(notdir $(PRECOMSRC)).gch +PRECOMINC := -I $(OBJPATH) +endif + +$(PRECOMDST) : $(PRECOMSRC) $(patsubst %,$(SRCDIR)/%,$(HDRS)) + -mkdir -p $(dir $@) + $(CXX) -c $(DEFS) $(INCPATH) $(PRECOMSRC) -o $@ + + +$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp + -mkdir -p $(dir $@) + $(CXX) -c $(CFLAGS) $(DEFS) $(PRECOMINC) $(INCPATH) $^ -o $@ + +$(OBJPATH)/%.o : $(SRCDIR)/%.c + -mkdir -p $(dir $@) + $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $^ -o $@ + +############################################## + +_clean_: + -rm -r $(TARGETPATH) + -rm -r $(OBJPATH) + +############################################## diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-gcc.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..1eac018576906923ef1e35a2ead9403b636e79cf --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-gcc.inc @@ -0,0 +1,49 @@ +############################################## + +ifdef LOCKFREEPATH +INCPATH += -I$(LOCKFREEPATH) +endif + +ifdef ATOMICOPSPATH +INCPATH += -I$(ATOMICOPSPATH) +endif + +ifdef SNDOBJ_LIB +INCPATH += -I$(SNDOBJ_INC) +LIBPATH += -L$(SNDOBJ_LIB) +endif + +ifdef STK_LIB +INCPATH += -I$(STK_INC) +LIBPATH += -L$(STK_LIB) +endif + +############################################## + +ifndef FLEXTLIB +FLEXTLIB := $(FLEXTPREFIX)/lib +endif +ifndef FLEXTINC +FLEXTINC := $(FLEXTPREFIX)/include/flext +endif +ifndef FLEXTSYS +FLEXTSYS := $(FLEXTPREFIX)/lib/flext +endif + +############################################## + +LDFLAGS += -dynamic + +############################################## + +ifdef DEBUG +CFLAGS += -g +LDFLAGS += -g +else +ifdef PROFILE +CFLAGS += -g +LDFLAGS += -g +else +LDFLAGS += -Wl,-S +endif +endif diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-mingw-ext.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-mingw-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..ded22d636b923542610936f47e583e315738eb05 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-mingw-ext.inc @@ -0,0 +1,58 @@ +# build class specific settings + +INCPATH += -I$(FLEXTINC) +LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB) + +ifdef SHARED +LIBS += $(FLEXTSHLIB)/lib$(FLEXTNAME).dll +else +LIBS += -l$(FLEXTNAME) +endif + +ifndef SHARED +ifdef SNDOBJ +LIBS += -lSndObj +endif + +ifdef STK +LIBS += -lStk +endif +endif + +############################################## + +# default target +_build_: $(TARGET) + +#$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) +# touch $@ + +$(OUTPATH): + -mkdir $(subst /,\,$@) + +$(TARGETPATH): $(OUTPATH) + -mkdir $(subst /,\,$@) + +$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp + $(CXX) -c $(CFLAGS) $(DEFS) $(subst \,/,$(INCPATH)) $< -o $(subst /,\,$@) + +$(TARGETPATH)/%.o : $(SRCDIR)/%.c + $(CC) -c $(CFLAGS) $(DEFS) $(subst \,/,$(INCPATH)) $< -o $(subst /,\,$@) + +$(TARGET) :: $(TARGETPATH) + +$(TARGET) :: $(COBJS) $(CPPOBJS) + $(CXX) $(LDFLAGS) $(subst \,/,$(LIBPATH)) -o $(subst /,\,$@) $(subst /,\,$(COBJS) $(CPPOBJS) $(LIBS) $(SYSLIBS)) + -strip --strip-unneeded $@ + +############################################## + +_clean_: + -del /q $(subst /,\,$(TARGETPATH)/*.*) > nul + -rmdir /q $(subst /,\,$(TARGETPATH)) > nul + +############################################## + +_install_: + @if not exist $(subst /,\,$(INSTPATH)) -mkdir $(subst /,\,$(INSTPATH)) + copy $(subst /,\,$(TARGET) $(INSTPATH)) diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-mingw-flext.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-mingw-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..60b1ab6ad6c4d1b2963a6a5cdfde91959b391019 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-mingw-flext.inc @@ -0,0 +1,52 @@ +# build class specific settings + +############################################## + +# default target +_build_: $(TARGET) + +#$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) +# touch $@ + +$(OUTPATH): + -mkdir $(subst /,\,$@) + +$(TARGETPATH): $(OUTPATH) + -mkdir $(subst /,\,$@) + +$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp + $(CXX) -c $(CFLAGS) $(DEFS) $(subst \,/,$(INCPATH)) $< -o $(subst /,\,$@) + +$(TARGETPATH)/%.o : $(SRCDIR)/%.c + $(CC) -c $(CFLAGS) $(DEFS) $(subst \,/,$(INCPATH)) $< -o $(subst /,\,$@) + +$(TARGET) :: $(TARGETPATH) + +$(TARGET) :: $(COBJS) $(CPPOBJS) +ifdef SHARED + $(CXX) $(LDFLAGS) $(LIBPATH) -o $(subst /,\,$@) $(subst /,\,$(COBJS) $(CPPOBJS) $(LIBS)) + -strip --strip-unneeded $@ +else + $(AR) rc $@ $(COBJS) $(CPPOBJS) +endif + +############################################## + +_clean_: + -del /q $(subst /,\,$(TARGETPATH)/*.*) > nul + -rmdir /q $(subst /,\,$(TARGETPATH)) > nul + +############################################## + +ifdef SHARED +FLEXTLIBINST=$(FLEXTSHLIB) +else +FLEXTLIBINST=$(FLEXTLIB) +endif + +_install_:: + @if not exist $(subst /,\,$(FLEXTINC)) -mkdir $(subst /,\,$(FLEXTINC)) + @if not exist $(subst /,\,$(FLEXTLIBINST)) -mkdir $(subst /,\,$(FLEXTLIBINST)) + + copy $(subst /,\,$(TARGET) $(FLEXTLIBINST)) + -for %%i in ($(HDRS) $(SRCS)) do @copy $(SRCDIR)\%%i $(subst /,\,$(FLEXTINC)) > nul diff --git a/externals/grill/trunk/flext/buildsys/win/gnumake-mingw.inc b/externals/grill/trunk/flext/buildsys/win/gnumake-mingw.inc new file mode 100644 index 0000000000000000000000000000000000000000..436a504f1e5d0632abbe48f923e5b4d19fe5ba83 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/gnumake-mingw.inc @@ -0,0 +1,33 @@ +############################################## + +OBJPATH=$(OUTPATH)\$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT) + +############################################## + +CFLAGS += -mms-bitfields +LDFLAGS += -shared + +# default Windows flags as defined from VC IDE +CFLAGS += -DWIN32 -D_WINDOWS + +############################################## + +ifdef DEBUG +CFLAGS += -g +else +ifdef PROFILE +CFLAGS += -g -pg +LDFLAGS += -pg +else +LDFLAGS += -Wl,-S +endif +endif + +############################################## + +CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS))) diff --git a/externals/grill/trunk/flext/buildsys/win/max/config-cygwin.def b/externals/grill/trunk/flext/buildsys/win/max/config-cygwin.def new file mode 100644 index 0000000000000000000000000000000000000000..9abb816b2f9a8bef1ce2dd126c537f4184498865 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/config-cygwin.def @@ -0,0 +1,71 @@ +# where is the Max/MSP application? +MAXAPPPATH=/cygdrive/c/program\ files/MaxMSP\ 4.5 + +# where are the Max/MSP common files? +MAXCOMPATH=/cygdrive/c/program\ files/common\ files/Cycling\ \'74 + + +# where are the Max/MSP SDK header files? +# you should have the latest version! +MAXSDKPATH=$(MAXAPPPATH)/maxmspsdk_win/4.5\ headers/c74support + +############################################################### + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(MAXCOMPATH)/flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +# (a good place is the MaxMSP program folder) +FLEXTSHLIB=$(MAXAPPPATH) + +############################################################### + +# where should the external be built? +# (path for temporary files) +OUTPATH=max-cygwin + +# where should the external be installed? +INSTPATH=$(MAXCOMPATH)/externals/flext + +# where should the initialization files be installed? +INITPATH=$(MAXCOMPATH)/init + +# where should the help files be installed? +HELPPATH=$(MAXAPPPATH)/max-help/flext + +############################################################### + +# where is the STK installation? +# (uncomment the line with # to disable STK support) +# -------------------------------------------------------------------- +# In order to use STK you must have a libstk.a library +# +#STK=c:\data\prog\audio\stk + +# where is the Sndobjs installation? +# (uncomment the line with # to disable SNDOBJ support) +# -------------------------------------------------------------------- +# Please be sure to delete an eventual m_pd.h file from the SNDOBJ include folder!! +# The shared flext library links to the libsndobj.a file from the SNDOBJ distribution. +# +#SNDOBJ=c:\data\prog\audio\sndobj + +############################################################### + +# make flags (e.g. use multiprocessor) +#MFLAGS=-j 2 + +# user defined compiler flags +# (check if they match your system!) +UFLAGS=-msse -mfpmath=sse -ffast-math + +# user defined optimization flags +# (check if they match your system!) +OFLAGS=-O3 +# optimizations for Pentium 4 +OFLAGS+=-march=pentium4 diff --git a/externals/grill/trunk/flext/buildsys/win/max/config-mingw.def b/externals/grill/trunk/flext/buildsys/win/max/config-mingw.def new file mode 100644 index 0000000000000000000000000000000000000000..f2d03dfb6ede98418c2ababaa7c7bfebb7987a5b --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/config-mingw.def @@ -0,0 +1,64 @@ +# where are the Max/MSP SDK header files? +# you should have the latest version! +MAXSDKPATH="%ProgramFiles%\MaxMSP 4.5/maxmspsdk_win/4.5 headers/c74support" + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC="%CommonProgramFiles%/Cycling '74/flext" + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +# (a good place is the MaxMSP program folder) +FLEXTSHLIB="%ProgramFiles%\MaxMSP 4.5" + +############################################################### + +# where should the external be built? +# (path for temporary files) +OUTPATH=max-mingw + +# where should the external be installed? +INSTPATH="%CommonProgramFiles%/Cycling '74/externals/flext" + +# where should the initialization files be installed? +INITPATH="%CommonProgramFiles%/Cycling '74/init" + +# where should the help files be installed? +HELPPATH="%ProgramFiles%/MaxMSP 4.5/max-help/flext" + +############################################################### + +# where is the STK installation? +# (uncomment the line with # to disable STK support) +# -------------------------------------------------------------------- +# In order to use STK you must have an Stk.obj file +# made with mingw +# g++ -c -mno-cygwin -O3 -I ../include Stk.cpp -o Stk.obj +# +#STK=c:\data\prog\audio\stk + +# where is the Sndobjs installation? +# (uncomment the line with # to disable SNDOBJ support) +# -------------------------------------------------------------------- +# Please be sure to delete an eventual m_pd.h file from the SNDOBJ include folder!! +# The shared flext library links to the libsndobj.a library. +# +#SNDOBJ=c:\data\prog\audio\sndobj + +############################################################### + +# make flags (e.g. use multiprocessor) +#MFLAGS=-j 2 + +# user defined compiler flags +# (check if they match your system!) +UFLAGS=-msse -ffast-math + +# user defined optimization flags +# (check if they match your system!) +OFLAGS=-O3 +# optimizations for Pentium 4 +OFLAGS+=-march=pentium4 diff --git a/externals/grill/trunk/flext/buildsys/win/max/config-msvc.def b/externals/grill/trunk/flext/buildsys/win/max/config-msvc.def new file mode 100644 index 0000000000000000000000000000000000000000..033b50d522ea26ed35bda83fb6db7737e26f3e66 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/config-msvc.def @@ -0,0 +1,80 @@ +# where are the Max/MSP SDK header files? +# you should have the latest version! +MAXSDKPATH="%ProgramFiles%\MaxMSP 4.5\maxmspsdk_win\4.5 headers\c74support" + +# where is MS VC++? +# (not necessary if the build is run with the compiler environment) +# MSVCPATH="%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7" + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC="%CommonProgramFiles%\Cycling '74\flext" + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +# (a good place is the MaxMSP program folder) +FLEXTSHLIB="%ProgramFiles%\MaxMSP 4.5" + +############################################################### + +# where should the external be built? +# (path for temporary files) +OUTPATH=max-msvc + +# where should the external be installed? +INSTPATH="%CommonProgramFiles%\Cycling '74\externals\flext" + +# where should the initialization files be installed? +INITPATH="%CommonProgramFiles%\Cycling '74\init" + +# where should the help files be installed? +HELPPATH="%ProgramFiles%\MaxMSP 4.5\max-help\flext" + +############################################################### + +# where is the STK installation? +# (uncomment the line with # to disable STK support) +# -------------------------------------------------------------------- +# In order to use STK you must have an stk.lib library +# Using MSVC you can build it as following (from the STK main folder): +# cl /c /GR /EHsc /Iinclude /MT /Ox src\*.cpp +# (in case you define DYNAMIC=1 below, omit the /MT flag and set /MD instead) +# (you will get errors for some files, you can ignore them in the flext context) +# lib *.obj /out:stk.lib +# + +# where to find the STK header files (e.g. stk.h) +#STK_INC=%HOMEDRIVE%\%HOMEPATH%\stk\include + +# where to find the STK library (normally stk.lib) +# (comment out STK_LIB if you don't use STK) +#STK_LIB=%HOMEDRIVE%\%HOMEPATH%\stk\stk.lib + +# where is the Sndobjs installation? +# (uncomment the line with # to disable SNDOBJ support) +# -------------------------------------------------------------------- +# Please be sure to delete an eventual m_pd.h file from the SNDOBJ include folder!! +# Flext must be compiled with the same compiler version as the SNDOBJ lib (default MSVC6) +# + +# where to find the SndObj header files (e.g. SndObj.h) +#SNDOBJ_INC=%HOMEDRIVE%\%HOMEPATH%\SndObj\include + +# where to find the SndObj library (normally SndObj.lib) +# (comment out SNDOBJ_LIB if you don't use SndObj) +#SNDOBJ_LIB=%HOMEDRIVE%\%HOMEPATH%\SndObj\lib\SndObj.lib + +############################################################### + +# some user-definable flags +# (check if they match your system!) +OFLAGS=/Ox +# optimizations for Pentium 4 +#OFLAGS=$(OFLAGS) /G6 /arch:SSE + +# uncomment to link against dynamic C runtime libraries +# (that's ok if you compile with VC++ 7.0 and 7.1) +DYNAMIC=1 diff --git a/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin-ext.inc b/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..04e59462bf185bd86d5f9d9259ab51f42cd9fbd3 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin-ext.inc @@ -0,0 +1 @@ +EXT=mxe diff --git a/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin-flext.inc b/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..b9b41f2327543e4376fcc22ce8d425debbd07df8 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin-flext.inc @@ -0,0 +1,6 @@ +ifdef SHARED +EXT=dll +else +EXT=a +endif + diff --git a/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin.inc b/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin.inc new file mode 100644 index 0000000000000000000000000000000000000000..c97423fc802e336db32c3be3498c3be31f4b5bf5 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/gnumake-cygwin.inc @@ -0,0 +1,10 @@ +DEFS += -DFLEXT_SYS=1 + +# fpack-struct should align to 2 bytes... rely on the SDK to specify that +CFLAGS += -DWINVER=0x0501 -D_WIN32_WINNT=0x501 -DWIN_VERSION -DWIN_EXT_VERSION + +INCPATH += -I$(MAXSDKPATH)/max-includes -I$(MAXSDKPATH)/jit-includes -I$(MAXSDKPATH)/msp-includes +LIBPATH += -L$(MAXSDKPATH)/max-includes -L$(MAXSDKPATH)/jit-includes -L$(MAXSDKPATH)/msp-includes + +# these are both in MAXSDKPATH +SYSLIBS += -lMaxAPI -lMaxAudio diff --git a/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw-ext.inc b/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..04e59462bf185bd86d5f9d9259ab51f42cd9fbd3 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw-ext.inc @@ -0,0 +1 @@ +EXT=mxe diff --git a/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw-flext.inc b/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..821d6fbc8fc526d8a95218cb52ae19daa8350785 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw-flext.inc @@ -0,0 +1,6 @@ +ifdef SHARED +EXT=dll +else +EXT=LIB +endif + diff --git a/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw.inc b/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw.inc new file mode 100644 index 0000000000000000000000000000000000000000..528482bf8dbd57379dd886143896f10a81cfb36f --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/gnumake-mingw.inc @@ -0,0 +1,12 @@ +DEFS += -DFLEXT_SYS=1 + +# fpack-struct should align to 2 bytes... rely on the SDK header files to specify that +CFLAGS += -DWINVER=0x0501 -D_WIN32_WINNT=0x501 -DWIN_VERSION -DWIN_EXT_VERSION +# suppress multiple symbol errors +LDFLAGS += -Wl,--allow-multiple-definition + +INCPATH += -I$(MAXSDKPATH)/max-includes -I$(MAXSDKPATH)/jit-includes -I$(MAXSDKPATH)/msp-includes +LIBPATH += -L$(MAXSDKPATH)/max-includes -L$(MAXSDKPATH)/jit-includes -L$(MAXSDKPATH)/msp-includes + +# these are both in MAXSDKPATH +SYSLIBS += -lMaxAPI -lMaxAudio diff --git a/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc-ext.inc b/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..105d34f54c87f97cbeaf44f0ebf11567a067ea79 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc-ext.inc @@ -0,0 +1,2 @@ +EXT=mxe +LDFLAGS=$(LDFLAGS) /EXPORT:main diff --git a/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc-flext.inc b/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..d30a71440a2c4d56d6b12f7a1ba6a92dfc4ea6b7 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc-flext.inc @@ -0,0 +1,5 @@ +!ifdef SHARED +EXT=dll +!else +EXT=lib +!endif diff --git a/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc.inc b/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc.inc new file mode 100644 index 0000000000000000000000000000000000000000..b399d4cef988791f35c904ba23abd096d97d3ab2 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/max/nmake-msvc.inc @@ -0,0 +1,8 @@ +DEFS=$(DEFS) /DFLEXT_SYS=1 +CFLAGS=$(CFLAGS) /DWINVER=0x0501 /D_WIN32_WINNT=0x501 /DWIN_VERSION /DWIN_EXT_VERSION + +INCPATH=$(INCPATH) /I$(MAXSDKPATH)\max-includes /I$(MAXSDKPATH)\jit-includes /I$(MAXSDKPATH)\msp-includes +LIBPATH=$(LIBPATH) /LIBPATH:$(MAXSDKPATH)\max-includes /LIBPATH:$(MAXSDKPATH)\jit-includes /LIBPATH:$(MAXSDKPATH)\msp-includes + +# these are both in MAXSDKPATH +LIBS=$(LIBS) maxapi.lib maxaudio.lib \ No newline at end of file diff --git a/externals/grill/trunk/flext/buildsys/win/nmake-msvc-ext.inc b/externals/grill/trunk/flext/buildsys/win/nmake-msvc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..e94bd4a2500e7b556d0af3057074d46d0ce0b6b2 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/nmake-msvc-ext.inc @@ -0,0 +1,61 @@ +# build class specific settings + +INCPATH=$(INCPATH) /I$(FLEXTINC) +LIBPATH=$(LIBPATH) /LIBPATH:$(FLEXTLIB) +LIBS=$(LIBS) $(FLEXTNAME).lib + +!ifndef SHARED +!ifdef SNDOBJ +LIBS=$(LIBS) $(SNDOBJ)\lib\SndObj.lib +!endif + +!ifdef STK +LIBS=$(LIBS) $(STK)\stk.lib +!endif +!endif + +############################################## + +# default target +_build_: $(TARGET) + +$(OUTPATH): + if not exist $@ mkdir $@ > nul + +$(TARGETPATH): $(OUTPATH) + if not exist $@ mkdir $@ > nul + +{$(SRCDIR)}.cpp{}.obj: + cl /c $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@ + +.cpp.obj: + @-mkdir $(TARGETPATH)\$(@D:/=\) 2> NUL + cl /c $(CFLAGS) $(DEFS) $(INCPATH) $(SRCDIR)\$** /Fo$(TARGETPATH)\$@ + +{$(SRCDIR)}.c{}.obj: + cl /c $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@ + +.c.obj: + @-mkdir $(TARGETPATH)\$(@D:/=\) 2> NUL + cl /c $(CFLAGS) $(DEFS) $(INCPATH) $(SRCDIR)\$** /Fo$(TARGETPATH)\$@ + +$(TARGET):: $(TARGETPATH) + +$(TARGET):: $(OBJS) + @cd $(TARGETPATH) + link /DLL $(LDFLAGS) $(LIBPATH) $(OBJS) $(LIBS) /out:$(@F) + @cd ..\.. + +############################################## +# remove build + +_clean_: + -del /q $(TARGETPATH)\*.* > nul + -rmdir /q $(TARGETPATH) > nul + +############################################## + +_install_: + @if not exist $(INSTPATH) mkdir $(INSTPATH) > nul + + copy $(TARGET) $(INSTPATH) > nul diff --git a/externals/grill/trunk/flext/buildsys/win/nmake-msvc-flext.inc b/externals/grill/trunk/flext/buildsys/win/nmake-msvc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..0ad644be25985d9f2553f6b426a79ab20da6542c --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/nmake-msvc-flext.inc @@ -0,0 +1,77 @@ +# build class specific settings + +!ifdef SHARED + +!ifdef SNDOBJ_LIB +LIBS=$(LIBS) $(SNDOBJ_LIB) +!endif + +!ifdef STK_LIB +LIBS=$(LIBS) $(STK_LIB) +!endif + +!endif + +############################################## + +# default target +_build_: $(TARGET) + +$(OUTPATH): + if not exist $@ mkdir $@ > nul + +$(TARGETPATH): $(OUTPATH) + if not exist $@ mkdir $@ > nul + +{$(SRCDIR)}.cpp{}.obj: + cl /c $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@ + +{$(SRCDIR)}.c{}.obj: + cl /c $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@ + + +$(TARGET):: $(TARGETPATH) + +$(TARGET):: $(OBJS) + @cd $(TARGETPATH) +!ifdef SHARED + link /DLL $(LDFLAGS) $(LIBPATH) $(OBJS) $(LIBS) /out:$(@F) +!else + lib /OUT:$(@F) $(OBJS) +!endif + @cd ..\.. + +############################################## + +# remove build +_clean_: + -del /q $(TARGETPATH)\*.* > nul + -rmdir /q $(TARGETPATH) > nul + +############################################## + +!ifdef SHARED +FLEXTLIBINST=$(FLEXTSHLIB) +!else +FLEXTLIBINST=$(FLEXTLIB) +!endif + +TMPFILE=$(TARGETPATH)\flext_install_filelist.tmp + +_install_: +# create folders +# -@if not exist $(FLEXTINC) mkdir $(FLEXTINC) > nul + -@if not exist $(FLEXTLIB) mkdir $(FLEXTLIB) > nul + -@if not exist $(FLEXTLIBINST) mkdir $(FLEXTLIBINST) > nul + + -copy $(TARGET) $(FLEXTLIBINST) > nul +!ifdef SHARED +# copy import library + -copy $(TARGET:.dll=.lib) $(FLEXTLIB) > nul +!endif +# copy headers (probably with subpath) + + -@del $(TMPFILE) 2>nul + -@for %%i in ($(HDRS)) do @echo %%i >> $(TMPFILE) + -@for /f "tokens=1,2 delims=/" %%i in ($(TMPFILE)) do @if "%%j" == "" ( copy $(SRCDIR)\%%i $(FLEXTINC) > nul ) else ( mkdir $(FLEXTINC)\%%i 2>nul & copy $(SRCDIR)\%%i\%%j $(FLEXTINC)\%%i > nul ) + -@del $(TMPFILE) 2>nul diff --git a/externals/grill/trunk/flext/buildsys/win/nmake-msvc-shlib.inc b/externals/grill/trunk/flext/buildsys/win/nmake-msvc-shlib.inc new file mode 100644 index 0000000000000000000000000000000000000000..0f188ba82d64c4f046166da8a2210566676249f3 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/nmake-msvc-shlib.inc @@ -0,0 +1,45 @@ +# build class specific settings + +INCPATH=$(INCPATH) /I$(FLEXTINC) +LIBPATH=$(LIBPATH) /LIBPATH:$(FLEXTLIB) +LIBS=$(LIBS) $(FLEXTNAME).lib + +############################################## + +# default target +_build_: $(TARGET) + +$(OUTPATH): + if not exist $@ mkdir $@ > nul + +$(TARGETPATH): $(OUTPATH) + if not exist $@ mkdir $@ > nul + +{$(SRCDIR)}.cpp{}.obj: + cl /c $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@ + +{$(SRCDIR)}.c{}.obj: + cl /c $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@ + +$(TARGET):: $(TARGETPATH) + +$(TARGET):: $(OBJS) + @cd $(TARGETPATH) + link /DLL $(LDFLAGS) $(LIBPATH) $(OBJS) $(LIBS) /OUT:$(@F) + @cd ..\.. + +############################################## +# remove build + +_clean_: + -del /q $(TARGETPATH)\*.* > nul + -rmdir /q $(TARGETPATH) > nul + +############################################## + +_install_: + @if not exist $(FLEXTSHLIB) mkdir $(FLEXTSHLIB) > nul + + copy $(TARGET) $(FLEXTSHLIB) > nul +# copy import library + copy $(TARGET:.dll=.lib) $(FLEXTSHLIB) > nul diff --git a/externals/grill/trunk/flext/buildsys/win/nmake-msvc.inc b/externals/grill/trunk/flext/buildsys/win/nmake-msvc.inc new file mode 100644 index 0000000000000000000000000000000000000000..d00f3a36d71f07033f7b2601e07a33db2db660be --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/nmake-msvc.inc @@ -0,0 +1,81 @@ +!ifdef MSVCPATH +INCPATH=$(INCPATH) /I$(MSVCPATH)\include +LIBPATH=$(LIBPATH) /LIBPATH:$(MSVCPATH)\lib +!endif + +!ifdef LOCKFREEPATH +INCPATH=$(INCPATH) /I$(LOCKFREEPATH) +!endif + +!ifdef SNDOBJ_INC +INCPATH=$(INCPATH) /I$(SNDOBJ_INC) +!endif + +!ifdef STK_INC +INCPATH=$(INCPATH) /I$(STK_INC) +!endif + +############################################## + +OBJPATH=$(OUTPATH)\$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT) + +############################################## +# use precompiled headers (automatic mode) + +!ifdef PRECOMPILE +CFLAGS=$(CFLAGS) /YX$(PRECOMPILE) /Fp$(OBJPATH)\precompiled.pch +!endif + +############################################## + +# create code for DLL +CFLAGS=$(CFLAGS) /LD + +# enable exception handling, RTTI and intrinsic functions +CFLAGS=$(CFLAGS) /EHsc /GR /Oi + +# no banner +CFLAGS=$(CFLAGS) /nologo +LDFLAGS=$(LDFLAGS) /nologo + +# inhibit VC8 warnings +CFLAGS=$(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE + +# default Windows flags as defined from VC IDE +CFLAGS=$(CFLAGS) /DWIN32 /D_WINDOWS + +############################################## + +!ifdef DEBUG + +!ifdef DYNAMIC +CFLAGS=$(CFLAGS) /MDd +LIBS=$(LIBS) MSVCPRTD.LIB MSVCRTD.LIB +!else +CFLAGS=$(CFLAGS) /MTd +LIBS=$(LIBS) LIBCPMTD.LIB LIBCMTD.LIB +!endif + +LDFLAGS=$(LDFLAGS) /DEBUG + +!else + +!ifdef DYNAMIC +CFLAGS=$(CFLAGS) /MD +LIBS=$(LIBS) MSVCPRT.LIB MSVCRT.LIB +!else +CFLAGS=$(CFLAGS) /MT +LIBS=$(LIBS) LIBCPMT.LIB LIBCMT.LIB +!endif + +LDFLAGS=$(LDFLAGS) /INCREMENTAL:NO + +!endif + +############################################## +# convert both *.c and *.cpp + +OBJSTMP= $(SRCS:.c=.obj) +OBJS= $(OBJSTMP:.objpp=.obj) diff --git a/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-ext.inc b/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..26bcf06ea90dcdd431462d54af7c88eb1598ebd1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-ext.inc @@ -0,0 +1 @@ +EXT=dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-flext.inc b/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..d30a71440a2c4d56d6b12f7a1ba6a92dfc4ea6b7 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-flext.inc @@ -0,0 +1,5 @@ +!ifdef SHARED +EXT=dll +!else +EXT=lib +!endif diff --git a/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-shlib.inc b/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-shlib.inc new file mode 100644 index 0000000000000000000000000000000000000000..26bcf06ea90dcdd431462d54af7c88eb1598ebd1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc-shlib.inc @@ -0,0 +1 @@ +EXT=dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc.inc b/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..9b65cc9128e7e0ff4d32068c209614cc8a4f13b5 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/bmake-bcc.inc @@ -0,0 +1,26 @@ +DEFS=$(DEFS) /DFLEXT_SYS=2 /DPD + +!ifdef WINNT +DEFS=$(DEFS) /D_WIN32_WINNT=0x500 +!endif + +############################################## +# let the pthreads path be first, because pthreads headers could also be a $(PDPATH)/src + +INCPATH=$(INCPATH) -I$(PTHREADSINC) +LIBPATH=$(LIBPATH) -L$(PTHREADSLIB) + +!ifdef THREADED +!if $(PTHREADSVERSION) == 2 +LIBS=$(LIBS) pthreadVC2.lib +!else +LIBS=$(LIBS) pthreadVC.lib +!endif +!endif + +############################################## + +INCPATH=$(INCPATH) -I$(PDPATH)\src -I$(PDPATH)\include -I$(PDPATH)\include\pd + +LIBS=$(LIBS) pd.lib + diff --git a/externals/grill/trunk/flext/buildsys/win/pd/config-bcc.def b/externals/grill/trunk/flext/buildsys/win/pd/config-bcc.def new file mode 100644 index 0000000000000000000000000000000000000000..85f0442c9f08b337bf6bfb8e4b9c19e567483648 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/config-bcc.def @@ -0,0 +1,49 @@ +# where is the PD installation? +# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder) +PDPATH="c:\program files\pd" + +# where is BorlandC++? +BCCPATH="c:\program files\bcc55" + +############################################################### + +# version of the pthreads library (the one coming with PD has version number 1) +PTHREADSVERSION=1 + +# path to pthreads headers (PD comes with some in the src folder) +PTHREADSINC=$(PDPATH)\src + +# path to pthreads link library (PD comes with one in the bin folder) +PTHREADSLIB=$(PDPATH)\bin + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(PDPATH)\flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(PDPATH)\bin + +############################################################### + +# where should the external be built? +OUTPATH=pd-bcc + +# where should the external be installed? +INSTPATH=$(PDPATH)\extra + +############################################################### + +# user defined compiler flags +# (check if they match your system!) +UFLAGS= + +# user defined optimization flags +# (check if they match your system!) +OFLAGS=-6 -O2 -OS -ff -d + +# comment if you want to compile for Windows 95/98/ME +WINNT=1 diff --git a/externals/grill/trunk/flext/buildsys/win/pd/config-cygwin.def b/externals/grill/trunk/flext/buildsys/win/pd/config-cygwin.def new file mode 100644 index 0000000000000000000000000000000000000000..0a763255d878973f01033edba7fa7f5416dfb201 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/config-cygwin.def @@ -0,0 +1,37 @@ +# where is the PD installation? +# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder) +PDPATH=/cygdrive/c/program files/pd + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(PDPATH)/flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(PDPATH)/bin + +############################################################### + +# where should the external be built? +OUTPATH=pd-cygwin + +# where should the external be installed? +INSTPATH=$(PDPATH)/extra + +############################################################### + +# make flags (e.g. use multiprocessor) +#MFLAGS=-j 2 + +# user defined compiler flags +# (check if they match your system!) +UFLAGS=-msse -mfpmath=sse -ffast-math + +# user defined optimization flags +# (check if they match your system!) +OFLAGS=-O3 +# optimizations for Pentium 4 +OFLAGS+=-march=pentium4 diff --git a/externals/grill/trunk/flext/buildsys/win/pd/config-gcc.def b/externals/grill/trunk/flext/buildsys/win/pd/config-gcc.def new file mode 100644 index 0000000000000000000000000000000000000000..c3d1460144a7ac74ffd451686d480f71de162226 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/config-gcc.def @@ -0,0 +1,75 @@ +# where is the PD installation including source code? +# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder) +PDPATH=/Applications/Pd-0.40-2.app/Contents/Resources + +# where is the PD executable? +PDBIN=$(PDPATH)/bin/pd + +############################################################### + +# prefix for flext installation +# headers are in $(FLEXTPREFIX)/include/flext +# libraries are in $(FLEXTPREFIX)/lib +# build system is in $(FLEXTPREFIX)/lib/flext + +FLEXTPREFIX=/usr/local + +############################################################### + +# where should the external be built? +OUTPATH=pd-darwin + +# where should the external be installed? +INSTPATH=$(PDPATH)/extra + +############################################################### + +# STK (synthesis tool kit) support +# http://ccrma.stanford.edu/software/stk + +# where to find the STK header files (e.g. stk.h) +STK_INC=/usr/local/include/stk + +# where to find the STK library (normally libstk.a) +# (comment out STK_LIB if you don't use STK) +#STK_LIB=/usr/local/lib/libstk.a + +############################################################### + +# SndObj support +# http://music.nuim.ie//musictec/SndObj + +# where to find the SndObj header files (e.g. sndobj.h) +SNDOBJ_INC=/usr/local/include/sndobj + +# where to find the SndObj library (normally libsndobj.a) +# (comment out STK_LIB if you don't use SndObj) +#SNDOBJ_LIB=/usr/local/lib/libsndobj.a + +############################################################### + +# make flags (e.g. use multiprocessor) +#MFLAGS=-j 2 + +# user defined compiler flags +UFLAGS += -ffast-math + +# user defined optimization flags +OFLAGS += -Os -ftree-vectorize + +# user defined debugging flags +DFLAGS += + +# architecture-specific flags (optional) +UFLAGS_ppc += -maltivec -faltivec +OFLAGS_ppc += -mtune=G4 +DFLAGS_ppc += + +UFLAGS_i386 += -mmmx -msse -msse2 -msse3 +OFLAGS_i386 += -mtune=prescott +DFLAGS_i386 += + +# cross-compilation (optional) +#ARCH=i386 ppc +#OSXSDK=/Developer/SDKs/MacOSX10.4u.sdk + diff --git a/externals/grill/trunk/flext/buildsys/win/pd/config-mingw.def b/externals/grill/trunk/flext/buildsys/win/pd/config-mingw.def new file mode 100644 index 0000000000000000000000000000000000000000..c5153ab42d2b413f73790ab5bfa1d69353962b51 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/config-mingw.def @@ -0,0 +1,51 @@ +# where is the PD installation? +# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder) +PDPATH="%ProgramFiles%\pd" + +############################################################### + +# version of the pthreads library (the one coming with PD has version number 1) +PTHREADSVERSION=1 + +# path to pthreads headers (PD comes with some in the src folder) +PTHREADSINC=$(PDPATH)\src + +# path to pthreads link library (PD comes with one in the bin folder) +PTHREADSLIB=$(PDPATH)\bin + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(PDPATH)\flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(PDPATH)\bin + +############################################################### + +# where should the external be built? +OUTPATH=pd-mingw + +# where should the external be installed? +INSTPATH=$(PDPATH)\extra + +############################################################### + +# make flags (e.g. use multiprocessor) +#MFLAGS=-j 2 + +# user defined compiler flags +# (check if they match your system!) +UFLAGS=-msse -mfpmath=sse -ffast-math + +# user defined optimization flags +# (check if they match your system!) +OFLAGS=-O3 +# optimizations for Pentium 4 +OFLAGS+=-march=pentium4 + +# comment if you want to compile for Windows 95/98/ME +WINNT=1 diff --git a/externals/grill/trunk/flext/buildsys/win/pd/config-msvc.def b/externals/grill/trunk/flext/buildsys/win/pd/config-msvc.def new file mode 100644 index 0000000000000000000000000000000000000000..97b2b06cc7acaa1b68150211e59ab49f36251881 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/config-msvc.def @@ -0,0 +1,97 @@ +# where is the PD installation? +# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder) +PDPATH="%ProgramFiles%\pd" + +# where is MS VC++? +# (not necessary if the build is run with the compiler environment) +# MSVCPATH="%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7" + +############################################################### + +# version of the pthreads library (the one coming with PD has version number 1) +PTHREADSVERSION=1 + +# path to pthreads headers (PD comes with some in the src folder) +PTHREADSINC=$(PDPATH)\src + +# path to pthreads link library (PD comes with one in the bin folder) +PTHREADSLIB=$(PDPATH)\bin + +############################################################### + +# path to lockfree library +LOCKFREEPATH=$(FLEXTINC)\source\lockfree + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(PDPATH)\flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(PDPATH)\bin + +############################################################### + +# where should the external be built? +# (relative one-level subpath to project folder) +OUTPATH=pd-msvc + +# where should externals be installed? +INSTPATH=$(PDPATH)\extra + +############################################################### + +# where is the STK installation? +# (uncomment the line with # to disable STK support) +# -------------------------------------------------------------------- +# In order to use STK you must have an stk.lib library +# Using MSVC you can build it as following (from the STK main folder): +# cl /c /GR /EHsc /Iinclude /MT /Ox src\*.cpp +# (in case you define DYNAMIC=1 below, omit the /MT flag and set /MD instead) +# (you will get errors for some files, you can ignore them in the flext context) +# lib *.obj /out:stk.lib +# + +# where to find the STK header files (e.g. stk.h) +#STK_INC=%HOMEDRIVE%\%HOMEPATH%\stk\include + +# where to find the STK library (normally stk.lib) +# (comment out STK_LIB if you don't use STK) +#STK_LIB=%HOMEDRIVE%\%HOMEPATH%\stk\stk.lib + +# where is the Sndobjs installation? +# (uncomment the line with # to disable SNDOBJ support) +# -------------------------------------------------------------------- +# Please be sure to delete an eventual m_pd.h file from the SNDOBJ include folder!! +# The shared flext library links to the SndObj.lib file from the SNDOBJ distribution. +# Flext must be compiled with the same compiler version as the SNDOBJ lib (default MSVC6) +# + +# where to find the SndObj header files (e.g. SndObj.h) +#SNDOBJ_INC=%HOMEDRIVE%\%HOMEPATH%\SndObj\include + +# where to find the SndObj library (normally SndObj.lib) +# (comment out SNDOBJ_LIB if you don't use SndObj) +#SNDOBJ_LIB=%HOMEDRIVE%\%HOMEPATH%\SndObj\lib\SndObj.lib + +############################################################### + +# user defined compiler flags +# (check if they match your system!) +UFLAGS= + +# user defined optimization flags +# (check if they match your system!) +OFLAGS=/Ox +# optimizations for Pentium 4 +OFLAGS=$(OFLAGS) /G6 /arch:SSE + +# comment if you want to compile for Windows 95/98/ME +WINNT=1 + +# uncomment to link against dynamic C runtime libraries +# (don't use this if you want to distribute the built product) +#DYNAMIC=1 diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-ext.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..26bcf06ea90dcdd431462d54af7c88eb1598ebd1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-ext.inc @@ -0,0 +1 @@ +EXT=dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-flext.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..e64eb6c50f39858a87da4ac7037fe53950e70613 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-flext.inc @@ -0,0 +1,5 @@ +ifdef SHARED +EXT=dll +else +EXT=a +endif diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-shlib.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-shlib.inc new file mode 100644 index 0000000000000000000000000000000000000000..26bcf06ea90dcdd431462d54af7c88eb1598ebd1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin-shlib.inc @@ -0,0 +1 @@ +EXT=dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin.inc new file mode 100644 index 0000000000000000000000000000000000000000..fbdd13449d186ab77dfedb02856c8bb0a5bcf48b --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-cygwin.inc @@ -0,0 +1,17 @@ +DEFS += -DFLEXT_SYS=2 -DPD + +INCPATH += -I$(PDPATH)/src -I$(PDPATH)/include -I$(PDPATH)/include/pd + +THR=0 +ifdef THREADED +THR=1 +endif +ifdef SHARED +THR=1 +endif + +ifeq ($(THR),1) +LIBS += $(PDPATH)/bin/pthreadVC.dll +endif + +SYSLIBS += $(PDPATH)/bin/pd.dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc-ext.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..ed66069198911caa9dc1cf0e9e7049cc720f7a37 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc-ext.inc @@ -0,0 +1,6 @@ +EXT=dll + +LDFLAGS += -shared + +TARGET=$(TARGETPATH)/$(TARGETNAME) +INSTTARGET=$(TARGET) diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc-flext.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..81d44b96ea1e900a89c0e109b3bb8414e3de9ceb --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc-flext.inc @@ -0,0 +1,11 @@ +ifdef SHARED +EXT=dll +else +EXT=a +endif + +LDFLAGS += -shared + +VERNAME=$(OUTNAME).$(FLEXTMAJOR).$(FLEXTMINOR).$(FLEXTMICRO).$(EXT) +TARGET=$(TARGETPATH)/$(VERNAME) +INSTTARGET=$(TARGET) diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc.inc new file mode 100644 index 0000000000000000000000000000000000000000..9385ec254c49f213bd6cf18e31b374ae3ca9effb --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-gcc.inc @@ -0,0 +1,38 @@ +DEFS += -DFLEXT_SYS=2 -DPD + +ifdef WINNT +DEFS += -D_WIN32_WINNT=0x500 +endif + +############################################## +# let the pthreads path be first, because pthreads headers could also be a $(PDPATH)/src + +INCPATH += -I$(PTHREADSINC) + +THR=0 +ifdef THREADED +THR=1 +endif +ifdef SHARED +THR=1 +endif + +ifeq ($(THR),1) +ifeq ($(PTHREADSVERSION),2) +LIBS += $(PTHREADSLIB)/pthreadVC2.dll +else +LIBS += $(PTHREADSLIB)/pthreadVC.dll +endif +endif + +############################################## + +INCPATH += -I$(PDPATH)/src -I$(PDPATH)/include -I$(PDPATH)/include/pd + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGETNAME=$(OUTNAME).$(EXT) + +LIBS += $(PDPATH)/bin/pd.dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-ext.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..26bcf06ea90dcdd431462d54af7c88eb1598ebd1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-ext.inc @@ -0,0 +1 @@ +EXT=dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-flext.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..e64eb6c50f39858a87da4ac7037fe53950e70613 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-flext.inc @@ -0,0 +1,5 @@ +ifdef SHARED +EXT=dll +else +EXT=a +endif diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-shlib.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-shlib.inc new file mode 100644 index 0000000000000000000000000000000000000000..26bcf06ea90dcdd431462d54af7c88eb1598ebd1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw-shlib.inc @@ -0,0 +1 @@ +EXT=dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw.inc b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw.inc new file mode 100644 index 0000000000000000000000000000000000000000..9f29564bd755dd54b64a5e21fbce03bb7c23460c --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/gnumake-mingw.inc @@ -0,0 +1,28 @@ +DEFS += -DFLEXT_SYS=2 -DPD + +ifdef WINNT +CFLAGS += -D_WIN32_WINNT=0x500 +endif + +############################################## +# let the pthreads path be first, because pthreads headers could also be a $(PDPATH)/src + +INCPATH += -I$(PTHREADSINC) +LIBPATH += -L$(PTHREADSLIB) + +ifdef THREADED +ifeq ($(PTHREADSVERSION),2) +LIBS += -lpthreadVC2 +else +LIBS += -lpthreadVC +endif +endif + +############################################## + +INCPATH += -I$(PDPATH)/src -I$(PDPATH)/include -I$(PDPATH)/include/pd + +LIBPATH += -L$(PDPATH)/bin + +LIBS += -lpd + diff --git a/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-ext.inc b/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-ext.inc new file mode 100644 index 0000000000000000000000000000000000000000..26bcf06ea90dcdd431462d54af7c88eb1598ebd1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-ext.inc @@ -0,0 +1 @@ +EXT=dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-flext.inc b/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-flext.inc new file mode 100644 index 0000000000000000000000000000000000000000..d30a71440a2c4d56d6b12f7a1ba6a92dfc4ea6b7 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-flext.inc @@ -0,0 +1,5 @@ +!ifdef SHARED +EXT=dll +!else +EXT=lib +!endif diff --git a/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-shlib.inc b/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-shlib.inc new file mode 100644 index 0000000000000000000000000000000000000000..26bcf06ea90dcdd431462d54af7c88eb1598ebd1 --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc-shlib.inc @@ -0,0 +1 @@ +EXT=dll diff --git a/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc.inc b/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc.inc new file mode 100644 index 0000000000000000000000000000000000000000..9834644250f4a1b50e986e30114a30261962fe9e --- /dev/null +++ b/externals/grill/trunk/flext/buildsys/win/pd/nmake-msvc.inc @@ -0,0 +1,27 @@ +DEFS=$(DEFS) /DFLEXT_SYS=2 /DPD + +!ifdef WINNT +DEFS=$(DEFS) /D_WIN32_WINNT=0x500 +!endif + +############################################## +# let the pthreads path be first, because pthreads headers could also be a $(PDPATH)/src + +INCPATH=$(INCPATH) /I$(PTHREADSINC) +LIBPATH=$(LIBPATH) /LIBPATH:$(PTHREADSLIB) + +!if defined(THREADED) | defined(SHARED) +!if $(PTHREADSVERSION) == 2 +LIBS=$(LIBS) pthreadVC2.lib +!else +LIBS=$(LIBS) pthreadVC.lib +!endif +!endif + +############################################## + +INCPATH=$(INCPATH) /I$(PDPATH)\src /I$(PDPATH)\include /I$(PDPATH)\include\pd + +LIBPATH=$(LIBPATH) /LIBPATH:$(PDPATH)\bin + +LIBS=$(LIBS) pd.lib diff --git a/externals/grill/trunk/flext/changes.txt b/externals/grill/trunk/flext/changes.txt new file mode 100644 index 0000000000000000000000000000000000000000..df740df88d3a2c8ecd6fb9c7ddd9467ce2fcba80 --- /dev/null +++ b/externals/grill/trunk/flext/changes.txt @@ -0,0 +1,366 @@ +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +---------------------------------------------------------------------------- + +Version history: + +0.6.0: +- FLEXT_INLINE allows use of <flext.h> without further libraries + +0.5.2: +- 64-bit arch fixes (Pd 0.42) +- STK API adaptations + +0.5.1: +- optimizations for message handling and memory footprint +- enhanced build system for cygwin +- added GetCanvasDir to retrieve folder in which the patcher resides +- better handling of click callback +- more compatible handling of attributes in patcher (hiding is now an option - define FLEXT_ATTRHIDE) +- added header file flfeatures.h for compile-time detection of version-specific features +- typed flext::NewAligned allocator +- fixed severe Altivec bug (load unaligned)... thanks to Ian Ollmann +- restructured initialization and finalization (esp. Max DSP stuff) +- real class names now also reflect debug mode (like in flext_base_shared_d) +- cleaned up internals (like Max/MSP typedefs) +- fixed coexistence of message and signal objects in Max/MSP object libraries +- fixes for pthreads version 2 +- deprecated FLEXT_NOGLOBALNEW in favor of FLEXT_USE_CMEM (either global new/delete operators or C library memory allocation) +- fixing uninitialized pointer (first inlet pointer) +- added message bundle functionality (to send more messages over the thread boundary to arrive at the same logical time) +- fixed dangerous spot (also memory leak) with message queuing +- fixed buggy freeing of memory for AtomListStatic +- optimizations around method registration +- preprocessor symbol FLEXT_COMPATIBLE - if defined don't implement specialities of either Pd or Max/MSP +- Max: fixed reported bug (#67), where list elements are distributed over inlets +- 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 +- should work with Mac/Intel (still untested!) +- added new FLEXT_HEADER macros to enable class templates +- more ToOut/Sys* methods +- fixed help name definition at class setup +- added gcc branch hinting +- Pd: possibility to create DSP classes without main DSP inlet (use e.g. FLEXT_DSP0_NEW) +- fixed atom sorting (symbols were sorted by pointer, not by content) +- updated build system to handle UB on OSX (including architecture-specific compiler flags) +- new idle callback/method functionality +- Max: fixed bug at destructing of proxy objects +- fixed message processing of empty lists +- fixed STK inlet processing + +0.5.0: +- fixes for 64 bit builds (size_t is integer type of pointer size) +- finally added a autoconf system (many many thanks to Tim Blechmann) +- more character escapes for attribute editor +- fixed the attribute editor for 0.38, stopped redundant transfer of script code +- show saveable attributes on object select +- fix for long attribute dialogs +- dropped support for Max UI objects +- added global system locking +- added general atom outlet functions To{Sys,Out,Queue}Atom +- new build system for flext and flext-based externals +- flags for object construction and destruction phase (Initing() and Exiting()) +- reconsidered flext::buffer::Update +- enhanced buffer handling +- support for buffer locking (flext::buffer::Lock() and Unlock()) - it's a must for Max/MSP at least +- use new Pd idle callback for queues messages (currently in devel_0_38) +- fixed bug with unregistering for bound symbols +- removed virtual m_assist function (which was only useful for Max)... stick to static assist strings +- removed virtual flext_dsp::m_enable function (which wasn't present for Max/MSP) +- added m_click method which gets called on alt-click (Pd) resp. double clicks (Max) onto the object box +- in ToOut check if we are inside dsp (and use ToQueue then...) +- some restructuring and use symbols (rather than char *) natively for AddMethod* and AddAttrib* functions +- added some more SIMD functionality +- fixes to flext::Timer::At method +- eliminated misleading flext_dsp::ChannelsIn and ChannelsOut +- added lock-free Lifo and Fifo structures and used it with message queueing and thread management +- eliminated default "help" (m_help) method... should be implemented in the flext-based object +- changed virtual callback names m_loadbang, m_method_, m_dsp, m_signal, m_click to CbLoadbang, CbMethodResort, CbDsp, CbSignal, CbClick +- replaced memory-intensive STL maps by custom-made vector/map-monster (should be fast!) +- fixed bug for symbol messages into non-left inlets +- better timers for Windows +- slimmed down object data structures and changed initialization code accordingly +- digest one-element float/int/symbol/pointer list messages as single atoms +- simplified message analysis +- made flext::Forward thread safe + +0.4.7: +- added flext::GetBool (just because flext::GetInt has been there for a while) +- added bool to usable types for creation arguments +- protection for SIMD routines with count=0 +- support exceptions for setup functions, object creation and destruction, method handling +- small fixes for MSVC6 incompatibilites +- fixes for Max 4.5 headers +- removed Mach-O/CFM glue stuff again and added makefiles for Max/MachO +- in flext::StopThread don't wait for thread to have stopped! +- support Pd tooltips (only in devel branch at the moment) +- attribute editor: added individual apply buttons +- attribute editor: added escaping for , and ; +- attribute editor: zoomed editor accepts , as newline separator +- attribute editor: close editor window on object destruction +- fixed $0-arguments in attribute saving +- introducing ring buffer for message queue (thanks to Tom Schouten) +- printing of atoms into buffer with better error checking + +0.4.6: +- added a text edit window for list attributes +- finally use global allocator operators (MFC doesn't like it but who cares) +- fixed entry of local variables with attribute editor +- help window for attribute editor +- appended lacking ~ for tilde object help patches +- uniform STL container for all kinds of attribute, method, class handling +- support for MinGW +- added flext_obj::CanvasArgs +- fixed small problem with buffer->Valid() on startup +- fixed buffer overrun problems with flext::post, flext::error... (but still to improve) +- improved handling of patcher arguments +- also initialize flext::sym_int as MakeSymbol("int") for Pd (since the variable is there anyhow) +- fixed bug with attribute dumping +- default arguments for object construction (types float0,int0,t_symtype0 for FLEXT_NEW*) +- added flext::sym__ for empty symbol "" + +0.4.5: +- added some more SIMD functions +- Pd attributes: added a TCL/TK editor dialog ("properties") and save attributes to patcher +- fixed wrong returned result of flext::buffer::set function +- fix for linux static exported function name-clash (individual linker namings for exported flext base classes) +- made message queue stuff global (static) for all flext objects +- added flext_base::DumpAttrib to send an attribute value to the attribute outlet +- added "getmethods" message (for attribute-enabled externals) to list methods for a specified inlet (default = 0) +- "getattributes" or "getmethods" output lists are now alphabethically sorted +- flext::StopThread function to terminate running threads (started with LaunchThread) +- 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()), 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 +- explicit boolean attributes (great for attribute editor layout!) +- flext_dsp reported wrong inlet/outlet count (CntInSig, CntOutSig functions) +- added support for patcher arguments for attributes (use # instead of $ to save them with a patch) +- moved memory functions and console output from flext to super-base-class flext_root and derived all helper classes from that +- changed FLEXT_THREAD_X: wrappers doesn't delete the passed data pointer anymore -> the called method is responsible for that (and it knows the type....) +- enabled binding of more than one function to a symbol and added flext_base::GetBoundMethod +- native support for Windows threading model + +0.4.4: +- fixed deadly bug for Max/MSP method-to-symbol-binding proxies +- some fixes for CodeWarrior Mach-O compilation +- fixed destruction bug for hashed "item arrays" +- added flext_base::ToSelf* methods for queued (deferred) self messaging +- deleted flext::buffer console outputs for undefined arrays/buffer~s: should be done by externals +- a few changes for the flext shared library +- tiny update for Pd 0.37 header file usage +- fixed a bug associated to attribute argument lists +- added functions for version number and string (flext::Version and flext::VerStr, mainly for usage of a shared flext library) +- flext_base::UnbindMethod returns user data +- fixed compilation problem with t_symbol-type attributes +- added methods for sending boolean values (ToOutBool, ToQueueBool, ToSelfBool) + +0.4.3: +- added forgotten flext_base::ToQueueString method +- added timer functions and flext::Timer class +- added functions for SIMD support +- fixed race condition when using LaunchThread in a setup function (now waiting for thread helper to initialize) +- added flext::Forward function to send messages to bound symbols +- added "zero" flag to flext::buffer resize operation +- fixed bug for Max/MSP buffer resize with preservation of contents +- fixed bug with thread initialization (caused Pd@OSX to crash on startup) +- flext::setup is only run once now +- fixed creation bug with objects that have attributes but no outlets +- added FLEXT_BINDMETHOD,FLEXT_UNBINDMETHOD to bind a method to a symbol +- fixed bug with hard thread termination (of incooperative threads) + +0.4.2: +- started port for jMax +- moved CLASS_MAINSIGNALIN to class scope (fixed "float method overwritten" warning) +- unix makefiles: CXX should be commented out if standard (to enable environmental settings) +- 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....) +- added CopySamples and ZeroSamples +- fixed bug for DSP object with zero signal inlets in Pd +- added validity check for sample buffers + +0.4.1: +- full port for Max@OSX +- completely redesigned message and attribute handling: now hashed and much more efficient +- greatly enhanced object creation and destruction (esp. for library objects) +- class setup functions now take t_classid type arg... this is BACKWARDS-INCOMPATIBLE for Max/MSP +- added some prerequisites for usage of flext as a shared library +- completed Max/MSPs inlet/outlet assist description functionality +- Max/MSP signal objects: fixed bug of reporting wrong number of inlets +- put overloaded new/delete into flext support class +- introduced "Finalize" virtual method, called after all "Init" methods +- fixed crash issue in flext_dsp when there are NO signal inlets or outlets defined + (this is possibly only a problem for the signal2 tutorial example) +- added flext::GetType(t_atom &), flext::ZeroMem +- put the clock_delay for the message queue inside the thread-locked area + Ok for the actual object, but Pd has to be thread-safe here as well +- BACKWARDS-INCOMPATIBLE CHANGE: flext_base::m_methodmain and flext_base::m_method_ have got + const modifiers.... these virtual methods are used rarely (except for example in py/pyext) +- now MUCH cleaner platform identification... FLEXT_SYS,FLEXT_OS,FLEXT_CPU definitions +- also FLEXT_DEBUG for debug build +- SndObjs: virtual FreeObject routine is now called at destruction (by parent class), derived class doesn't need to call it! +- SndObjs: fixed typo (numbers of output slots was wrong) and init bug +- STK: added support for STK object classes (flstk.{h,cpp}) +- introduced a helper thread for launching flext threads in the background +- threads are now handled on class (as opposed to object) level +- threads can now be terminated separately +- put more flext functions into flext static class +- replaced ChangePriority by RefPriority +- fixed setting of priorities... problems were caused by a compiler bug (MSVC 6) +- made a portable threading interface with support for threading libraries other than pthreads (FLEXT_THREADS defined as FLEXT_THR_*) +- implemented threading support with the MacOS MP thread library +- stripped the ThrMutex and ThrCond classes of non-portable (and irrelevant) functionality +- simplified "ToQueue*" and threaded "ToOut*" message queue mechanism for Max/MSP +- deprecated FLEXT_ADDMETHOD_V and FLEXT_ADDMETHOD_A definitions which only lead to confusion +- BACKWARDS-INCOMPATIBLE CHANGE: flext_sndobj::NewObjs must return a boolean!! + +0.4.0: +- the use of the const keyword is enforced (e.g. the preferred type for symbols is now "const t_symbol *") + - there _might_ be some problems with sensitive compilers +- introduced Max/Jitter-like attribute functionality ("@value" command line, "getvalue" get and "value" set functions) +- introduced a flext static class for general flext functions (to clean up the flext_base class) +- creation argument handling is now done by flext + no more weird Pd re-ordering of arguments +- no more support for the Apple MPW compiler - MacOS9 is dying anyway... +- calling SetupInOut() has become obsolete + - flext creates all inlets/outlets by itself after the constructor has finished + - this implies that CntIn(),CntOut() and the outlet pointers are not valid in the constructor + - there is a virtual bool Init() function that may be used for such initialization +- completely redesigned FLEXT_NEW macros, usage of dynamic classes (in fllib.cpp) +- added ToQueue* functions - like ToOut* but messages or not directly sent (well suited for deadlock situations) +- introduced additional per-class methods and attributes (just like it ever was in Max and Pd) +- fixed potentially dangerous typo in flext.cpp - (was: FLEXT_THREAD instead of FLEXT_THREADS) +- added OSX/darwin support (originally done by Adam T. Lindsay) +- SndObj interface now also available for cygwin and BCC +- added prepend and append functions to AtomList class +- added IsNothing, SetNothing, CanbeBool and GetABool functions +- eliminated the remaining Get*Flint and Set*Flint functions +- added/completed Is/Canbe/Get/Set for pointer atoms +- added print/scan functions for atoms +- fixed anything outlets for Max/MSP... for some strange reason this severe bug has not had severe consequences.... + +0.3.3: +- Pd: fixed bug for DSP objects having no signal inlets + this also enables floats into a non-signal leftmost inlet +- revisited priority stuff for detached threads +- Bind/unbind functions for flext classes (in MaxMSP only one object can be bound) +- made "t_symtype" another synonym for "t_symbol *" +- added forgotten dsp_free function for MaxMSP +- fixed forgotten __class__ member for MaxMSP libraries +- changed basic MaxMSP object to t_pxbox (ok, a bit more memory is used....) +- MaxMSP library can now be loaded from startup folder (but can't use aliases) +- if no handler is found for pure anything (just symbol, no args...) try list handler +- added interface for SndObj (http://www.may.ie/academic/music/musictec/SndObj/ ) + +0.3.2: +- Doxygen generated inline documentation / functional reference +- added some more functionality to the AtomAnything class +- bugfix for threaded methods with var list or anything arguments +- added threaded method for arbitrary (void *) data structs +- ThrMutex: added lock count functions Push() and Pop() +- eliminated potentially dangerous SetThing,GetThing and introduced DoBind,DoUnbind,GetBound instead +- fixed severe bug with the current threads list +- add path specification possibility for help symbols (in FLEXT_NEW*) +- use pthread_attr and DETACHED flag + +0.3.1: +- added some more functionality to the AtomList class +- fixed forgotten Sleep implementation in pd@unix +- reorganized file structure and config/make procedures + +0.3.0: +- added CYGWIN support + +- added threaded methods along with a message queue for ToOut* functions (very unstable for MaxMSP!) + to use threads compile flext with FLEXT_THREADS definition +- check/update function for buffer change (resize etc.) +- description text for inlets/outlets (e.g. for MaxMSPs assist function) - not fully implemented +- added buffer resize functions flext_base::buffer::Frames(int,bool) +- added some utility functions: Sleep, CopyAtom, CopyList +- added List manipulation classes: AtomList, AtomAnything +- Alias object names (simply specify with FLEXT_NEW*, separated by whitespace) +- float messages - int method is called if there is no float method +- MaxMSP: int messages - float method is called if there is no int method +- fixed type warning for class constructors with int arguments in Pd +- fixed severe bug concerning symbol methods +- MaxMSP: use critical sections for message output (for more safety in overdrive mode) +- Pd: default/manual definition of help file by flext_base::DefineHelp +- added GetThing/SetThing to access t_symbol's s_thing data member + +- introduced FLEXT_NEW_DSP* and FLEXT_LIB_DSP* for FLEXT_NEW_TILDE* and FLEXT_LIB_TILDE* (the latter become deprecated) +- all variable argument defs (aka gimme) now have a V instead of G (e.g. FLEXT_NEW_V) + +0.2.3: +- restructured files and started usable inline documentation +- found that there was no method to output a bang?! Ugh! -> corrected +- finally eliminated awful t_flint type and all other schizophrenic flint functions (float and int exist now equally) +- now (finally) using type t_sample for sample values (should just be identical to float) +- added AddInBang/AddOutBang (same as Add*Symbol - unchecked) +- buffer class: added "bool Ok()" check function +- switched on error posting for unhandled messages +- added XletCode and AddInlets/AddOutlets for multiple Inlet/Outlet addition (max. 9 inlets/outlets) +- if float or int message is not handled explicitly then [list float/int( is tried + +0.2.2: +- added xgimme argument type (supplies method handlers with symbol+gimme) +- more information on DSP system with flext_dsp object (block size,number of audio inputs and outputs) +- cleaner gcc makefile +- made NewAligned/FreeAligned static functions +- introduced FLEXT(_TILDE)_SETUP for class setup in a library setup function +- introduced external libraries for MaxMSP, changed library setup behavior (now via FLEXT_LIB_SETUP) +- included MaxMsp's inofficial buffer.h with consent by David Zicarelli +- changed dynamic casts in callback functions to static as gcc 3.0.4 has obvious bugs + +0.2.1: +- fixed bug in message parsing code (anything messages were not correctly mapped to inlets) +- changed t_symtype to t_symptr (= t_symbol *), needed for method argument lists +- eliminated flint type (t_flint remains) + +0.2.0: +- internal proxy objects for any non-leftmost inlets +- Max/MSP: all signal inlets can receive messages +- method/argument parsing is done by flext - float/int are not distinguished, the first handler wins +- integrated more system functions into flext_base & eliminated superfluous #defines +- distribute list (into inlet 0) elements over inlets (right to left) +- added outlets for anythings +- defines for callback-to-method functions and method setup (FLEXT_CALLBACK*, FLEXT_ADD*) +- uses Pd's or Max's memory allocation functions (for safety in Max's overdrive) +- no support for default arguments (A_DEFFLOAT and A_DEFSYMBOL).. use GIMME instead! +- better graphics update behavior for Pd +- improved behavior for invalid/undefined buffers/arrays +- use MaxMSP internal z_disabled flag with flext_dsp for pausing/resuming dsp processing +- included CHECK_TILDE, a test whether a tilde object (defined as FLEXT_TILDE_*) has a trailing ~. (debug mode only) +- changed notation of flext functions from to_out_float like to ToOutFloat like +- eliminated trivial shortcuts (F,I,V,...) for built-in types +- MaxMSP is only capable of 3 creation arguments... that should be sufficient - otherwise use GIMME +- Methods for aligned memory (NewAligned, FreeAligned) + +0.1.1: +- documentation for flext.h +- more emancipation from GEM code +- virtually everything renamed +- abstraction for dsp processing +- makefile for BCC +- manual call of extern_setup or main unnecessary for single objects - only in pd libraries +- delayed buffer init (only name is set beforehand) +- loadbang also in Pd +- introduced "compatibility mode" which denies platform-specific features +- fixed severe dsp bug (symptom: "float method overwritten" warning in pd) +- fixed bug: wrong return code from buffer::Set + +0.1.0: +- max-pd 0.2 becomes flext 0.1.0 +- heavy usage of unchanged GEM code + + + + diff --git a/externals/grill/trunk/flext/configure.ac b/externals/grill/trunk/flext/configure.ac new file mode 100644 index 0000000000000000000000000000000000000000..e26e315c74b7b9b6b2bf589fc335615e51f0cad8 --- /dev/null +++ b/externals/grill/trunk/flext/configure.ac @@ -0,0 +1,216 @@ +# +# autoconf template +# modified by Thomas Grill +# + +# flext API version (current:release:age) +# API_VERSION=0:0:0 + +AC_INIT([flext],[0.6.0],[gr@grrrr.org]) +AM_INIT_AUTOMAKE +AC_CONFIG_MACRO_DIRS([m4]) + +# TODO: this should definitely be changed to work with any version of CYGWIN_NT or MINGW32_NT +if ( test $(uname -s) == CYGWIN_NT-5.0 ) || ( test $(uname -s) == CYGWIN_NT-5.1 ) || ( test $(uname -s) == MINGW32_NT-5.1 ); then + set win = 1 +fi + +# configure options +AC_ARG_ENABLE(system, + AC_HELP_STRING(--enable-system,[realtime system [default=pd]]), + [SYSTEM=$enableval], + [SYSTEM=pd] +) + +AC_ARG_WITH(sdkdir, + AC_HELP_STRING(--with-sdkdir,[path to pd or max headers]), + [sdkdir=$withval], + AC_MSG_ERROR(path to system SDK headers required $withval) +) + +AC_ARG_WITH(pdbindir, + AC_HELP_STRING(--with-pdbindir,[path to pd bin dir]), + [ + if test $win; then +# LATER: shouldn't we use AC_CHECK_LIB([pd]) ? + AC_CHECK_FILE([$withval/pd.dll],,AC_MSG_ERROR([Cannot find $withval/pd.dll])) + fi + LIBDIRS="$LIBDIRS $withval" + ], + [ + if test $win; then + AC_MSG_ERROR(path to pd bin dir required) + fi + ] +) + +if test $SYSTEM == max; then + AC_DEFINE(FLEXT_SYS,1) +# check for MaxAPI.h in pd folder + AC_CHECK_FILE([$sdkdir/max-includes/MaxAPI.h],,AC_MSG_ERROR([Cannot find $sdkdir/max-includes/MaxAPI.h])) + AC_CHECK_FILE([$sdkdir/max-includes/MaxAudioAPI.h],,AC_MSG_ERROR([Cannot find $sdkdir/max-includes/MaxAudioAPI.h])) + INCLUDEDIRS="$INCLUDEDIRS $sdkdir/max-includes $sdkdir/msp-includes" + +elif test $SYSTEM == pd; then +# if test $win; then +# fi + + AC_DEFINE(FLEXT_SYS,2) +# check for g_canvas.h in pd folder + AC_CHECK_FILE([$sdkdir/g_canvas.h],,AC_MSG_ERROR([Cannot find $sdkdir/g_canvas.h])) + INCLUDEDIRS="$INCLUDEDIRS $sdkdir" + + if test $win; then + libs="$libs pd" + AC_DEFINE(NT) + fi +else + AC_MSG_ERROR([system must be pd or max]) +fi + +AC_ARG_WITH(atomic_ops, + AC_HELP_STRING(--with-atomic_ops,[path to atomic_ops library (needed for gcc version < 4.1 on non-i386 cpus)]), + [ + AC_CHECK_FILE([$withval/atomic_ops.h],,AC_MSG_ERROR([Cannot find $withval/atomic_ops.h])) + INCLUDEDIRS="$INCLUDEDIRS $withval" + AC_DEFINE(USE_ATOMIC_OPS) + ] +) + +AC_ARG_WITH(stkdir, + AC_HELP_STRING(--with-stk,[path to STK headers]), + [ + AC_CHECK_FILE([$withval/Stk.h],,AC_MSG_ERROR([Cannot find $withval/Stk.h])) + stkdir=$withval + INCLUDEDIRS="$INCLUDEDIRS $withval" + ] +) + +AM_CONDITIONAL([STK],[test "$stkdir"]) + +AC_ARG_WITH(sndobjdir, + AC_HELP_STRING(--with-sndobj,[path to SndObj headers]), + [ + AC_CHECK_FILE([$withval/SndObj.h],,AC_MSG_ERROR([Cannot find $withval/SndObj.h])) + sndobjdir=$withval + INCLUDEDIRS="$INCLDUEDIRS $withval" + ] +) + +AM_CONDITIONAL([SNDOBJ],[test "$sndobjdir"]) + +# if CFLAGS aren't set by the user, set them to an empty string +# otherwise AC_PROG_CC sets them to "-O2 -g" +test ".$CFLAGS" = "." && CFLAGS=" " +test ".$CXXFLAGS" = "." && CXXFLAGS=" " + +# needed for libtool to build win32 dlls +AC_LIBTOOL_WIN32_DLL + +AM_ENABLE_STATIC +AM_ENABLE_SHARED + +# Checks for programs. +AC_PROG_CC +AC_PROG_CXX +AC_PROG_LIBTOOL +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +AC_LANG(C++) + +# Checks for libraries. + +# Checks for header files. + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_STRUCT_TM + +# Checks for library functions. + +# system specific +if test $(uname -s) == Linux; then + true +elif test $(uname -s) == Darwin; then + FRAMEWORKS="$FRAMEWORKS ApplicationServices Accelerate" + LD_FLAGS="$LD_FLAGS -flat_namespace -undefined dynamic_lookup" +elif test $win; then + C_FLAGS="$C_FLAGS -mms-bitfields -mno-cygwin" + LD_FLAGS="$LD_FLAGS -mno-cygwin" +fi + + +# set compilation flags + +OPT_FLAGS="$C_FLAGS -O2" +DBG_FLAGS="$C_FLAGS -DFLEXT_DEBUG -g" + +AC_ARG_ENABLE(optimize, + AC_HELP_STRING(--enable-optimize,[enables optimized architecture specific builds for pentium4, pentium3, G4, G5, etc.]), + [ + # tune to a specific CPU + OPT_FLAGS="$OPT_FLAGS -mtune=$enableval" + case $enableval in + pentium | pentium2 | athlon | pentium-mmx) + OPT_FLAGS="$OPT_FLAGS -march=$enableval";; + pentium3 | pentium3m | pentium4 | pentium4m | pentium-m | prescott | nocona | athlon-xp | athlon-mp | athlon64 | opteron) + OPT_FLAGS="$OPT_FLAGS -march=$enableval -mfpmath=sse"; + AC_DEFINE(FLEXT_USE_SIMD);; + G3) + # set specific architecture (like march) + OPT_FLAGS="$OPT_FLAGS -mcpu=$enableval";; + G5 | G4) + # set specific architecture (like march) + OPT_FLAGS="$OPT_FLAGS -mcpu=$enableval -faltivec"; + AC_DEFINE(FLEXT_USE_SIMD);; + *) + ;; + esac + ] +) + + +AC_SUBST(SYSTEM) +AC_SUBST(INCLUDEDIRS) +AC_SUBST(LIBDIRS) +AC_SUBST(OPT_FLAGS) +AC_SUBST(DBG_FLAGS) +AC_SUBST(LD_FLAGS) +# AC_SUBST(API_VERSION) +AC_SUBST(libs) +AC_SUBST(stkdir) +AC_SUBST(sndobjdir) +AC_SUBST(FRAMEWORKS) + +AC_OUTPUT([ + Makefile + source/Makefile + $SYSTEM-flext.pc +]) + +# tutorial/Makefile +# tutorial/adv1/Makefile +# tutorial/adv2/Makefile +# tutorial/adv3/Makefile +# tutorial/attr1/Makefile +# tutorial/attr2/Makefile +# tutorial/attr3/Makefile +# tutorial/bind1/Makefile +# tutorial/buffer1/Makefile +# tutorial/lib1/Makefile +# tutorial/signal1/Makefile +# tutorial/signal2/Makefile +# tutorial/simple1/Makefile +# tutorial/simple2/Makefile +# tutorial/simple3/Makefile +# tutorial/sndobj1/Makefile +# tutorial/stk1/Makefile +# tutorial/stk2/Makefile +# tutorial/thread1/Makefile +# tutorial/thread2/Makefile +# tutorial/timer1/Makefile +# tutorial/pd/Makefile +# tutorial/maxmsp/Makefile diff --git a/externals/grill/trunk/flext/examples/examples.dsw b/externals/grill/trunk/flext/examples/examples.dsw new file mode 100644 index 0000000000000000000000000000000000000000..6f52bde297da049092ee8f56ab0ac5a797af6a3b --- /dev/null +++ b/externals/grill/trunk/flext/examples/examples.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! + +############################################################################### + +Project: "henon"=.\source\henon.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + max/flext/examples/source + .\source + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/externals/grill/trunk/flext/examples/max/ex-myext.mxb b/externals/grill/trunk/flext/examples/max/ex-myext.mxb new file mode 100644 index 0000000000000000000000000000000000000000..4660da1fafdfa6cb635260641c0ce64652ea612e Binary files /dev/null and b/externals/grill/trunk/flext/examples/max/ex-myext.mxb differ diff --git a/externals/grill/trunk/flext/examples/pd/ex-henon.pd b/externals/grill/trunk/flext/examples/pd/ex-henon.pd new file mode 100644 index 0000000000000000000000000000000000000000..a70ec540011935aef34dc1bddbd4cd2a86750094 --- /dev/null +++ b/externals/grill/trunk/flext/examples/pd/ex-henon.pd @@ -0,0 +1,87 @@ +#N canvas 412 48 465 467 12; +#X obj 18 43 bng 25 250 50 0 empty empty reset 0 -10 0 14 -261689 -1 +-1; +#X obj 99 44 bng 25 250 50 0 empty empty trigger 0 -10 0 14 -261689 +-1 -1; +#X obj 206 43 nbx 4 18 0 1 0 1 empty empty pre-alpha 0 -10 0 14 -225271 +-1 -1 0.75 256; +#X obj 322 44 nbx 4 18 0 1 0 1 empty empty pre-beta 0 -10 0 14 -225271 +-1 -1 0.41 256; +#X obj 60 264 nbx 5 18 -1e+037 1e+037 0 0 empty empty result 0 -10 +0 14 -228992 -1 -1 0 256; +#N canvas 0 0 458 522 henon 0; +#X text 115 130 x; +#X text 190 129 y; +#X obj 157 166 *; +#X obj 47 158 t f f; +#X obj 48 189 *; +#X obj 77 215 *; +#X obj 130 248 +; +#X obj 113 281 + 1; +#X obj 85 131 f 0; +#X obj 158 130 f 0; +#X obj 33 23 inlet; +#X obj 263 27 inlet; +#X obj 368 28 inlet; +#X text 264 7 alpha; +#X text 373 7 beta; +#X text 28 5 commands; +#X obj 31 50 route reset bang; +#X obj 112 445 outlet; +#X obj 100 86 t b b; +#X obj 31 76 t 0; +#X obj 241 55 * 1.5; +#X obj 241 80 - 2.5; +#X obj 361 55 - 0.5; +#X obj 114 342 + 1; +#X obj 114 369 / 2; +#X obj 113 394 max 0; +#X obj 113 418 min 1; +#X connect 2 0 6 1; +#X connect 3 0 4 0; +#X connect 3 1 4 1; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 8 1; +#X connect 7 0 23 0; +#X connect 8 0 3 0; +#X connect 8 0 9 1; +#X connect 9 0 2 0; +#X connect 10 0 16 0; +#X connect 11 0 20 0; +#X connect 12 0 22 0; +#X connect 16 0 19 0; +#X connect 16 1 18 0; +#X connect 18 0 8 0; +#X connect 18 1 9 0; +#X connect 19 0 8 1; +#X connect 19 0 9 1; +#X connect 20 0 21 0; +#X connect 21 0 5 1; +#X connect 22 0 2 1; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 26 0 17 0; +#X restore 60 208 pd henon; +#X msg 18 77 reset; +#X obj 294 201 henon; +#X obj 292 259 nbx 5 18 -1e+037 1e+037 0 0 empty empty result 0 -10 +0 14 -228992 -1 -1 0 256; +#X text 17 331 alpha and beta can also be initialized; +#X text 18 350 at creation time; +#X obj 45 426 henon @alpha 0.7 @beta 0.2; +#X text 15 403 or \, using attributes; +#X obj 45 377 henon 0.7 0.2; +#X connect 0 0 6 0; +#X connect 1 0 5 0; +#X connect 1 0 7 0; +#X connect 2 0 7 1; +#X connect 2 0 5 1; +#X connect 3 0 7 2; +#X connect 3 0 5 2; +#X connect 5 0 4 0; +#X connect 6 0 5 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; diff --git a/externals/grill/trunk/flext/examples/pd/ex-myext.pd b/externals/grill/trunk/flext/examples/pd/ex-myext.pd new file mode 100644 index 0000000000000000000000000000000000000000..ff6ff7bc6af9046562e58429ed0f1037ce9d8678 --- /dev/null +++ b/externals/grill/trunk/flext/examples/pd/ex-myext.pd @@ -0,0 +1,5 @@ +#N canvas 412 48 154 165 12; +#X obj 38 37 bng 25 250 50 0 empty empty empty 0 -10 0 14 -261689 -1 +-1; +#X obj 38 84 myext; +#X connect 0 0 1 0; diff --git a/externals/grill/trunk/flext/examples/source/henon.cpp b/externals/grill/trunk/flext/examples/source/henon.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e48b9555e6e23a2b6f2274acc5a8af3796abb8d5 --- /dev/null +++ b/externals/grill/trunk/flext/examples/source/henon.cpp @@ -0,0 +1,122 @@ +/* +flext examples - henon + +Copyright (c) 2003 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. + +------------------------------------------------------------------------- + +This is a simple external featuring the chaotic Henon attractor. + +See also http://improv.sapp.org/doc/examples/synthImprov/henontune/henontune.html +Thanks to David Casal for the pointer! + +*/ + +// IMPORTANT: enable attribute processing (specify before inclusion of flext headers!) +// For clarity, this is done here, but you'd better specify it as a compiler definition +// FLEXT_ATTRIBUTES must be 0 or 1, +#define FLEXT_ATTRIBUTES 1 + + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 +#endif + + +class henon: + public flext_base +{ + FLEXT_HEADER_S(henon,flext_base,Setup) + +public: + // constructor + henon(int argc,const t_atom *argv); + +protected: + void m_bang(); + void m_reset() { x = y = 0; } + + void m_alpha(float a) { alpha = a; } + void m_beta(float b) { beta = b; } + + float alpha,beta; + float x,y; + +private: + static void Setup(t_classid c); + + // method callbacks + FLEXT_CALLBACK(m_reset) + FLEXT_CALLBACK(m_bang) + FLEXT_CALLBACK_F(m_alpha) + FLEXT_CALLBACK_F(m_beta) + + // define attribute callbacks for variables alpha and beta (with GET and SET properties) + FLEXT_ATTRVAR_F(alpha) + FLEXT_ATTRVAR_F(beta) +}; + +// instantiate the class +FLEXT_NEW_V("henon",henon) + + +henon::henon(int argc,const t_atom *argv): + alpha(0),beta(0),x(0),y(0) // initializations +{ + // define inlets + AddInAnything("reset,bang,..."); + AddInFloat("alpha"); + AddInFloat("beta"); + + // define outlets + AddOutFloat(); + + // processing command line + if(argc == 2 && CanbeFloat(argv[0]) && CanbeFloat(argv[1])) { + // two float args + alpha = GetAFloat(argv[0]); + beta = GetAFloat(argv[1]); + } +} + +void henon::Setup(t_classid c) +{ + // register methods + FLEXT_CADDBANG(c,0,m_bang); + FLEXT_CADDMETHOD_(c,0,"reset",m_reset); + + // methods for non-left inlets + FLEXT_CADDMETHOD(c,1,m_alpha); + FLEXT_CADDMETHOD(c,2,m_beta); + + // register attributes + FLEXT_CADDATTR_VAR1(c,"alpha",alpha); // register attribute "alpha" + FLEXT_CADDATTR_VAR1(c,"beta",beta); // register attribute "beta" +} + +// Trigger output +void henon::m_bang() +{ + float _alpha_ = alpha*1.5f-2.5f; + float _beta_ = beta-0.5f; + + float newx = 1 + _alpha_ * x * x + _beta_ * y; + float newy = x; + x = newx; + y = newy; + + float output = (x + 1.0f)/2.0f; + if(output < 0) + output = 0; + else if(output > 1) + output = 1; + + // output value to outlet + ToOutFloat(0,output); // (0 stands for the outlet index 0) +} diff --git a/externals/grill/trunk/flext/examples/source/henon.cw b/externals/grill/trunk/flext/examples/source/henon.cw new file mode 100644 index 0000000000000000000000000000000000000000..cf8809384aadc4f605fa5043b917b912b862fc8b Binary files /dev/null and b/externals/grill/trunk/flext/examples/source/henon.cw differ diff --git a/externals/grill/trunk/flext/examples/source/henon.dsp b/externals/grill/trunk/flext/examples/source/henon.dsp new file mode 100644 index 0000000000000000000000000000000000000000..24cbdfcf7a605f4db67befad565d9c182e3238c1 --- /dev/null +++ b/externals/grill/trunk/flext/examples/source/henon.dsp @@ -0,0 +1,95 @@ +# Microsoft Developer Studio Project File - Name="henon" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=henon - Win32 Debug +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "henon.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "henon.mak" CFG="henon - Win32 Debug" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "henon - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "henon - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "henon" +# PROP Scc_LocalPath "." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "henon - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "msvc" +# PROP Intermediate_Dir "msvc" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c +# ADD CPP /nologo /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc07 /d "NDEBUG" +# ADD RSC /l 0xc07 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/henon.dll" /libpath:"..\..\pd-msvc" + +!ELSEIF "$(CFG)" == "henon - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "msvc-debug" +# PROP Intermediate_Dir "msvc-debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc07 /d "_DEBUG" +# ADD RSC /l 0xc07 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib pd.lib flext_d-pdwin.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\pd-msvc" + +!ENDIF + +# Begin Target + +# Name "henon - Win32 Release" +# Name "henon - Win32 Debug" +# Begin Source File + +SOURCE=.\henon.cpp +# End Source File +# End Target +# End Project diff --git a/externals/grill/trunk/flext/examples/vs2010-template/main.cpp b/externals/grill/trunk/flext/examples/vs2010-template/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5162435d7daa59b7119e6bcee86dc9e678cbc6a3 --- /dev/null +++ b/externals/grill/trunk/flext/examples/vs2010-template/main.cpp @@ -0,0 +1,40 @@ +#include <flext.h> + +class myext + : public flext_base +{ + FLEXT_HEADER_S(myext,flext_base,setup); + +public: + myext(int argc,t_atom *argv) + { + post("creating myext object"); + + // initialization stuff... + } + + ~myext() + { + post("destroying myext object"); + + // destruction stuff... + } + +protected: + static void setup(t_classid c) + { + post("setting up myext class"); + + // add methods here... + FLEXT_CADDBANG(c,0,m_bang); + } + + void m_bang() + { + post("BANG!"); + } + + FLEXT_CALLBACK(m_bang) +}; + +FLEXT_NEW_V("myext",myext) diff --git a/externals/grill/trunk/flext/examples/vs2010-template/myext.sln b/externals/grill/trunk/flext/examples/vs2010-template/myext.sln new file mode 100644 index 0000000000000000000000000000000000000000..cdc19ee5962ec9bd523e0eaa6b5d34f9b4f29a97 --- /dev/null +++ b/externals/grill/trunk/flext/examples/vs2010-template/myext.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myext", "myext.vcxproj", "{C9B4070E-05E1-3111-1BF3-2A08D7054375}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Max Debug|Win32 = Max Debug|Win32 + Max Release|Win32 = Max Release|Win32 + PD Debug|Win32 = PD Debug|Win32 + PD Release|Win32 = PD Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C9B4070E-05E1-3111-1BF3-2A08D7054375}.Max Debug|Win32.ActiveCfg = Max Debug|Win32 + {C9B4070E-05E1-3111-1BF3-2A08D7054375}.Max Debug|Win32.Build.0 = Max Debug|Win32 + {C9B4070E-05E1-3111-1BF3-2A08D7054375}.Max Release|Win32.ActiveCfg = Max Release|Win32 + {C9B4070E-05E1-3111-1BF3-2A08D7054375}.Max Release|Win32.Build.0 = Max Release|Win32 + {C9B4070E-05E1-3111-1BF3-2A08D7054375}.PD Debug|Win32.ActiveCfg = PD Debug|Win32 + {C9B4070E-05E1-3111-1BF3-2A08D7054375}.PD Debug|Win32.Build.0 = PD Debug|Win32 + {C9B4070E-05E1-3111-1BF3-2A08D7054375}.PD Release|Win32.ActiveCfg = PD Release|Win32 + {C9B4070E-05E1-3111-1BF3-2A08D7054375}.PD Release|Win32.Build.0 = PD Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/externals/grill/trunk/flext/examples/vs2010-template/myext.vcxproj b/externals/grill/trunk/flext/examples/vs2010-template/myext.vcxproj new file mode 100644 index 0000000000000000000000000000000000000000..78ce0d67b5d5253b9e0ff998ae9f919172741221 --- /dev/null +++ b/externals/grill/trunk/flext/examples/vs2010-template/myext.vcxproj @@ -0,0 +1,268 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Max Debug|Win32"> + <Configuration>Max Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Max Release|Win32"> + <Configuration>Max Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Debug|Win32"> + <Configuration>PD Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Release|Win32"> + <Configuration>PD Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <SccProjectName> + </SccProjectName> + <SccLocalPath> + </SccLocalPath> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\flext_settings_VS.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'"> + <OutDir>.\pd-msvc\s\</OutDir> + <IntDir>.\pd-msvc\s\</IntDir> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'"> + <OutDir>.\max-msvc\s\</OutDir> + <IntDir>.\max-msvc\s\</IntDir> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'"> + <OutDir>.\pd-msvc\sd\</OutDir> + <IntDir>.\pd-msvc\sd\</IntDir> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'"> + <OutDir>.\max-msvc\sd\</OutDir> + <IntDir>.\max-msvc\sd\</IntDir> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'"> + <ClCompile> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <StringPooling>true</StringPooling> + <FunctionLevelLinking>true</FunctionLevelLinking> + <Optimization>Full</Optimization> + <SuppressStartupBanner>true</SuppressStartupBanner> + <WarningLevel>Level3</WarningLevel> + <AdditionalIncludeDirectories>$(FLEXTPATH)\source;$(PDPATH)\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_WIN32_WINNT=0x501;_USRDLL;FLEXT_SYS=2;FLEXT_USE_SIMD;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AssemblerListingLocation>.\pd-msvc\s\</AssemblerListingLocation> + <PrecompiledHeaderOutputFile>.\pd-msvc\s\$(TargetName).pch</PrecompiledHeaderOutputFile> + <ObjectFileName>.\pd-msvc\s\</ObjectFileName> + <ProgramDataBaseFileName>.\pd-msvc\s\</ProgramDataBaseFileName> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + </ClCompile> + <Midl> + <SuppressStartupBanner>true</SuppressStartupBanner> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <TypeLibraryName>.\msvc\henon.tlb</TypeLibraryName> + <MkTypLibCompatible>true</MkTypLibCompatible> + <TargetEnvironment>Win32</TargetEnvironment> + </Midl> + <ResourceCompile> + <Culture>0x0c07</Culture> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Bscmake> + <SuppressStartupBanner>true</SuppressStartupBanner> + <OutputFile>.\pd-msvc\s\$(TargetName).bsc</OutputFile> + </Bscmake> + <Link> + <SuppressStartupBanner>true</SuppressStartupBanner> + <LinkDLL>true</LinkDLL> + <SubSystem>Console</SubSystem> + <OutputFile>.\pd-msvc\s\$(TargetName).dll</OutputFile> + <ImportLibrary>.\pd-msvc\s\$(TargetName).lib</ImportLibrary> + <AdditionalLibraryDirectories>$(PDPATH)\bin;$(FLEXTPATH)\pd-msvc;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>pd.lib;flext-pd_s.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'"> + <ClCompile> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <StringPooling>true</StringPooling> + <FunctionLevelLinking>true</FunctionLevelLinking> + <Optimization>Full</Optimization> + <SuppressStartupBanner>true</SuppressStartupBanner> + <WarningLevel>Level3</WarningLevel> + <AdditionalIncludeDirectories>$(FLEXTPATH)\source;$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_WIN32_WINNT=0x501;_USRDLL;FLEXT_SYS=1;FLEXT_USE_SIMD;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AssemblerListingLocation>.\max-msvc\s\</AssemblerListingLocation> + <PrecompiledHeaderOutputFile>.\max-msvc\s\$(TargetName).pch</PrecompiledHeaderOutputFile> + <ObjectFileName>.\max-msvc\s\</ObjectFileName> + <ProgramDataBaseFileName>.\max-msvc\s\</ProgramDataBaseFileName> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + </ClCompile> + <Midl> + <SuppressStartupBanner>true</SuppressStartupBanner> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <TypeLibraryName>.\msvc\henon.tlb</TypeLibraryName> + <MkTypLibCompatible>true</MkTypLibCompatible> + <TargetEnvironment>Win32</TargetEnvironment> + </Midl> + <ResourceCompile> + <Culture>0x0c07</Culture> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Bscmake> + <SuppressStartupBanner>true</SuppressStartupBanner> + <OutputFile>.\max-msvc\s\$(TargetName).bsc</OutputFile> + </Bscmake> + <Link> + <SuppressStartupBanner>true</SuppressStartupBanner> + <LinkDLL>true</LinkDLL> + <SubSystem>Console</SubSystem> + <OutputFile>.\max-msvc\s\$(TargetName).mxe</OutputFile> + <ImportLibrary>.\max-msvc\s\$(TargetName).lib</ImportLibrary> + <AdditionalLibraryDirectories>$(FLEXTPATH)\max-msvc;$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>flext-max_s.lib;maxapi.lib;maxaudio.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'"> + <ClCompile> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <InlineFunctionExpansion>Default</InlineFunctionExpansion> + <FunctionLevelLinking>false</FunctionLevelLinking> + <Optimization>Disabled</Optimization> + <SuppressStartupBanner>true</SuppressStartupBanner> + <WarningLevel>Level3</WarningLevel> + <MinimalRebuild>true</MinimalRebuild> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <AdditionalIncludeDirectories>$(FLEXTPATH)\source;$(PDPATH)\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_USRDLL;FLEXT_SYS=2;FLEXT_USE_SIMD;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AssemblerListingLocation>.\pd-msvc\sd\</AssemblerListingLocation> + <BrowseInformation>true</BrowseInformation> + <PrecompiledHeaderOutputFile>.\pd-msvc\sd\$(TargetName).pch</PrecompiledHeaderOutputFile> + <ObjectFileName>.\pd-msvc\sd\</ObjectFileName> + <ProgramDataBaseFileName>.\pd-msvc\sd\</ProgramDataBaseFileName> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + </ClCompile> + <Midl> + <SuppressStartupBanner>true</SuppressStartupBanner> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <TypeLibraryName>.\msvc-debug\henon.tlb</TypeLibraryName> + <MkTypLibCompatible>true</MkTypLibCompatible> + <TargetEnvironment>Win32</TargetEnvironment> + </Midl> + <ResourceCompile> + <Culture>0x0c07</Culture> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Bscmake> + <SuppressStartupBanner>true</SuppressStartupBanner> + <OutputFile>.\pd-msvc\sd\$(TargetName).bsc</OutputFile> + </Bscmake> + <Link> + <SuppressStartupBanner>true</SuppressStartupBanner> + <LinkDLL>true</LinkDLL> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OutputFile>.\pd-msvc\sd\$(TargetName).dll</OutputFile> + <ImportLibrary>.\pd-msvc\sd\$(TargetName).lib</ImportLibrary> + <AdditionalLibraryDirectories>$(PDPATH)\bin;$(FLEXTPATH)\pd-msvc;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>pd.lib;flext-pd_sd.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'"> + <ClCompile> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <InlineFunctionExpansion>Default</InlineFunctionExpansion> + <FunctionLevelLinking>false</FunctionLevelLinking> + <Optimization>Disabled</Optimization> + <SuppressStartupBanner>true</SuppressStartupBanner> + <WarningLevel>Level3</WarningLevel> + <MinimalRebuild>true</MinimalRebuild> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <AdditionalIncludeDirectories>$(FLEXTPATH)\source;$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_WIN32_WINNT=0x501;_USRDLL;FLEXT_SYS=1;FLEXT_USE_SIMD;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AssemblerListingLocation>.\max-msvc\sd\</AssemblerListingLocation> + <BrowseInformation>true</BrowseInformation> + <PrecompiledHeaderOutputFile>.\max-msvc\sd\$(TargetName).pch</PrecompiledHeaderOutputFile> + <ObjectFileName>.\max-msvc\sd\</ObjectFileName> + <ProgramDataBaseFileName>.\max-msvc\sd\</ProgramDataBaseFileName> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + </ClCompile> + <Midl> + <SuppressStartupBanner>true</SuppressStartupBanner> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <TypeLibraryName>.\msvc-debug\henon.tlb</TypeLibraryName> + <MkTypLibCompatible>true</MkTypLibCompatible> + <TargetEnvironment>Win32</TargetEnvironment> + </Midl> + <ResourceCompile> + <Culture>0x0c07</Culture> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Bscmake> + <SuppressStartupBanner>true</SuppressStartupBanner> + <OutputFile>.\max-msvc\sd\$(TargetName).bsc</OutputFile> + </Bscmake> + <Link> + <SuppressStartupBanner>true</SuppressStartupBanner> + <LinkDLL>true</LinkDLL> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OutputFile>.\max-msvc\sd\$(TargetName).mxe</OutputFile> + <ImportLibrary>.\max-msvc\sd\$(TargetName).lib</ImportLibrary> + <AdditionalLibraryDirectories>$(FLEXTPATH)\max-msvc;$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>flext-max_sd.lib;maxapi.lib;maxaudio.lib;%(AdditionalDependencies)</AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="main.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/externals/grill/trunk/flext/examples/xcode-template/Info.plist b/externals/grill/trunk/flext/examples/xcode-template/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..fcc03a3201ce0c4c160ec3878f61fd54bfd22fc2 --- /dev/null +++ b/externals/grill/trunk/flext/examples/xcode-template/Info.plist @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>$(PROJECT_NAME)</string> + <key>CFBundleIdentifier</key> + <string>org.grrrr.ext.$(PROJECT_NAME)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>iLaX</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>CSResourcesFileMapped</key> + <string>yes</string> +</dict> +</plist> diff --git a/externals/grill/trunk/flext/examples/xcode-template/main.cpp b/externals/grill/trunk/flext/examples/xcode-template/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5d6ea98a9f856b3cc69ab0c5311db9ba528db9b1 --- /dev/null +++ b/externals/grill/trunk/flext/examples/xcode-template/main.cpp @@ -0,0 +1,40 @@ +#include <flext.h> + +class myext + : public flext_base +{ + FLEXT_HEADER_S(myext,flext_base,setup); + +public: + myext(int argc,t_atom *argv) + { + post("creating myext object"); + + // initialization stuff... + } + + ~myext() + { + post("destroying myext object"); + + // destruction stuff... + } + +protected: + static void setup(t_classid c) + { + post("setting up myext class"); + + // add methods here... + FLEXT_CADDBANG(c,0,m_bang); + } + + void m_bang() + { + post("BANG!"); + } + + FLEXT_CALLBACK(m_bang) +}; + +FLEXT_NEW_V("myext",myext) diff --git a/externals/grill/trunk/flext/examples/xcode-template/readme.txt b/externals/grill/trunk/flext/examples/xcode-template/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..24a3c2837f0d229fd31c5a1828dbdfde419b70e8 --- /dev/null +++ b/externals/grill/trunk/flext/examples/xcode-template/readme.txt @@ -0,0 +1,3 @@ +You can use this template project file to build and debug flext-based externals on OSX +- rename the myext.xcodeproj bundle to your liking (e.g. coolext.xcodeproj) +- edit main.cpp, or add source files and library dependencies to the project diff --git a/externals/grill/trunk/flext/examples/xcode-template/template.xcodeproj/project.pbxproj b/externals/grill/trunk/flext/examples/xcode-template/template.xcodeproj/project.pbxproj new file mode 100644 index 0000000000000000000000000000000000000000..ec77f1eef7d08e15c77eff59a835a5c10a61fd23 --- /dev/null +++ b/externals/grill/trunk/flext/examples/xcode-template/template.xcodeproj/project.pbxproj @@ -0,0 +1,450 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + E98573570D9E52D300682171 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E98573560D9E52D300682171 /* main.cpp */; }; + E98573580D9E52D300682171 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E98573560D9E52D300682171 /* main.cpp */; }; + E98C3077078D948800EC0264 /* vecLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E98C3076078D948800EC0264 /* vecLib.framework */; }; + E98C3078078D948800EC0264 /* vecLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E98C3076078D948800EC0264 /* vecLib.framework */; }; + E9974E5B0770851500206F68 /* MaxAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974DFA0770750400206F68 /* MaxAPI.framework */; }; + E9974E5C0770851700206F68 /* MaxAudioAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974DFB0770750400206F68 /* MaxAudioAPI.framework */; }; + E99A3B770D35508600E692EF /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E99A3B760D35508600E692EF /* Info.plist */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E9974EC207708C9300206F68 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = "/Library/Application Support/Cycling '74/init"; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + D2AAC09D05546B4700DB518D /* vasp.pd_darwin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = vasp.pd_darwin; sourceTree = BUILT_PRODUCTS_DIR; }; + E98573560D9E52D300682171 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + E98C3076078D948800EC0264 /* vecLib.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vecLib.framework; path = /System/Library/Frameworks/vecLib.framework; sourceTree = "<absolute>"; }; + E9974DFA0770750400206F68 /* MaxAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MaxAPI.framework; path = /Library/Frameworks/MaxAPI.framework; sourceTree = "<absolute>"; }; + E9974DFB0770750400206F68 /* MaxAudioAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MaxAudioAPI.framework; path = /Library/Frameworks/MaxAudioAPI.framework; sourceTree = "<absolute>"; }; + E9974E53077083C700206F68 /* vasp.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = vasp.mxo; sourceTree = BUILT_PRODUCTS_DIR; }; + E99A3B760D35508600E692EF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + E99A3C6B0D35525C00E692EF /* readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = readme.txt; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D2AAC09B05546B4700DB518D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E98C3077078D948800EC0264 /* vecLib.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974E51077083C700206F68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E9974E5C0770851700206F68 /* MaxAudioAPI.framework in Frameworks */, + E9974E5B0770851500206F68 /* MaxAPI.framework in Frameworks */, + E98C3078078D948800EC0264 /* vecLib.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DDFF38A45A11DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + D2AAC09D05546B4700DB518D /* vasp.pd_darwin */, + E9974E53077083C700206F68 /* vasp.mxo */, + ); + name = Products; + sourceTree = "<group>"; + }; + 0867D691FE84028FC02AAC07 /* xsample */ = { + isa = PBXGroup; + children = ( + E99A3C6B0D35525C00E692EF /* readme.txt */, + 08FB77ACFE841707C02AAC07 /* Source */, + 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */, + 034768DDFF38A45A11DB9C8B /* Products */, + ); + name = xsample; + sourceTree = "<group>"; + }; + 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + E98C3076078D948800EC0264 /* vecLib.framework */, + E9974DFA0770750400206F68 /* MaxAPI.framework */, + E9974DFB0770750400206F68 /* MaxAudioAPI.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = "<group>"; + }; + 08FB77ACFE841707C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + E98573560D9E52D300682171 /* main.cpp */, + E99A3B760D35508600E692EF /* Info.plist */, + ); + name = Source; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D2AAC09905546B4700DB518D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D2AAC09C05546B4700DB518D /* pd static */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9A5BC8A0A33819900AD9F03 /* Build configuration list for PBXNativeTarget "pd static" */; + buildPhases = ( + D2AAC09905546B4700DB518D /* Headers */, + D2AAC09B05546B4700DB518D /* Frameworks */, + D2AAC09A05546B4700DB518D /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "pd static"; + productName = xsample; + productReference = D2AAC09D05546B4700DB518D /* vasp.pd_darwin */; + productType = "com.apple.product-type.library.dynamic"; + }; + E9974E52077083C700206F68 /* max static */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9A5BC8E0A33819900AD9F03 /* Build configuration list for PBXNativeTarget "max static" */; + buildPhases = ( + E9974E4F077083C700206F68 /* Resources */, + E9974E50077083C700206F68 /* Sources */, + E9974E51077083C700206F68 /* Frameworks */, + E9974EC207708C9300206F68 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "max static"; + productName = "Max xsample static"; + productReference = E9974E53077083C700206F68 /* vasp.mxo */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = E9A5BC920A33819900AD9F03 /* Build configuration list for PBXProject "vasp" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 1; + mainGroup = 0867D691FE84028FC02AAC07 /* xsample */; + productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D2AAC09C05546B4700DB518D /* pd static */, + E9974E52077083C700206F68 /* max static */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E9974E4F077083C700206F68 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E99A3B770D35508600E692EF /* Info.plist in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D2AAC09A05546B4700DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E98573570D9E52D300682171 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974E50077083C700206F68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E98573580D9E52D300682171 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + E9A5BC8B0A33819900AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_EXTENSION = pd_darwin; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=2", + ); + HEADER_SEARCH_PATHS = ( + "$(PD-devel)/src", + /usr/local/include/flext, + ); + INSTALL_PATH = "$(PD)/extra"; + LIBRARY_SEARCH_PATHS = ""; + LIBRARY_STYLE = BUNDLE; + MACH_O_TYPE = mh_dylib; + MACOSX_DEPLOYMENT_TARGET = 10.3; + OTHER_LDFLAGS = ( + "-lflext-pd_sd", + "-undefined", + dynamic_lookup, + ); + ZERO_LINK = YES; + }; + name = Development; + }; + E9A5BC8C0A33819900AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_EXTENSION = pd_darwin; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=2", + ); + HEADER_SEARCH_PATHS = ( + "$(PD)/src", + "$(flext)/source", + ); + INSTALL_PATH = "$(PD)/extra"; + LIBRARY_SEARCH_PATHS = "$(flext)/build"; + LIBRARY_STYLE = BUNDLE; + MACH_O_TYPE = mh_dylib; + MACOSX_DEPLOYMENT_TARGET = 10.3; + OTHER_LDFLAGS = ( + "-lflext-pd_s", + "-undefined", + dynamic_lookup, + ); + ZERO_LINK = NO; + }; + name = Deployment; + }; + E9A5BC8D0A33819900AD9F03 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_EXTENSION = pd_darwin; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_INPUT_FILETYPE = sourcecode.cpp.cpp; + GCC_PREPROCESSOR_DEFINITIONS = "FLEXT_SYS=2"; + HEADER_SEARCH_PATHS = ( + "$(PDApp)/src", + "$(flext)/source", + ); + INSTALL_PATH = "$(PD)/extra"; + LIBRARY_SEARCH_PATHS = "$(flext)/build"; + LIBRARY_STYLE = BUNDLE; + MACH_O_TYPE = mh_bundle; + OTHER_LDFLAGS = ( + "-bundle_loader", + "$(PDApp)/bin/pd", + ); + PRODUCT_NAME = xsample; + }; + name = Default; + }; + E9A5BC8F0A33819900AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=1", + ); + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + "$(flext)/source", + ); + INFOPLIST_FILE = Info.plist; + INFOPLIST_PREPROCESS = YES; + INSTALL_PATH = "/Library/Application Support/Cycling 74/externals/flext"; + LIBRARY_SEARCH_PATHS = "$(flext)/build"; + LIBRARY_STYLE = DYNAMIC; + OTHER_LDFLAGS = "-lflext-max_sd"; + OTHER_REZFLAGS = ""; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = mxo; + ZERO_LINK = YES; + }; + name = Development; + }; + E9A5BC900A33819900AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=1", + ); + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + "$(flext)/source", + ); + INFOPLIST_FILE = Info.plist; + INFOPLIST_PREPROCESS = YES; + INSTALL_PATH = "/Library/Application Support/Cycling 74/externals/flext"; + LIBRARY_SEARCH_PATHS = "$(flext)/build"; + LIBRARY_STYLE = DYNAMIC; + OTHER_LDFLAGS = "-lflext-max_s"; + OTHER_REZFLAGS = ""; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = mxo; + ZERO_LINK = NO; + }; + name = Deployment; + }; + E9A5BC910A33819900AD9F03 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = "FLEXT_SYS=1"; + GENERATE_PKGINFO_FILE = YES; + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + "$(flext)/source", + ); + INFOPLIST_FILE = "source/xsample-Info.plist"; + INSTALL_PATH = "/Library/Application Support/Cycling 74/externals/flext"; + LIBRARY_SEARCH_PATHS = "$(flext)/build"; + LIBRARY_STYLE = DYNAMIC; + OTHER_CFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = xsample; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = mxo; + }; + name = Default; + }; + E9A5BC930A33819900AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + _DEBUG, + FLEXT_USESIMD, + ); + PRODUCT_NAME = "$(PROJECT_NAME)"; + }; + name = Development; + }; + E9A5BC940A33819900AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_ENABLE_SSE3_EXTENSIONS = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + NDEBUG, + FLEXT_USESIMD, + ); + GCC_STRICT_ALIASING = YES; + PRODUCT_NAME = "$(PROJECT_NAME)"; + }; + name = Deployment; + }; + E9A5BC950A33819900AD9F03 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Default; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E9A5BC8A0A33819900AD9F03 /* Build configuration list for PBXNativeTarget "pd static" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BC8B0A33819900AD9F03 /* Development */, + E9A5BC8C0A33819900AD9F03 /* Deployment */, + E9A5BC8D0A33819900AD9F03 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + E9A5BC8E0A33819900AD9F03 /* Build configuration list for PBXNativeTarget "max static" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BC8F0A33819900AD9F03 /* Development */, + E9A5BC900A33819900AD9F03 /* Deployment */, + E9A5BC910A33819900AD9F03 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + E9A5BC920A33819900AD9F03 /* Build configuration list for PBXProject "vasp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BC930A33819900AD9F03 /* Development */, + E9A5BC940A33819900AD9F03 /* Deployment */, + E9A5BC950A33819900AD9F03 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/externals/grill/trunk/flext/flext.mcp b/externals/grill/trunk/flext/flext.mcp new file mode 100644 index 0000000000000000000000000000000000000000..595fe11eb1b892156ab55c4ff86fd0e6f21058f8 Binary files /dev/null and b/externals/grill/trunk/flext/flext.mcp differ diff --git a/externals/grill/trunk/flext/flext.sln b/externals/grill/trunk/flext/flext.sln new file mode 100644 index 0000000000000000000000000000000000000000..617d9dd5b8a0a561e91c07dc26a2c746678e5502 --- /dev/null +++ b/externals/grill/trunk/flext/flext.sln @@ -0,0 +1,50 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flext", "flext.vcxproj", "{B94DB81C-B5FB-4984-99DC-5063C3793BFE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Max Debug|Win32 = Max Debug|Win32 + Max Release|Win32 = Max Release|Win32 + Max Shared Debug|Win32 = Max Shared Debug|Win32 + Max Shared Release|Win32 = Max Shared Release|Win32 + Max Threaded Debug|Win32 = Max Threaded Debug|Win32 + Max Threaded Release|Win32 = Max Threaded Release|Win32 + PD Debug|Win32 = PD Debug|Win32 + PD Release|Win32 = PD Release|Win32 + PD Shared Debug|Win32 = PD Shared Debug|Win32 + PD Shared Release|Win32 = PD Shared Release|Win32 + PD Threads Debug|Win32 = PD Threads Debug|Win32 + PD Threads Release|Win32 = PD Threads Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Debug|Win32.ActiveCfg = Max Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Debug|Win32.Build.0 = Max Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Release|Win32.ActiveCfg = Max Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Release|Win32.Build.0 = Max Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Shared Debug|Win32.ActiveCfg = Max Shared Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Shared Debug|Win32.Build.0 = Max Shared Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Shared Release|Win32.ActiveCfg = Max Shared Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Shared Release|Win32.Build.0 = Max Shared Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Threaded Debug|Win32.ActiveCfg = Max Threaded Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Threaded Debug|Win32.Build.0 = Max Threaded Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Threaded Release|Win32.ActiveCfg = Max Threaded Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.Max Threaded Release|Win32.Build.0 = Max Threaded Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Debug|Win32.ActiveCfg = PD Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Debug|Win32.Build.0 = PD Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Release|Win32.ActiveCfg = PD Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Release|Win32.Build.0 = PD Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Shared Debug|Win32.ActiveCfg = PD Shared Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Shared Debug|Win32.Build.0 = PD Shared Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Shared Release|Win32.ActiveCfg = PD Shared Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Shared Release|Win32.Build.0 = PD Shared Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Threads Debug|Win32.ActiveCfg = PD Threads Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Threads Debug|Win32.Build.0 = PD Threads Debug|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Threads Release|Win32.ActiveCfg = PD Threads Release|Win32 + {B94DB81C-B5FB-4984-99DC-5063C3793BFE}.PD Threads Release|Win32.Build.0 = PD Threads Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/externals/grill/trunk/flext/flext.vcproj b/externals/grill/trunk/flext/flext.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..6bd76eeb5c9c1ad5a4413cc1f5220a02fba95fae --- /dev/null +++ b/externals/grill/trunk/flext/flext.vcproj @@ -0,0 +1,4635 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="flext" + ProjectGUID="{B94DB81C-B5FB-4984-99DC-5063C3793BFE}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Threads DLL Debug|Win32" + OutputDirectory=".\pd-msvc\tdl" + IntermediateDirectory=".\pd-msvc\tdl" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="pd-msvc/flext_tdl-pdwin.lib" + SuppressStartupBanner="TRUE"/> + <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="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Threads DLL Release|Win32" + OutputDirectory=".\pd-msvc\trl" + IntermediateDirectory=".\pd-msvc\trl" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_USE_SIMD" + StringPooling="TRUE" + RuntimeLibrary="2" + EnableFunctionLevelLinking="TRUE" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="pd-msvc/flext_tl-pdwin.lib" + SuppressStartupBanner="TRUE"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="PD Threads Debug|Win32" + OutputDirectory=".\pd-msvc\td" + IntermediateDirectory=".\pd-msvc\td" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + EnableIntrinsicFunctions="TRUE" + AdditionalIncludeDirectories="c:\programme\pd\src;c:\data\libs\sndobj\include;c:\data\libs\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT;_WIN32_WINNT=0x501;FLEXT_USE_CMEM" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="pd-msvc/flext-pd_td.lib" + SuppressStartupBanner="TRUE"/> + <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="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="PD Debug|Win32" + OutputDirectory=".\pd-msvc\sd" + IntermediateDirectory=".\pd-msvc\sd" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + EnableIntrinsicFunctions="TRUE" + AdditionalIncludeDirectories=""$(prereq)\pthreads\include";"c:\programme\pd-0.40-2\src";"$(prereq)\sndobj\include\SndObj";"$(prereq)\stk\include"" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_DEBUGMEM;_WIN32_WINNT=0x400;WIN" + StringPooling="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="pd-msvc/flext-pd_sd.lib" + SuppressStartupBanner="TRUE"/> + <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="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="PD Threads Release|Win32" + OutputDirectory=".\pd-msvc\t" + IntermediateDirectory=".\pd-msvc\t" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories=""$(pdmax)\pd\src";"$(prereq)\sndobj\include";"$(prereq)\stk\include";"$(prereq)\pthreads\include"" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;_WIN32_WINNT=0x501" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="pd-msvc/flext-pd_t.lib" + SuppressStartupBanner="TRUE"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="PD Release|Win32" + OutputDirectory=".\pd-msvc\s" + IntermediateDirectory=".\pd-msvc\s" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + EnableIntrinsicFunctions="TRUE" + AdditionalIncludeDirectories=""$(prereq)\pthreads\include";c:\data\pdmax\pd\src" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;FLEXT_EXPORTS;_WIN32_WINNT=0x400" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="pd-msvc/flext-pd_s.lib" + SuppressStartupBanner="TRUE"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="PD Shared Debug|Win32" + OutputDirectory=".\pd-msvc\ddl" + IntermediateDirectory=".\pd-msvc\ddl" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=""c:\data\prog\pd\pd-cvs\src";c:\data\prog\packs\pthreads;c:\data\prog\audio\sndobj\include;c:\data\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" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib pthreadVC.lib stk_d.lib sndobj.lib" + OutputFile=".\pd-msvc\flext-pd_d.dll" + AdditionalLibraryDirectories=""c:\data\prog\pd\pd-cvs\bin";c:\data\prog\packs\pthreads;c:\data\prog\audio\stk\lib;c:\data\prog\audio\sndobj\lib" + GenerateDebugInformation="TRUE" + OptimizeReferences="1" + ImportLibrary="./pd-msvc/flext-pd_d.lib" + TargetMachine="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="PD Shared Release|Win32" + OutputDirectory=".\pd-msvc\dd" + IntermediateDirectory=".\pd-msvc\dd" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="2" + FavorSizeOrSpeed="0" + EnableFiberSafeOptimizations="FALSE" + AdditionalIncludeDirectories=""c:\data\prog\pd\pd-cvs\src";c:\data\prog\packs\pthreads;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_LIB;FLEXT_SYS_PD;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;FLEXT_PDLOCK" + StringPooling="TRUE" + RuntimeLibrary="2" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + 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" + OutputFile=".\pd-msvc\flext-pd.dll" + AdditionalLibraryDirectories="c:\data\prog\packs\pthreads;"c:\data\prog\pd\pd-cvs\bin";c:\data\prog\audio\stk\lib;c:\data\prog\audio\sndobj\lib" + GenerateDebugInformation="FALSE" + OptimizeReferences="1" + ImportLibrary="./pd-msvc/flext-pd.lib" + TargetMachine="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="Max Shared Debug|Win32" + OutputDirectory=".\max-msvc\dd" + IntermediateDirectory=".\max-msvc\dd" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="F:\prog\audio\MaxWinSDK\c74support\max-includes,F:\prog\audio\MaxWinSDK\c74support\msp-includes,f:\prog\packs\pthreads,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_MAX;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + StructMemberAlignment="2" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="maxapi.lib maxext.lib maxaudio.lib pthreadVC.lib stk_d.lib sndobj.lib" + OutputFile=".\max-msvc\flext-max_d.dll" + AdditionalLibraryDirectories=""F:\prog\audio\MaxWinSDK\c74support\max-includes\win-includes\debug";"F:\prog\audio\MaxWinSDK\c74support\msp-includes\win-includes\debug";f:\prog\packs\pthreads;F:\prog\audio\stk\lib;F:\prog\audio\sndobj\lib" + GenerateDebugInformation="TRUE" + OptimizeReferences="1" + ImportLibrary="./max-msvc/flext-max_d.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool" + Description="copy flext to maestra" + CommandLine="copy F:\prog\max\flext\max-msvc\flext_d.max.dll f:\prog\maestra\dev\debug"/> + <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="Max Shared Release|Win32" + OutputDirectory=".\max-msvc\dd" + IntermediateDirectory=".\max-msvc\dd" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="2" + FavorSizeOrSpeed="0" + EnableFiberSafeOptimizations="FALSE" + AdditionalIncludeDirectories="F:\prog\audio\MaxWinSDK\c74support\max-includes,F:\prog\audio\MaxWinSDK\c74support\msp-includes,f:\prog\packs\pthreads,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_LIB;FLEXT_SYS_MAX;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS" + StringPooling="TRUE" + ExceptionHandling="TRUE" + RuntimeLibrary="2" + StructMemberAlignment="2" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="maxapi.lib maxext.lib maxaudio.lib stk.lib sndobj.lib" + OutputFile=".\max-msvc\flext-max.dll" + AdditionalLibraryDirectories=""F:\prog\audio\MaxWinSDK\c74support\max-includes\win-includes\debug";"F:\prog\audio\MaxWinSDK\c74support\msp-includes\win-includes\debug";f:\prog\packs\pthreads;F:\prog\audio\stk\lib;F:\prog\audio\sndobj\lib" + IgnoreAllDefaultLibraries="FALSE" + GenerateDebugInformation="FALSE" + OptimizeReferences="1" + ImportLibrary="./max-msvc/flext-max.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool" + Description="copy flext to maestra" + CommandLine="copy F:\prog\max\flext\source\*.h f:\prog\maestra\dev\api\include +copy F:\prog\max\flext\max-msvc\flext_l.lib f:\prog\maestra\dev\api\lib +copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\maestra\dev\release +copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll +"/> + <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="Max Release|Win32" + OutputDirectory=".\max-msvc\s" + IntermediateDirectory=".\max-msvc\s" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + GlobalOptimizations="FALSE" + 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";f:\prog\packs\pthreads;f:\prog\audio\sndobj\include;f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_LIB;FLEXT_SYS_MAX;FLEXT_USE_SIMD;FLEXT_EXPORTS" + StringPooling="TRUE" + BasicRuntimeChecks="0" + RuntimeLibrary="0" + StructMemberAlignment="2" + BufferSecurityCheck="FALSE" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="0" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="max-msvc/flext-max_s.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool" + Description="copy flext to maestra"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Max Debug|Win32" + OutputDirectory=".\max-msvc\sd" + IntermediateDirectory=".\max-msvc\sd" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="0" + EnableIntrinsicFunctions="TRUE" + FavorSizeOrSpeed="0" + OmitFramePointers="FALSE" + OptimizeForProcessor="2" + AdditionalIncludeDirectories=""C:\data\libs\maxmspjit-sdk\c74support\max-includes";"C:\data\libs\maxmspjit-sdk\c74support\msp-includes";$(NOINHERIT)" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;FLEXT_USE_CMEM;FLEXT_DEBUGMEM" + StringPooling="FALSE" + RuntimeLibrary="3" + StructMemberAlignment="2" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="max-msvc/flext-max_sd.lib"/> + <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="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Max Threaded Debug|Win32" + OutputDirectory="max-msvc/td" + IntermediateDirectory="max-msvc/td" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="0" + FavorSizeOrSpeed="0" + EnableFiberSafeOptimizations="FALSE" + 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" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="max-msvc/flext-max_td.lib"/> + <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="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Max Threaded Release|Win32" + OutputDirectory="max-msvc/tr" + IntermediateDirectory="max-msvc/tr" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="2" + FavorSizeOrSpeed="0" + EnableFiberSafeOptimizations="FALSE" + 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" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="0" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="max-msvc/flext-max_t.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool" + Description="copy flext to maestra"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="PD Lockfree Debug|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + InlineFunctionExpansion="0" + EnableIntrinsicFunctions="TRUE" + AdditionalIncludeDirectories=""$(prereq)\pthreads\include";"$(pdmax)\pd\src";"$(prereq)\sndobj\include";"$(prereq)\stk\include";C:\data\nova\libs\lockfree" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT;_WIN32_WINNT=0x501;xFLEXT_USECMEM;FLEXT_QMODE=2" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="pd-msvc/flext-pd_td_l.lib" + SuppressStartupBanner="TRUE"/> + <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="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="doc" + Filter=""> + <File + RelativePath=".\build.txt"> + </File> + <File + RelativePath="changes.txt"> + </File> + <File + RelativePath="source\fldoxygen.h"> + </File> + <File + RelativePath=".\notes.txt"> + </File> + <File + RelativePath="readme.txt"> + </File> + </Filter> + <Filter + Name="Atom" + Filter=""> + <File + RelativePath="source\flatom.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flatom_part.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flatom_pr.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Base" + Filter=""> + <File + RelativePath="source\flbase.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flbase.h"> + </File> + <File + RelativePath="source\flclass.h"> + </File> + <File + RelativePath="source\flext.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flext.h"> + </File> + <File + RelativePath="source\flinternal.h"> + </File> + <File + RelativePath="source\fllib.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flprefix.h"> + </File> + <File + RelativePath="source\flstdc.h"> + </File> + <File + RelativePath="source\flthr.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="IO" + Filter=""> + <File + RelativePath="source\flattr.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath=".\source\flattr_ed.cpp"> + </File> + <File + RelativePath="source\flbind.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flitem.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flmeth.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flmsg.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flout.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flproxy.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flqueue.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flxlet.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Util" + Filter=""> + <File + RelativePath="source\flbuf.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath=".\source\flcontainers.h"> + </File> + <File + RelativePath=".\source\flmap.cpp"> + </File> + <File + RelativePath=".\source\flmap.h"> + </File> + <File + RelativePath="source\flmspbuffer.h"> + </File> + <File + RelativePath="source\flsimd.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flsupport.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flsupport.h"> + </File> + <File + RelativePath="source\fltimer.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flutil.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Dsp" + Filter=""> + <File + RelativePath="source\fldsp.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\fldsp.h"> + </File> + </Filter> + <Filter + Name="SndObj" + Filter=""> + <File + RelativePath="source\flsndobj.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flsndobj.h"> + <FileConfiguration + Name="PD Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="STK" + Filter=""> + <File + RelativePath="source\flstk.cpp"> + <FileConfiguration + Name="Threads DLL Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Threads DLL Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Threads Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="PD Lockfree Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + <File + RelativePath="source\flstk.h"> + <FileConfiguration + Name="PD Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="PD Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Shared Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Defs" + Filter=""> + <File + RelativePath="source\fldefs.h"> + </File> + <File + RelativePath="source\fldefs_attradd.h"> + </File> + <File + RelativePath="source\fldefs_attrcb.h"> + </File> + <File + RelativePath="source\fldefs_attrvar.h"> + </File> + <File + RelativePath="source\fldefs_hdr.h"> + </File> + <File + RelativePath="source\fldefs_methadd.h"> + </File> + <File + RelativePath="source\fldefs_methbind.h"> + </File> + <File + RelativePath="source\fldefs_methcall.h"> + </File> + <File + RelativePath="source\fldefs_methcb.h"> + </File> + <File + RelativePath="source\fldefs_meththr.h"> + </File> + <File + RelativePath="source\fldefs_setup.h"> + </File> + </Filter> + <Filter + Name="build" + Filter=""> + <File + RelativePath=".\build-max-msvc.bat"> + </File> + <File + RelativePath=".\build-pd-msvc.bat"> + </File> + <File + RelativePath=".\config-max-msvc.txt"> + </File> + <File + RelativePath=".\config-pd-msvc.txt"> + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/flext.vcxproj b/externals/grill/trunk/flext/flext.vcxproj new file mode 100644 index 0000000000000000000000000000000000000000..ab977c7448260a8365d00085aba9749437b21ff2 --- /dev/null +++ b/externals/grill/trunk/flext/flext.vcxproj @@ -0,0 +1,2545 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Max Debug|Win32"> + <Configuration>Max Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Max Release|Win32"> + <Configuration>Max Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Max Shared Debug|Win32"> + <Configuration>Max Shared Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Max Shared Release|Win32"> + <Configuration>Max Shared Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Max Threaded Debug|Win32"> + <Configuration>Max Threaded Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Max Threaded Release|Win32"> + <Configuration>Max Threaded Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Debug|Win32"> + <Configuration>PD Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Lockfree Debug|Win32"> + <Configuration>PD Lockfree Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Release|Win32"> + <Configuration>PD Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Shared Debug|Win32"> + <Configuration>PD Shared Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Shared Release|Win32"> + <Configuration>PD Shared Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Threads Debug|Win32"> + <Configuration>PD Threads Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="PD Threads Release|Win32"> + <Configuration>PD Threads Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Threads DLL Debug|Win32"> + <Configuration>Threads DLL Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Threads DLL Release|Win32"> + <Configuration>Threads DLL Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{B94DB81C-B5FB-4984-99DC-5063C3793BFE}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="flext_settings_VS.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">.\pd-msvc\tdl\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">.\pd-msvc\tdl\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">.\pd-msvc\trl\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">.\pd-msvc\trl\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">.\pd-msvc\td\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">.\pd-msvc\td\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">.\pd-msvc\sd\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">.\pd-msvc\sd\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">.\pd-msvc\t\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">.\pd-msvc\t\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">.\pd-msvc\s\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">.\pd-msvc\s\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">.\pd-msvc\ddl\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">.\pd-msvc\ddl\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">.\pd-msvc\dd\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">.\pd-msvc\dd\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">.\max-msvc\ddl\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">.\max-msvc\ddl\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">.\max-msvc\dd\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">.\max-msvc\dd\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">.\max-msvc\s\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">.\max-msvc\s\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">.\max-msvc\sd\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">.\max-msvc\sd\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">max-msvc/td\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">max-msvc/td\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">max-msvc/tr\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">max-msvc/tr\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">$(Configuration)\</IntDir> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>c:\programme\audio\pd\src;f:\prog\audio\sndobj\include;f:\prog\audio\stk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <Lib> + <OutputFile>pd-msvc/flext_tdl-pdwin.lib</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>c:\_pd_\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_USE_SIMD;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <CompileAs>Default</CompileAs> + <BrowseInformation>true</BrowseInformation> + </ClCompile> + <Lib> + <OutputFile>pd-msvc/flext_tl-pdwin.lib</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>$(PDPATH)\src;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT;_WIN32_WINNT=0x501;FLEXT_USE_CMEM;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <Lib> + <OutputFile>pd-msvc/flext-pd_td.lib</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>$(PDPATH)\src;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_DEBUGMEM;_WIN32_WINNT=0x501;WIN;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + </ClCompile> + <Lib> + <OutputFile>pd-msvc/flext-pd_sd.lib</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(PDPATH)\src;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;_WIN32_WINNT=0x501;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <BrowseInformation>true</BrowseInformation> + </ClCompile> + <Lib> + <OutputFile>pd-msvc/flext-pd_t.lib</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>$(PDPATH)\src;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD;FLEXT_EXPORTS;_WIN32_WINNT=0x501;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <BrowseInformation>true</BrowseInformation> + </ClCompile> + <Lib> + <OutputFile>pd-msvc/flext-pd_s.lib</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(PDPATH)\src;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;FLEXT_PDLOCK;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + </ClCompile> + <Link> + <AdditionalDependencies>pd.lib;pthreadVC.lib;$(STK_LIB);$(SNDOBJ_LIB);%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>.\pd-msvc\flext-pd_d.dll</OutputFile> + <AdditionalLibraryDirectories>$(PDPATH)\bin;$(PTHREADSLIB);$(STK_LIB);$(SNDOBJ_LIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <OptimizeReferences>false</OptimizeReferences> + <ImportLibrary>./pd-msvc/flext-pd_d.lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> + <AdditionalIncludeDirectories>$(PDPATH)\src;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_LIB;FLEXT_SYS_PD;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;FLEXT_PDLOCK;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat> + </DebugInformationFormat> + <CompileAs>Default</CompileAs> + <BrowseInformation>true</BrowseInformation> + </ClCompile> + <Link> + <AdditionalDependencies>pd.lib;pthreadVC.lib;$(STK_LIB);$(SNDOBJ_LIB);%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>.\pd-msvc\flext-pd.dll</OutputFile> + <AdditionalLibraryDirectories>$(PDPATH)\bin;$(PTHREADS_LIB);$(STK_LIB);$(SNDOBJ_LIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>false</GenerateDebugInformation> + <OptimizeReferences>false</OptimizeReferences> + <ImportLibrary>./pd-msvc/flext-pd.lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_WIN32_WINNT=0x501;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <StructMemberAlignment>2Bytes</StructMemberAlignment> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + </ClCompile> + <Link> + <AdditionalDependencies>maxapi.lib;maxaudio.lib;$(PTHREADSLIB);$(STK_LIB);$(SNDOBJ_LIB);%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>.\max-msvc\flext-max_d.dll</OutputFile> + <AdditionalLibraryDirectories>$(PTHREADSLIB);$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;$(STK_LIB);$(SNDOBJ_LIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <OptimizeReferences>false</OptimizeReferences> + <ImportLibrary>./max-msvc/flext-max_d.lib</ImportLibrary> + </Link> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> + <AdditionalIncludeDirectories>$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_WIN32_WINNT=0x501;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;FLEXT_SHARED;FLEXT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <ExceptionHandling>Sync</ExceptionHandling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <StructMemberAlignment>2Bytes</StructMemberAlignment> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <CompileAs>Default</CompileAs> + <DebugInformationFormat> + </DebugInformationFormat> + <BrowseInformation>true</BrowseInformation> + </ClCompile> + <Link> + <AdditionalDependencies>maxapi.lib;maxaudio.lib;$(PTHREADSLIB);$(STK_LIB);$(SNDOBJ_LIB);%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>.\max-msvc\flext-max.dll</OutputFile> + <AdditionalLibraryDirectories>$(PTHREADSLIB);$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;$(STK_LIB);$(SNDOBJ_LIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <OptimizeReferences>false</OptimizeReferences> + <ImportLibrary>./max-msvc/flext-max.lib</ImportLibrary> + </Link> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> + <AdditionalIncludeDirectories>$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_WIN32_WINNT=0x501;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;FLEXT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <StructMemberAlignment>2Bytes</StructMemberAlignment> + <BufferSecurityCheck>false</BufferSecurityCheck> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat> + </DebugInformationFormat> + <CompileAs>Default</CompileAs> + <BrowseInformation>true</BrowseInformation> + </ClCompile> + <Lib> + <OutputFile>max-msvc/flext-max_s.lib</OutputFile> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <InlineFunctionExpansion>Default</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <OmitFramePointers>false</OmitFramePointers> + <AdditionalIncludeDirectories>$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_WIN32_WINNT=0x501;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;xFLEXT_DEBUGMEM;FLEXT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>false</StringPooling> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <StructMemberAlignment>2Bytes</StructMemberAlignment> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <Lib> + <OutputFile>max-msvc/flext-max_sd.lib</OutputFile> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <InlineFunctionExpansion>Default</InlineFunctionExpansion> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> + <AdditionalIncludeDirectories>$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_WIN32_WINNT=0x501;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;FLEXT_THREADS;FLEXT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <Lib> + <OutputFile>max-msvc/flext-max_td.lib</OutputFile> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> + <AdditionalIncludeDirectories>$(MAXSDKPATH)\max-includes;$(MAXSDKPATH)\msp-includes;$(PTHREADSINC);$(STK_INC);$(SNDOBJ_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;_WIN32_WINNT=0x501;_LIB;FLEXT_SYS=1;FLEXT_USE_SIMD;FLEXT_THREADS;FLEXT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat> + </DebugInformationFormat> + <CompileAs>Default</CompileAs> + <BrowseInformation>true</BrowseInformation> + </ClCompile> + <Lib> + <OutputFile>max-msvc/flext-max_t.lib</OutputFile> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <InlineFunctionExpansion>Default</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>$(prereq)\pthreads\include;$(pdmax)\pd\src;$(prereq)\sndobj\include;$(prereq)\stk\include;C:\data\nova\libs\lockfree;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT;_WIN32_WINNT=0x501;xFLEXT_USECMEM;FLEXT_QMODE=2;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <PrecompiledHeaderFile>flext.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <Lib> + <OutputFile>pd-msvc/flext-pd_td_l.lib</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Lib> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0c07</Culture> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemGroup> + <None Include="build.txt" /> + <None Include="changes.txt" /> + <None Include="notes.txt" /> + <None Include="readme.txt" /> + <None Include="build-max-msvc.bat" /> + <None Include="build-pd-msvc.bat" /> + <None Include="config-max-msvc.txt" /> + <None Include="config-pd-msvc.txt" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="source\fldoxygen.h" /> + <ClInclude Include="source\flbase.h" /> + <ClInclude Include="source\flclass.h" /> + <ClInclude Include="source\flext.h" /> + <ClInclude Include="source\flinternal.h" /> + <ClInclude Include="source\flprefix.h" /> + <ClInclude Include="source\flstdc.h" /> + <ClInclude Include="source\flcontainers.h" /> + <ClInclude Include="source\flmap.h" /> + <ClInclude Include="source\flmspbuffer.h" /> + <ClInclude Include="source\flsupport.h" /> + <ClInclude Include="source\fldsp.h" /> + <CustomBuildStep Include="source\flsndobj.h"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">true</ExcludedFromBuild> + </CustomBuildStep> + <CustomBuildStep Include="source\flstk.h"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">true</ExcludedFromBuild> + </CustomBuildStep> + <ClInclude Include="source\fldefs.h" /> + <ClInclude Include="source\fldefs_attradd.h" /> + <ClInclude Include="source\fldefs_attrcb.h" /> + <ClInclude Include="source\fldefs_attrvar.h" /> + <ClInclude Include="source\fldefs_hdr.h" /> + <ClInclude Include="source\fldefs_methadd.h" /> + <ClInclude Include="source\fldefs_methbind.h" /> + <ClInclude Include="source\fldefs_methcall.h" /> + <ClInclude Include="source\fldefs_methcb.h" /> + <ClInclude Include="source\fldefs_meththr.h" /> + <ClInclude Include="source\fldefs_setup.h" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="source\flatom.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flatom_part.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flatom_pr.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flbase.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flext.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\fllib.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flthr.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flattr.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flattr_ed.cpp" /> + <ClCompile Include="source\flbind.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flitem.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flmeth.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flmsg.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flout.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flproxy.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flqueue.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flxlet.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flbuf.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flmap.cpp" /> + <ClCompile Include="source\flsimd.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flsupport.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\fltimer.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flutil.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\fldsp.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="source\flsndobj.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="source\flstk.cpp"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Release|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Shared Release|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Max Threaded Release|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Lockfree Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Shared Release|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='PD Threads Debug|Win32'">true</BrowseInformation> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">true</ExcludedFromBuild> + <Optimization Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PD Threads Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">Disabled</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</BrowseInformation> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">MaxSpeed</Optimization> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PD Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Threads DLL Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Threads DLL Release|Win32'">true</ExcludedFromBuild> + </ClCompile> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file diff --git a/externals/grill/trunk/flext/flext.vcxproj.filters b/externals/grill/trunk/flext/flext.vcxproj.filters new file mode 100644 index 0000000000000000000000000000000000000000..baee4b0cfc92434571ca8398b033bc2aa446a539 --- /dev/null +++ b/externals/grill/trunk/flext/flext.vcxproj.filters @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="doc"> + <UniqueIdentifier>{7bb32839-5f02-403c-8c87-7e23e503da2a}</UniqueIdentifier> + </Filter> + <Filter Include="Atom"> + <UniqueIdentifier>{b6ab6c44-4981-4f6a-8fa4-1f2ffc0474c3}</UniqueIdentifier> + </Filter> + <Filter Include="Base"> + <UniqueIdentifier>{ce32b131-02e3-4f40-9aab-b5bd28ee40cf}</UniqueIdentifier> + </Filter> + <Filter Include="IO"> + <UniqueIdentifier>{9d517a55-ec69-4c90-9e82-92732e07ab47}</UniqueIdentifier> + </Filter> + <Filter Include="Util"> + <UniqueIdentifier>{66c627f0-70f3-4911-a110-237c33382b2a}</UniqueIdentifier> + </Filter> + <Filter Include="Dsp"> + <UniqueIdentifier>{6d4c4e59-0a0c-433e-bcd4-0169cd4602f0}</UniqueIdentifier> + </Filter> + <Filter Include="SndObj"> + <UniqueIdentifier>{b4e9e1cb-00c7-489d-8749-73cb01de4eeb}</UniqueIdentifier> + </Filter> + <Filter Include="STK"> + <UniqueIdentifier>{7f6b80c3-9c73-4206-bc24-0a6b4b6085ec}</UniqueIdentifier> + </Filter> + <Filter Include="Defs"> + <UniqueIdentifier>{123923c9-b45e-4a17-ac4a-84243d328d7d}</UniqueIdentifier> + </Filter> + <Filter Include="build"> + <UniqueIdentifier>{e9163e91-7e58-443e-a593-a0dc70c8e0a9}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <None Include="build.txt"> + <Filter>doc</Filter> + </None> + <None Include="changes.txt"> + <Filter>doc</Filter> + </None> + <None Include="notes.txt"> + <Filter>doc</Filter> + </None> + <None Include="readme.txt"> + <Filter>doc</Filter> + </None> + <None Include="build-max-msvc.bat"> + <Filter>build</Filter> + </None> + <None Include="build-pd-msvc.bat"> + <Filter>build</Filter> + </None> + <None Include="config-max-msvc.txt"> + <Filter>build</Filter> + </None> + <None Include="config-pd-msvc.txt"> + <Filter>build</Filter> + </None> + </ItemGroup> + <ItemGroup> + <ClInclude Include="source\fldoxygen.h"> + <Filter>doc</Filter> + </ClInclude> + <ClInclude Include="source\flbase.h"> + <Filter>Base</Filter> + </ClInclude> + <ClInclude Include="source\flclass.h"> + <Filter>Base</Filter> + </ClInclude> + <ClInclude Include="source\flext.h"> + <Filter>Base</Filter> + </ClInclude> + <ClInclude Include="source\flinternal.h"> + <Filter>Base</Filter> + </ClInclude> + <ClInclude Include="source\flprefix.h"> + <Filter>Base</Filter> + </ClInclude> + <ClInclude Include="source\flstdc.h"> + <Filter>Base</Filter> + </ClInclude> + <ClInclude Include="source\flcontainers.h"> + <Filter>Util</Filter> + </ClInclude> + <ClInclude Include="source\flmap.h"> + <Filter>Util</Filter> + </ClInclude> + <ClInclude Include="source\flmspbuffer.h"> + <Filter>Util</Filter> + </ClInclude> + <ClInclude Include="source\flsupport.h"> + <Filter>Util</Filter> + </ClInclude> + <ClInclude Include="source\fldsp.h"> + <Filter>Dsp</Filter> + </ClInclude> + <ClInclude Include="source\fldefs.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_attradd.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_attrcb.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_attrvar.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_hdr.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_methadd.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_methbind.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_methcall.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_meththr.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_setup.h"> + <Filter>Defs</Filter> + </ClInclude> + <ClInclude Include="source\fldefs_methcb.h"> + <Filter>Defs</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ClCompile Include="source\flatom.cpp"> + <Filter>Atom</Filter> + </ClCompile> + <ClCompile Include="source\flatom_part.cpp"> + <Filter>Atom</Filter> + </ClCompile> + <ClCompile Include="source\flatom_pr.cpp"> + <Filter>Atom</Filter> + </ClCompile> + <ClCompile Include="source\flbase.cpp"> + <Filter>Base</Filter> + </ClCompile> + <ClCompile Include="source\flext.cpp"> + <Filter>Base</Filter> + </ClCompile> + <ClCompile Include="source\fllib.cpp"> + <Filter>Base</Filter> + </ClCompile> + <ClCompile Include="source\flthr.cpp"> + <Filter>Base</Filter> + </ClCompile> + <ClCompile Include="source\flattr.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flattr_ed.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flbind.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flitem.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flmeth.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flmsg.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flout.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flproxy.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flqueue.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flxlet.cpp"> + <Filter>IO</Filter> + </ClCompile> + <ClCompile Include="source\flbuf.cpp"> + <Filter>Util</Filter> + </ClCompile> + <ClCompile Include="source\flmap.cpp"> + <Filter>Util</Filter> + </ClCompile> + <ClCompile Include="source\flsimd.cpp"> + <Filter>Util</Filter> + </ClCompile> + <ClCompile Include="source\flsupport.cpp"> + <Filter>Util</Filter> + </ClCompile> + <ClCompile Include="source\fltimer.cpp"> + <Filter>Util</Filter> + </ClCompile> + <ClCompile Include="source\flutil.cpp"> + <Filter>Util</Filter> + </ClCompile> + <ClCompile Include="source\fldsp.cpp"> + <Filter>Dsp</Filter> + </ClCompile> + <ClCompile Include="source\flsndobj.cpp"> + <Filter>SndObj</Filter> + </ClCompile> + <ClCompile Include="source\flstk.cpp"> + <Filter>STK</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <CustomBuildStep Include="source\flsndobj.h"> + <Filter>SndObj</Filter> + </CustomBuildStep> + <CustomBuildStep Include="source\flstk.h"> + <Filter>STK</Filter> + </CustomBuildStep> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/externals/grill/trunk/flext/flext.xcodeproj/project.pbxproj b/externals/grill/trunk/flext/flext.xcodeproj/project.pbxproj new file mode 100644 index 0000000000000000000000000000000000000000..8bd6ccee2077f9346eef82573944be39b8f6788b --- /dev/null +++ b/externals/grill/trunk/flext/flext.xcodeproj/project.pbxproj @@ -0,0 +1,1513 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + E907FC2F1ACB4EEF003B821A /* vecLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974802077054CD00206F68 /* vecLib.framework */; }; + E95B343B0F40BEE3006336AA /* flpushns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B343A0F40BEE3006336AA /* flpushns.h */; }; + E95B343C0F40BEE3006336AA /* flpushns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B343A0F40BEE3006336AA /* flpushns.h */; }; + E95B343D0F40BEE3006336AA /* flpushns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B343A0F40BEE3006336AA /* flpushns.h */; }; + E95B343E0F40BEE3006336AA /* flpushns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B343A0F40BEE3006336AA /* flpushns.h */; }; + E95B343F0F40BEE3006336AA /* flpushns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B343A0F40BEE3006336AA /* flpushns.h */; }; + E95B34400F40BEE3006336AA /* flpushns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B343A0F40BEE3006336AA /* flpushns.h */; }; + E95B34420F40BEF0006336AA /* flpopns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B34410F40BEF0006336AA /* flpopns.h */; }; + E95B34430F40BEF0006336AA /* flpopns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B34410F40BEF0006336AA /* flpopns.h */; }; + E95B34440F40BEF0006336AA /* flpopns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B34410F40BEF0006336AA /* flpopns.h */; }; + E95B34450F40BEF0006336AA /* flpopns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B34410F40BEF0006336AA /* flpopns.h */; }; + E95B34460F40BEF0006336AA /* flpopns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B34410F40BEF0006336AA /* flpopns.h */; }; + E95B34470F40BEF0006336AA /* flpopns.h in Headers */ = {isa = PBXBuildFile; fileRef = E95B34410F40BEF0006336AA /* flpopns.h */; }; + E99747CE0770548700206F68 /* flatom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7C0383E50201A80AC9 /* flatom.cpp */; }; + E99747D00770548700206F68 /* flatom_part.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66C03CE39F501A80AC9 /* flatom_part.cpp */; }; + E99747D10770548700206F68 /* flatom_pr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7B0383E50201A80AC9 /* flatom_pr.cpp */; }; + E99747D20770548700206F68 /* flattr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7D0383E50201A80AC9 /* flattr.cpp */; }; + E99747D30770548700206F68 /* flattr_ed.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9BDCC4104F4D7C1008929A0 /* flattr_ed.cpp */; }; + E99747D40770548700206F68 /* flbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7E0383E50201A80AC9 /* flbase.cpp */; }; + E99747D50770548700206F68 /* flbind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D263044CC4A001A80AC9 /* flbind.cpp */; }; + E99747D60770548700206F68 /* flbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED800383E50201A80AC9 /* flbuf.cpp */; }; + E99747D70770548700206F68 /* fldsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED880383E50201A80AC9 /* fldsp.cpp */; }; + E99747D80770548700206F68 /* flext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8A0383E50201A80AC9 /* flext.cpp */; }; + E99747D90770548700206F68 /* flitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66D03CE39F501A80AC9 /* flitem.cpp */; }; + E99747DA0770548700206F68 /* fllib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8D0383E50201A80AC9 /* fllib.cpp */; }; + E99747DB0770548700206F68 /* flmeth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66E03CE39F501A80AC9 /* flmeth.cpp */; }; + E99747DC0770548700206F68 /* flmsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66F03CE39F501A80AC9 /* flmsg.cpp */; }; + E99747DD0770548700206F68 /* flout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8F0383E50201A80AC9 /* flout.cpp */; }; + E99747DE0770548700206F68 /* flproxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67103CE39F501A80AC9 /* flproxy.cpp */; }; + E99747DF0770548700206F68 /* flqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67203CE39F501A80AC9 /* flqueue.cpp */; }; + E99747E00770548700206F68 /* flsimd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D264044CC4A001A80AC9 /* flsimd.cpp */; }; + E99747E30770548700206F68 /* flsupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED930383E50201A80AC9 /* flsupport.cpp */; }; + E99747E40770548700206F68 /* flthr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED950383E50201A80AC9 /* flthr.cpp */; }; + E99747E50770548700206F68 /* fltimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5B1FAC8041191190179CFEF /* fltimer.cpp */; }; + E99747E60770548700206F68 /* flutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED960383E50201A80AC9 /* flutil.cpp */; }; + E99747E70770548700206F68 /* flxlet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED970383E50201A80AC9 /* flxlet.cpp */; }; + E99747E80770548F00206F68 /* flbase.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED7F0383E50201A80AC9 /* flbase.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747E90770548F00206F68 /* flclass.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED810383E50201A80AC9 /* flclass.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747EA0770548F00206F68 /* fldefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED860383E50201A80AC9 /* fldefs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747EB0770548F00206F68 /* fldefs_attradd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B804757BC801A0C81C /* fldefs_attradd.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747EC0770548F00206F68 /* fldefs_attrcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B904757BC801A0C81C /* fldefs_attrcb.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747ED0770548F00206F68 /* fldefs_attrvar.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BA04757BC801A0C81C /* fldefs_attrvar.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747EE0770548F00206F68 /* fldefs_hdr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BB04757BC801A0C81C /* fldefs_hdr.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747EF0770548F00206F68 /* fldefs_methadd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BC04757BC801A0C81C /* fldefs_methadd.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F00770548F00206F68 /* fldefs_methbind.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BD04757BC801A0C81C /* fldefs_methbind.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F10770548F00206F68 /* fldefs_methcall.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BE04757BC801A0C81C /* fldefs_methcall.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F20770548F00206F68 /* fldefs_methcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BF04757BC801A0C81C /* fldefs_methcb.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F30770548F00206F68 /* fldefs_meththr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C004757BC801A0C81C /* fldefs_meththr.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F40770548F00206F68 /* fldefs_setup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C104757BC801A0C81C /* fldefs_setup.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F50770548F00206F68 /* fldoxygen.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED870383E50201A80AC9 /* fldoxygen.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F60770548F00206F68 /* fldsp.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED890383E50201A80AC9 /* fldsp.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F70770548F00206F68 /* flext.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8B0383E50201A80AC9 /* flext.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F80770548F00206F68 /* flinternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8C0383E50201A80AC9 /* flinternal.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747F90770548F00206F68 /* flmspbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8E0383E50201A80AC9 /* flmspbuffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747FA0770548F00206F68 /* flprefix.h in Headers */ = {isa = PBXBuildFile; fileRef = F504A67003CE39F501A80AC9 /* flprefix.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747FC0770548F00206F68 /* flstdc.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED920383E50201A80AC9 /* flstdc.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99747FE0770548F00206F68 /* flsupport.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED940383E50201A80AC9 /* flsupport.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E9974803077054CD00206F68 /* vecLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974802077054CD00206F68 /* vecLib.framework */; }; + E997480F0770570800206F68 /* flprefix.h in Headers */ = {isa = PBXBuildFile; fileRef = F504A67003CE39F501A80AC9 /* flprefix.h */; }; + E99748100770570800206F68 /* flbase.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED7F0383E50201A80AC9 /* flbase.h */; }; + E99748110770570800206F68 /* flclass.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED810383E50201A80AC9 /* flclass.h */; }; + E99748120770570800206F68 /* fldoxygen.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED870383E50201A80AC9 /* fldoxygen.h */; }; + E99748130770570800206F68 /* fldsp.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED890383E50201A80AC9 /* fldsp.h */; }; + E99748140770570800206F68 /* flext.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8B0383E50201A80AC9 /* flext.h */; }; + E99748150770570800206F68 /* flinternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8C0383E50201A80AC9 /* flinternal.h */; }; + E99748160770570800206F68 /* flmspbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8E0383E50201A80AC9 /* flmspbuffer.h */; }; + E99748170770570800206F68 /* flstdc.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED920383E50201A80AC9 /* flstdc.h */; }; + E99748180770570800206F68 /* flsupport.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED940383E50201A80AC9 /* flsupport.h */; }; + E99748190770570800206F68 /* fldefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED860383E50201A80AC9 /* fldefs.h */; }; + E997481A0770570800206F68 /* fldefs_attradd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B804757BC801A0C81C /* fldefs_attradd.h */; }; + E997481B0770570800206F68 /* fldefs_attrcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B904757BC801A0C81C /* fldefs_attrcb.h */; }; + E997481C0770570800206F68 /* fldefs_attrvar.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BA04757BC801A0C81C /* fldefs_attrvar.h */; }; + E997481D0770570800206F68 /* fldefs_hdr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BB04757BC801A0C81C /* fldefs_hdr.h */; }; + E997481E0770570800206F68 /* fldefs_methadd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BC04757BC801A0C81C /* fldefs_methadd.h */; }; + E997481F0770570800206F68 /* fldefs_methbind.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BD04757BC801A0C81C /* fldefs_methbind.h */; }; + E99748200770570800206F68 /* fldefs_methcall.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BE04757BC801A0C81C /* fldefs_methcall.h */; }; + E99748210770570800206F68 /* fldefs_methcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BF04757BC801A0C81C /* fldefs_methcb.h */; }; + E99748220770570800206F68 /* fldefs_meththr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C004757BC801A0C81C /* fldefs_meththr.h */; }; + E99748230770570800206F68 /* fldefs_setup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C104757BC801A0C81C /* fldefs_setup.h */; }; + E99748250770570800206F68 /* flatom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7C0383E50201A80AC9 /* flatom.cpp */; }; + E99748270770570800206F68 /* flatom_part.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66C03CE39F501A80AC9 /* flatom_part.cpp */; }; + E99748280770570800206F68 /* flatom_pr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7B0383E50201A80AC9 /* flatom_pr.cpp */; }; + E99748290770570800206F68 /* flattr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7D0383E50201A80AC9 /* flattr.cpp */; }; + E997482A0770570800206F68 /* flattr_ed.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9BDCC4104F4D7C1008929A0 /* flattr_ed.cpp */; }; + E997482B0770570800206F68 /* flbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7E0383E50201A80AC9 /* flbase.cpp */; }; + E997482C0770570800206F68 /* flbind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D263044CC4A001A80AC9 /* flbind.cpp */; }; + E997482D0770570800206F68 /* flbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED800383E50201A80AC9 /* flbuf.cpp */; }; + E997482E0770570800206F68 /* fldsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED880383E50201A80AC9 /* fldsp.cpp */; }; + E997482F0770570800206F68 /* flext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8A0383E50201A80AC9 /* flext.cpp */; }; + E99748300770570800206F68 /* flitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66D03CE39F501A80AC9 /* flitem.cpp */; }; + E99748310770570800206F68 /* fllib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8D0383E50201A80AC9 /* fllib.cpp */; }; + E99748320770570800206F68 /* flmeth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66E03CE39F501A80AC9 /* flmeth.cpp */; }; + E99748330770570800206F68 /* flmsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66F03CE39F501A80AC9 /* flmsg.cpp */; }; + E99748340770570800206F68 /* flout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8F0383E50201A80AC9 /* flout.cpp */; }; + E99748350770570800206F68 /* flproxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67103CE39F501A80AC9 /* flproxy.cpp */; }; + E99748360770570800206F68 /* flqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67203CE39F501A80AC9 /* flqueue.cpp */; }; + E99748370770570800206F68 /* flsimd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D264044CC4A001A80AC9 /* flsimd.cpp */; }; + E99748380770570800206F68 /* flsupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED930383E50201A80AC9 /* flsupport.cpp */; }; + E99748390770570800206F68 /* flthr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED950383E50201A80AC9 /* flthr.cpp */; }; + E997483A0770570800206F68 /* fltimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5B1FAC8041191190179CFEF /* fltimer.cpp */; }; + E997483B0770570800206F68 /* flutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED960383E50201A80AC9 /* flutil.cpp */; }; + E997483C0770570800206F68 /* flxlet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED970383E50201A80AC9 /* flxlet.cpp */; }; + E997483E0770570800206F68 /* vecLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974802077054CD00206F68 /* vecLib.framework */; }; + E997488C0770593C00206F68 /* flatom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7C0383E50201A80AC9 /* flatom.cpp */; }; + E997488E0770593C00206F68 /* flatom_part.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66C03CE39F501A80AC9 /* flatom_part.cpp */; }; + E997488F0770593C00206F68 /* flatom_pr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7B0383E50201A80AC9 /* flatom_pr.cpp */; }; + E99748900770593C00206F68 /* flattr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7D0383E50201A80AC9 /* flattr.cpp */; }; + E99748910770593C00206F68 /* flattr_ed.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9BDCC4104F4D7C1008929A0 /* flattr_ed.cpp */; }; + E99748920770593C00206F68 /* flbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7E0383E50201A80AC9 /* flbase.cpp */; }; + E99748930770593C00206F68 /* flbind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D263044CC4A001A80AC9 /* flbind.cpp */; }; + E99748940770593C00206F68 /* flbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED800383E50201A80AC9 /* flbuf.cpp */; }; + E99748950770593C00206F68 /* fldsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED880383E50201A80AC9 /* fldsp.cpp */; }; + E99748960770593C00206F68 /* flext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8A0383E50201A80AC9 /* flext.cpp */; }; + E99748970770593C00206F68 /* flitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66D03CE39F501A80AC9 /* flitem.cpp */; }; + E99748980770593C00206F68 /* fllib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8D0383E50201A80AC9 /* fllib.cpp */; }; + E99748990770593C00206F68 /* flmeth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66E03CE39F501A80AC9 /* flmeth.cpp */; }; + E997489A0770593C00206F68 /* flmsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66F03CE39F501A80AC9 /* flmsg.cpp */; }; + E997489B0770593C00206F68 /* flout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8F0383E50201A80AC9 /* flout.cpp */; }; + E997489C0770593C00206F68 /* flproxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67103CE39F501A80AC9 /* flproxy.cpp */; }; + E997489D0770593C00206F68 /* flqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67203CE39F501A80AC9 /* flqueue.cpp */; }; + E997489E0770593C00206F68 /* flsimd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D264044CC4A001A80AC9 /* flsimd.cpp */; }; + E997489F0770593C00206F68 /* flsupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED930383E50201A80AC9 /* flsupport.cpp */; }; + E99748A00770593C00206F68 /* flthr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED950383E50201A80AC9 /* flthr.cpp */; }; + E99748A10770593C00206F68 /* fltimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5B1FAC8041191190179CFEF /* fltimer.cpp */; }; + E99748A20770593C00206F68 /* flutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED960383E50201A80AC9 /* flutil.cpp */; }; + E99748A30770593C00206F68 /* flxlet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED970383E50201A80AC9 /* flxlet.cpp */; }; + E99748A40770595500206F68 /* flprefix.h in Headers */ = {isa = PBXBuildFile; fileRef = F504A67003CE39F501A80AC9 /* flprefix.h */; }; + E99748A50770595500206F68 /* flbase.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED7F0383E50201A80AC9 /* flbase.h */; }; + E99748A60770595500206F68 /* flclass.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED810383E50201A80AC9 /* flclass.h */; }; + E99748A70770595500206F68 /* fldoxygen.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED870383E50201A80AC9 /* fldoxygen.h */; }; + E99748A80770595500206F68 /* fldsp.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED890383E50201A80AC9 /* fldsp.h */; }; + E99748A90770595600206F68 /* flext.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8B0383E50201A80AC9 /* flext.h */; }; + E99748AA0770595600206F68 /* flinternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8C0383E50201A80AC9 /* flinternal.h */; }; + E99748AB0770595600206F68 /* flmspbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8E0383E50201A80AC9 /* flmspbuffer.h */; }; + E99748AC0770595600206F68 /* flsndobj.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED910383E50201A80AC9 /* flsndobj.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99748AD0770595600206F68 /* flstdc.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED920383E50201A80AC9 /* flstdc.h */; }; + E99748AE0770595600206F68 /* flsupport.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED940383E50201A80AC9 /* flsupport.h */; }; + E99748AF0770595600206F68 /* flstk.h in Headers */ = {isa = PBXBuildFile; fileRef = F504A67403CE39F501A80AC9 /* flstk.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E99748B00770595E00206F68 /* fldefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED860383E50201A80AC9 /* fldefs.h */; }; + E99748B10770595E00206F68 /* fldefs_attradd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B804757BC801A0C81C /* fldefs_attradd.h */; }; + E99748B20770595E00206F68 /* fldefs_attrcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B904757BC801A0C81C /* fldefs_attrcb.h */; }; + E99748B30770595E00206F68 /* fldefs_attrvar.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BA04757BC801A0C81C /* fldefs_attrvar.h */; }; + E99748B40770595E00206F68 /* fldefs_hdr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BB04757BC801A0C81C /* fldefs_hdr.h */; }; + E99748B50770595E00206F68 /* fldefs_methadd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BC04757BC801A0C81C /* fldefs_methadd.h */; }; + E99748B60770595E00206F68 /* fldefs_methbind.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BD04757BC801A0C81C /* fldefs_methbind.h */; }; + E99748B70770595E00206F68 /* fldefs_methcall.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BE04757BC801A0C81C /* fldefs_methcall.h */; }; + E99748B80770595E00206F68 /* fldefs_methcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BF04757BC801A0C81C /* fldefs_methcb.h */; }; + E99748B90770595E00206F68 /* fldefs_meththr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C004757BC801A0C81C /* fldefs_meththr.h */; }; + E99748BA0770595E00206F68 /* fldefs_setup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C104757BC801A0C81C /* fldefs_setup.h */; }; + E99748D107705BAF00206F68 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E99748D007705BAF00206F68 /* ApplicationServices.framework */; }; + E997498E07705CC400206F68 /* flprefix.h in Headers */ = {isa = PBXBuildFile; fileRef = F504A67003CE39F501A80AC9 /* flprefix.h */; }; + E997498F07705CC400206F68 /* flbase.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED7F0383E50201A80AC9 /* flbase.h */; }; + E997499007705CC400206F68 /* flclass.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED810383E50201A80AC9 /* flclass.h */; }; + E997499107705CC400206F68 /* fldoxygen.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED870383E50201A80AC9 /* fldoxygen.h */; }; + E997499207705CC400206F68 /* fldsp.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED890383E50201A80AC9 /* fldsp.h */; }; + E997499307705CC400206F68 /* flext.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8B0383E50201A80AC9 /* flext.h */; }; + E997499407705CC400206F68 /* flinternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8C0383E50201A80AC9 /* flinternal.h */; }; + E997499507705CC400206F68 /* flmspbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8E0383E50201A80AC9 /* flmspbuffer.h */; }; + E997499607705CC400206F68 /* flstdc.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED920383E50201A80AC9 /* flstdc.h */; }; + E997499707705CC400206F68 /* flsupport.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED940383E50201A80AC9 /* flsupport.h */; }; + E997499807705CC400206F68 /* fldefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED860383E50201A80AC9 /* fldefs.h */; }; + E997499907705CC400206F68 /* fldefs_attradd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B804757BC801A0C81C /* fldefs_attradd.h */; }; + E997499A07705CC400206F68 /* fldefs_attrcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B904757BC801A0C81C /* fldefs_attrcb.h */; }; + E997499B07705CC400206F68 /* fldefs_attrvar.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BA04757BC801A0C81C /* fldefs_attrvar.h */; }; + E997499C07705CC400206F68 /* fldefs_hdr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BB04757BC801A0C81C /* fldefs_hdr.h */; }; + E997499D07705CC400206F68 /* fldefs_methadd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BC04757BC801A0C81C /* fldefs_methadd.h */; }; + E997499E07705CC400206F68 /* fldefs_methbind.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BD04757BC801A0C81C /* fldefs_methbind.h */; }; + E997499F07705CC400206F68 /* fldefs_methcall.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BE04757BC801A0C81C /* fldefs_methcall.h */; }; + E99749A007705CC400206F68 /* fldefs_methcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BF04757BC801A0C81C /* fldefs_methcb.h */; }; + E99749A107705CC400206F68 /* fldefs_meththr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C004757BC801A0C81C /* fldefs_meththr.h */; }; + E99749A207705CC400206F68 /* fldefs_setup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C104757BC801A0C81C /* fldefs_setup.h */; }; + E99749A407705CC400206F68 /* flatom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7C0383E50201A80AC9 /* flatom.cpp */; }; + E99749A607705CC400206F68 /* flatom_part.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66C03CE39F501A80AC9 /* flatom_part.cpp */; }; + E99749A707705CC400206F68 /* flatom_pr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7B0383E50201A80AC9 /* flatom_pr.cpp */; }; + E99749A807705CC400206F68 /* flattr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7D0383E50201A80AC9 /* flattr.cpp */; }; + E99749A907705CC400206F68 /* flattr_ed.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9BDCC4104F4D7C1008929A0 /* flattr_ed.cpp */; }; + E99749AA07705CC400206F68 /* flbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7E0383E50201A80AC9 /* flbase.cpp */; }; + E99749AB07705CC400206F68 /* flbind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D263044CC4A001A80AC9 /* flbind.cpp */; }; + E99749AC07705CC400206F68 /* flbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED800383E50201A80AC9 /* flbuf.cpp */; }; + E99749AD07705CC400206F68 /* fldsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED880383E50201A80AC9 /* fldsp.cpp */; }; + E99749AE07705CC400206F68 /* flext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8A0383E50201A80AC9 /* flext.cpp */; }; + E99749AF07705CC400206F68 /* flitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66D03CE39F501A80AC9 /* flitem.cpp */; }; + E99749B007705CC400206F68 /* fllib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8D0383E50201A80AC9 /* fllib.cpp */; }; + E99749B107705CC400206F68 /* flmeth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66E03CE39F501A80AC9 /* flmeth.cpp */; }; + E99749B207705CC400206F68 /* flmsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66F03CE39F501A80AC9 /* flmsg.cpp */; }; + E99749B307705CC400206F68 /* flout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8F0383E50201A80AC9 /* flout.cpp */; }; + E99749B407705CC400206F68 /* flproxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67103CE39F501A80AC9 /* flproxy.cpp */; }; + E99749B507705CC400206F68 /* flqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67203CE39F501A80AC9 /* flqueue.cpp */; }; + E99749B607705CC400206F68 /* flsimd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D264044CC4A001A80AC9 /* flsimd.cpp */; }; + E99749B707705CC400206F68 /* flsupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED930383E50201A80AC9 /* flsupport.cpp */; }; + E99749B807705CC400206F68 /* flthr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED950383E50201A80AC9 /* flthr.cpp */; }; + E99749B907705CC400206F68 /* fltimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5B1FAC8041191190179CFEF /* fltimer.cpp */; }; + E99749BA07705CC400206F68 /* flutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED960383E50201A80AC9 /* flutil.cpp */; }; + E99749BB07705CC400206F68 /* flxlet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED970383E50201A80AC9 /* flxlet.cpp */; }; + E99749BD07705CC400206F68 /* vecLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974802077054CD00206F68 /* vecLib.framework */; }; + E9974B9407705F1400206F68 /* flprefix.h in Headers */ = {isa = PBXBuildFile; fileRef = F504A67003CE39F501A80AC9 /* flprefix.h */; }; + E9974B9507705F1400206F68 /* flbase.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED7F0383E50201A80AC9 /* flbase.h */; }; + E9974B9607705F1400206F68 /* flclass.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED810383E50201A80AC9 /* flclass.h */; }; + E9974B9707705F1400206F68 /* fldoxygen.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED870383E50201A80AC9 /* fldoxygen.h */; }; + E9974B9807705F1400206F68 /* fldsp.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED890383E50201A80AC9 /* fldsp.h */; }; + E9974B9907705F1400206F68 /* flext.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8B0383E50201A80AC9 /* flext.h */; }; + E9974B9A07705F1400206F68 /* flinternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8C0383E50201A80AC9 /* flinternal.h */; }; + E9974B9B07705F1400206F68 /* flmspbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8E0383E50201A80AC9 /* flmspbuffer.h */; }; + E9974B9C07705F1400206F68 /* flstdc.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED920383E50201A80AC9 /* flstdc.h */; }; + E9974B9D07705F1400206F68 /* flsupport.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED940383E50201A80AC9 /* flsupport.h */; }; + E9974B9E07705F1400206F68 /* fldefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED860383E50201A80AC9 /* fldefs.h */; }; + E9974B9F07705F1400206F68 /* fldefs_attradd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B804757BC801A0C81C /* fldefs_attradd.h */; }; + E9974BA007705F1400206F68 /* fldefs_attrcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B904757BC801A0C81C /* fldefs_attrcb.h */; }; + E9974BA107705F1400206F68 /* fldefs_attrvar.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BA04757BC801A0C81C /* fldefs_attrvar.h */; }; + E9974BA207705F1400206F68 /* fldefs_hdr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BB04757BC801A0C81C /* fldefs_hdr.h */; }; + E9974BA307705F1400206F68 /* fldefs_methadd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BC04757BC801A0C81C /* fldefs_methadd.h */; }; + E9974BA407705F1400206F68 /* fldefs_methbind.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BD04757BC801A0C81C /* fldefs_methbind.h */; }; + E9974BA507705F1400206F68 /* fldefs_methcall.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BE04757BC801A0C81C /* fldefs_methcall.h */; }; + E9974BA607705F1400206F68 /* fldefs_methcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BF04757BC801A0C81C /* fldefs_methcb.h */; }; + E9974BA707705F1400206F68 /* fldefs_meththr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C004757BC801A0C81C /* fldefs_meththr.h */; }; + E9974BA807705F1400206F68 /* fldefs_setup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C104757BC801A0C81C /* fldefs_setup.h */; }; + E9974BAA07705F1400206F68 /* flatom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7C0383E50201A80AC9 /* flatom.cpp */; }; + E9974BAC07705F1400206F68 /* flatom_part.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66C03CE39F501A80AC9 /* flatom_part.cpp */; }; + E9974BAD07705F1400206F68 /* flatom_pr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7B0383E50201A80AC9 /* flatom_pr.cpp */; }; + E9974BAE07705F1400206F68 /* flattr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7D0383E50201A80AC9 /* flattr.cpp */; }; + E9974BAF07705F1400206F68 /* flattr_ed.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9BDCC4104F4D7C1008929A0 /* flattr_ed.cpp */; }; + E9974BB007705F1400206F68 /* flbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7E0383E50201A80AC9 /* flbase.cpp */; }; + E9974BB107705F1400206F68 /* flbind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D263044CC4A001A80AC9 /* flbind.cpp */; }; + E9974BB207705F1400206F68 /* flbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED800383E50201A80AC9 /* flbuf.cpp */; }; + E9974BB307705F1400206F68 /* fldsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED880383E50201A80AC9 /* fldsp.cpp */; }; + E9974BB407705F1400206F68 /* flext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8A0383E50201A80AC9 /* flext.cpp */; }; + E9974BB507705F1400206F68 /* flitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66D03CE39F501A80AC9 /* flitem.cpp */; }; + E9974BB607705F1400206F68 /* fllib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8D0383E50201A80AC9 /* fllib.cpp */; }; + E9974BB707705F1400206F68 /* flmeth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66E03CE39F501A80AC9 /* flmeth.cpp */; }; + E9974BB807705F1400206F68 /* flmsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66F03CE39F501A80AC9 /* flmsg.cpp */; }; + E9974BB907705F1400206F68 /* flout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8F0383E50201A80AC9 /* flout.cpp */; }; + E9974BBA07705F1400206F68 /* flproxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67103CE39F501A80AC9 /* flproxy.cpp */; }; + E9974BBB07705F1400206F68 /* flqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67203CE39F501A80AC9 /* flqueue.cpp */; }; + E9974BBC07705F1400206F68 /* flsimd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D264044CC4A001A80AC9 /* flsimd.cpp */; }; + E9974BBD07705F1400206F68 /* flsupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED930383E50201A80AC9 /* flsupport.cpp */; }; + E9974BBE07705F1400206F68 /* flthr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED950383E50201A80AC9 /* flthr.cpp */; }; + E9974BBF07705F1400206F68 /* fltimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5B1FAC8041191190179CFEF /* fltimer.cpp */; }; + E9974BC007705F1400206F68 /* flutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED960383E50201A80AC9 /* flutil.cpp */; }; + E9974BC107705F1400206F68 /* flxlet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED970383E50201A80AC9 /* flxlet.cpp */; }; + E9974BC307705F1400206F68 /* vecLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974802077054CD00206F68 /* vecLib.framework */; }; + E9974BC707705F4F00206F68 /* fldefs.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED860383E50201A80AC9 /* fldefs.h */; }; + E9974BC807705F4F00206F68 /* fldefs_attradd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B804757BC801A0C81C /* fldefs_attradd.h */; }; + E9974BC907705F4F00206F68 /* fldefs_attrcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5B904757BC801A0C81C /* fldefs_attrcb.h */; }; + E9974BCA07705F4F00206F68 /* fldefs_attrvar.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BA04757BC801A0C81C /* fldefs_attrvar.h */; }; + E9974BCB07705F4F00206F68 /* fldefs_hdr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BB04757BC801A0C81C /* fldefs_hdr.h */; }; + E9974BCC07705F4F00206F68 /* fldefs_methadd.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BC04757BC801A0C81C /* fldefs_methadd.h */; }; + E9974BCD07705F4F00206F68 /* fldefs_methbind.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BD04757BC801A0C81C /* fldefs_methbind.h */; }; + E9974BCE07705F4F00206F68 /* fldefs_methcall.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BE04757BC801A0C81C /* fldefs_methcall.h */; }; + E9974BCF07705F4F00206F68 /* fldefs_methcb.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5BF04757BC801A0C81C /* fldefs_methcb.h */; }; + E9974BD007705F4F00206F68 /* fldefs_meththr.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C004757BC801A0C81C /* fldefs_meththr.h */; }; + E9974BD107705F4F00206F68 /* fldefs_setup.h in Headers */ = {isa = PBXBuildFile; fileRef = F5CBC5C104757BC801A0C81C /* fldefs_setup.h */; }; + E9974BD207705F4F00206F68 /* flprefix.h in Headers */ = {isa = PBXBuildFile; fileRef = F504A67003CE39F501A80AC9 /* flprefix.h */; }; + E9974BD307705F4F00206F68 /* flbase.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED7F0383E50201A80AC9 /* flbase.h */; }; + E9974BD407705F4F00206F68 /* flclass.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED810383E50201A80AC9 /* flclass.h */; }; + E9974BD507705F4F00206F68 /* fldoxygen.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED870383E50201A80AC9 /* fldoxygen.h */; }; + E9974BD607705F4F00206F68 /* fldsp.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED890383E50201A80AC9 /* fldsp.h */; }; + E9974BD707705F4F00206F68 /* flext.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8B0383E50201A80AC9 /* flext.h */; }; + E9974BD807705F4F00206F68 /* flinternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8C0383E50201A80AC9 /* flinternal.h */; }; + E9974BD907705F4F00206F68 /* flmspbuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED8E0383E50201A80AC9 /* flmspbuffer.h */; }; + E9974BDA07705F4F00206F68 /* flsndobj.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED910383E50201A80AC9 /* flsndobj.h */; }; + E9974BDB07705F4F00206F68 /* flstdc.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED920383E50201A80AC9 /* flstdc.h */; }; + E9974BDC07705F4F00206F68 /* flsupport.h in Headers */ = {isa = PBXBuildFile; fileRef = F55CED940383E50201A80AC9 /* flsupport.h */; }; + E9974BDD07705F4F00206F68 /* flstk.h in Headers */ = {isa = PBXBuildFile; fileRef = F504A67403CE39F501A80AC9 /* flstk.h */; }; + E9974BDF07705F4F00206F68 /* flatom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7C0383E50201A80AC9 /* flatom.cpp */; }; + E9974BE107705F4F00206F68 /* flatom_part.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66C03CE39F501A80AC9 /* flatom_part.cpp */; }; + E9974BE207705F4F00206F68 /* flatom_pr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7B0383E50201A80AC9 /* flatom_pr.cpp */; }; + E9974BE307705F4F00206F68 /* flattr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7D0383E50201A80AC9 /* flattr.cpp */; }; + E9974BE407705F4F00206F68 /* flattr_ed.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9BDCC4104F4D7C1008929A0 /* flattr_ed.cpp */; }; + E9974BE507705F4F00206F68 /* flbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED7E0383E50201A80AC9 /* flbase.cpp */; }; + E9974BE607705F4F00206F68 /* flbind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D263044CC4A001A80AC9 /* flbind.cpp */; }; + E9974BE707705F4F00206F68 /* flbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED800383E50201A80AC9 /* flbuf.cpp */; }; + E9974BE807705F4F00206F68 /* fldsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED880383E50201A80AC9 /* fldsp.cpp */; }; + E9974BE907705F4F00206F68 /* flext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8A0383E50201A80AC9 /* flext.cpp */; }; + E9974BEA07705F4F00206F68 /* flitem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66D03CE39F501A80AC9 /* flitem.cpp */; }; + E9974BEB07705F4F00206F68 /* fllib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8D0383E50201A80AC9 /* fllib.cpp */; }; + E9974BEC07705F4F00206F68 /* flmeth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66E03CE39F501A80AC9 /* flmeth.cpp */; }; + E9974BED07705F4F00206F68 /* flmsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A66F03CE39F501A80AC9 /* flmsg.cpp */; }; + E9974BEE07705F4F00206F68 /* flout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED8F0383E50201A80AC9 /* flout.cpp */; }; + E9974BEF07705F4F00206F68 /* flproxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67103CE39F501A80AC9 /* flproxy.cpp */; }; + E9974BF007705F4F00206F68 /* flqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F504A67203CE39F501A80AC9 /* flqueue.cpp */; }; + E9974BF107705F4F00206F68 /* flsimd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F598D264044CC4A001A80AC9 /* flsimd.cpp */; }; + E9974BF207705F4F00206F68 /* flsupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED930383E50201A80AC9 /* flsupport.cpp */; }; + E9974BF307705F4F00206F68 /* flthr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED950383E50201A80AC9 /* flthr.cpp */; }; + E9974BF407705F4F00206F68 /* fltimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5B1FAC8041191190179CFEF /* fltimer.cpp */; }; + E9974BF507705F4F00206F68 /* flutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED960383E50201A80AC9 /* flutil.cpp */; }; + E9974BF607705F4F00206F68 /* flxlet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55CED970383E50201A80AC9 /* flxlet.cpp */; }; + E9974BF807705F4F00206F68 /* vecLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974802077054CD00206F68 /* vecLib.framework */; }; + E9974BF907705F4F00206F68 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E99748D007705BAF00206F68 /* ApplicationServices.framework */; }; + E9974E160770780D00206F68 /* MaxAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974E140770780D00206F68 /* MaxAPI.framework */; }; + E9974E170770780D00206F68 /* MaxAudioAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974E150770780D00206F68 /* MaxAudioAPI.framework */; }; + E9974E180770780D00206F68 /* MaxAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974E140770780D00206F68 /* MaxAPI.framework */; }; + E9974E190770780D00206F68 /* MaxAudioAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974E150770780D00206F68 /* MaxAudioAPI.framework */; }; + E9974E1A0770780D00206F68 /* MaxAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974E140770780D00206F68 /* MaxAPI.framework */; }; + E9974E1B0770780D00206F68 /* MaxAudioAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9974E150770780D00206F68 /* MaxAudioAPI.framework */; }; + E99A3D920D35903A00E692EF /* atomic_int.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8B0D35903A00E692EF /* atomic_int.hpp */; }; + E99A3D930D35903A00E692EF /* atomic_ptr.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8C0D35903A00E692EF /* atomic_ptr.hpp */; }; + E99A3D940D35903A00E692EF /* branch_hints.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8D0D35903A00E692EF /* branch_hints.hpp */; }; + E99A3D950D35903A00E692EF /* cas.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8E0D35903A00E692EF /* cas.hpp */; }; + E99A3D960D35903A00E692EF /* fifo.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8F0D35903A00E692EF /* fifo.hpp */; }; + E99A3D970D35903A00E692EF /* prefix.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D900D35903A00E692EF /* prefix.hpp */; }; + E99A3D980D35903A00E692EF /* stack.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D910D35903A00E692EF /* stack.hpp */; }; + E99A3D990D35903A00E692EF /* atomic_int.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8B0D35903A00E692EF /* atomic_int.hpp */; }; + E99A3D9A0D35903A00E692EF /* atomic_ptr.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8C0D35903A00E692EF /* atomic_ptr.hpp */; }; + E99A3D9B0D35903A00E692EF /* branch_hints.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8D0D35903A00E692EF /* branch_hints.hpp */; }; + E99A3D9C0D35903A00E692EF /* cas.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8E0D35903A00E692EF /* cas.hpp */; }; + E99A3D9D0D35903A00E692EF /* fifo.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8F0D35903A00E692EF /* fifo.hpp */; }; + E99A3D9E0D35903A00E692EF /* prefix.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D900D35903A00E692EF /* prefix.hpp */; }; + E99A3D9F0D35903A00E692EF /* stack.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D910D35903A00E692EF /* stack.hpp */; }; + E99A3DA00D35903A00E692EF /* atomic_int.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8B0D35903A00E692EF /* atomic_int.hpp */; }; + E99A3DA10D35903A00E692EF /* atomic_ptr.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8C0D35903A00E692EF /* atomic_ptr.hpp */; }; + E99A3DA20D35903A00E692EF /* branch_hints.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8D0D35903A00E692EF /* branch_hints.hpp */; }; + E99A3DA30D35903A00E692EF /* cas.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8E0D35903A00E692EF /* cas.hpp */; }; + E99A3DA40D35903A00E692EF /* fifo.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8F0D35903A00E692EF /* fifo.hpp */; }; + E99A3DA50D35903A00E692EF /* prefix.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D900D35903A00E692EF /* prefix.hpp */; }; + E99A3DA60D35903A00E692EF /* stack.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D910D35903A00E692EF /* stack.hpp */; }; + E99A3DA70D35903A00E692EF /* atomic_int.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8B0D35903A00E692EF /* atomic_int.hpp */; }; + E99A3DA80D35903A00E692EF /* atomic_ptr.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8C0D35903A00E692EF /* atomic_ptr.hpp */; }; + E99A3DA90D35903A00E692EF /* branch_hints.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8D0D35903A00E692EF /* branch_hints.hpp */; }; + E99A3DAA0D35903A00E692EF /* cas.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8E0D35903A00E692EF /* cas.hpp */; }; + E99A3DAB0D35903A00E692EF /* fifo.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8F0D35903A00E692EF /* fifo.hpp */; }; + E99A3DAC0D35903A00E692EF /* prefix.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D900D35903A00E692EF /* prefix.hpp */; }; + E99A3DAD0D35903A00E692EF /* stack.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D910D35903A00E692EF /* stack.hpp */; }; + E99A3DAE0D35903A00E692EF /* atomic_int.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8B0D35903A00E692EF /* atomic_int.hpp */; }; + E99A3DAF0D35903A00E692EF /* atomic_ptr.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8C0D35903A00E692EF /* atomic_ptr.hpp */; }; + E99A3DB00D35903A00E692EF /* branch_hints.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8D0D35903A00E692EF /* branch_hints.hpp */; }; + E99A3DB10D35903A00E692EF /* cas.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8E0D35903A00E692EF /* cas.hpp */; }; + E99A3DB20D35903A00E692EF /* fifo.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8F0D35903A00E692EF /* fifo.hpp */; }; + E99A3DB30D35903A00E692EF /* prefix.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D900D35903A00E692EF /* prefix.hpp */; }; + E99A3DB40D35903A00E692EF /* stack.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D910D35903A00E692EF /* stack.hpp */; }; + E99A3DB50D35903A00E692EF /* atomic_int.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8B0D35903A00E692EF /* atomic_int.hpp */; }; + E99A3DB60D35903A00E692EF /* atomic_ptr.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8C0D35903A00E692EF /* atomic_ptr.hpp */; }; + E99A3DB70D35903A00E692EF /* branch_hints.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8D0D35903A00E692EF /* branch_hints.hpp */; }; + E99A3DB80D35903A00E692EF /* cas.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8E0D35903A00E692EF /* cas.hpp */; }; + E99A3DB90D35903A00E692EF /* fifo.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D8F0D35903A00E692EF /* fifo.hpp */; }; + E99A3DBA0D35903A00E692EF /* prefix.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D900D35903A00E692EF /* prefix.hpp */; }; + E99A3DBB0D35903A00E692EF /* stack.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E99A3D910D35903A00E692EF /* stack.hpp */; }; + E99A3DCF0D3592AB00E692EF /* flmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E99A3DCE0D3592AB00E692EF /* flmap.cpp */; }; + E99A3DD00D3592AB00E692EF /* flmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E99A3DCE0D3592AB00E692EF /* flmap.cpp */; }; + E99A3DD10D3592AB00E692EF /* flmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E99A3DCE0D3592AB00E692EF /* flmap.cpp */; }; + E99A3DD20D3592AB00E692EF /* flmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E99A3DCE0D3592AB00E692EF /* flmap.cpp */; }; + E99A3DD30D3592AB00E692EF /* flmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E99A3DCE0D3592AB00E692EF /* flmap.cpp */; }; + E99A3DD40D3592AB00E692EF /* flmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E99A3DCE0D3592AB00E692EF /* flmap.cpp */; }; + E99A3DD80D3592D100E692EF /* flcontainers.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD50D3592D100E692EF /* flcontainers.h */; }; + E99A3DD90D3592D100E692EF /* flfeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD60D3592D100E692EF /* flfeatures.h */; }; + E99A3DDA0D3592D100E692EF /* flmap.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD70D3592D100E692EF /* flmap.h */; }; + E99A3DDB0D3592D100E692EF /* flcontainers.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD50D3592D100E692EF /* flcontainers.h */; }; + E99A3DDC0D3592D100E692EF /* flfeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD60D3592D100E692EF /* flfeatures.h */; }; + E99A3DDD0D3592D100E692EF /* flmap.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD70D3592D100E692EF /* flmap.h */; }; + E99A3DDE0D3592D100E692EF /* flcontainers.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD50D3592D100E692EF /* flcontainers.h */; }; + E99A3DDF0D3592D100E692EF /* flfeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD60D3592D100E692EF /* flfeatures.h */; }; + E99A3DE00D3592D100E692EF /* flmap.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD70D3592D100E692EF /* flmap.h */; }; + E99A3DE10D3592D100E692EF /* flcontainers.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD50D3592D100E692EF /* flcontainers.h */; }; + E99A3DE20D3592D100E692EF /* flfeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD60D3592D100E692EF /* flfeatures.h */; }; + E99A3DE30D3592D100E692EF /* flmap.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD70D3592D100E692EF /* flmap.h */; }; + E99A3DE40D3592D100E692EF /* flcontainers.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD50D3592D100E692EF /* flcontainers.h */; }; + E99A3DE50D3592D100E692EF /* flfeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD60D3592D100E692EF /* flfeatures.h */; }; + E99A3DE60D3592D100E692EF /* flmap.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD70D3592D100E692EF /* flmap.h */; }; + E99A3DE70D3592D100E692EF /* flcontainers.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD50D3592D100E692EF /* flcontainers.h */; }; + E99A3DE80D3592D100E692EF /* flfeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD60D3592D100E692EF /* flfeatures.h */; }; + E99A3DE90D3592D100E692EF /* flmap.h in Headers */ = {isa = PBXBuildFile; fileRef = E99A3DD70D3592D100E692EF /* flmap.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + E95B343A0F40BEE3006336AA /* flpushns.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = flpushns.h; sourceTree = "<group>"; }; + E95B34410F40BEF0006336AA /* flpopns.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = flpopns.h; sourceTree = "<group>"; }; + E99747CD0770545100206F68 /* libflext-pd_sd.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libflext-pd_sd.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E9974802077054CD00206F68 /* vecLib.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vecLib.framework; path = /System/Library/Frameworks/vecLib.framework; sourceTree = "<absolute>"; }; + E997483F0770570800206F68 /* libflext-pd_td.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libflext-pd_td.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E9974886077058C100206F68 /* libflext-pd_d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libflext-pd_d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + E99748D007705BAF00206F68 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; + E99749BE07705CC400206F68 /* libflext-max_sd.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libflext-max_sd.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E9974BC407705F1400206F68 /* libflext-max_td.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libflext-max_td.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E9974BFA07705F4F00206F68 /* libflext-max_d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libflext-max_d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + E9974E140770780D00206F68 /* MaxAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MaxAPI.framework; path = /Library/Frameworks/MaxAPI.framework; sourceTree = "<absolute>"; }; + E9974E150770780D00206F68 /* MaxAudioAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MaxAudioAPI.framework; path = /Library/Frameworks/MaxAudioAPI.framework; sourceTree = "<absolute>"; }; + E99A3D8B0D35903A00E692EF /* atomic_int.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = atomic_int.hpp; sourceTree = "<group>"; }; + E99A3D8C0D35903A00E692EF /* atomic_ptr.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = atomic_ptr.hpp; sourceTree = "<group>"; }; + E99A3D8D0D35903A00E692EF /* branch_hints.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = branch_hints.hpp; sourceTree = "<group>"; }; + E99A3D8E0D35903A00E692EF /* cas.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = cas.hpp; sourceTree = "<group>"; }; + E99A3D8F0D35903A00E692EF /* fifo.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = fifo.hpp; sourceTree = "<group>"; }; + E99A3D900D35903A00E692EF /* prefix.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = prefix.hpp; sourceTree = "<group>"; }; + E99A3D910D35903A00E692EF /* stack.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = stack.hpp; sourceTree = "<group>"; }; + E99A3DCE0D3592AB00E692EF /* flmap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flmap.cpp; path = source/flmap.cpp; sourceTree = "<group>"; }; + E99A3DD50D3592D100E692EF /* flcontainers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flcontainers.h; sourceTree = "<group>"; }; + E99A3DD60D3592D100E692EF /* flfeatures.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flfeatures.h; sourceTree = "<group>"; }; + E99A3DD70D3592D100E692EF /* flmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flmap.h; sourceTree = "<group>"; }; + E9BDCC4104F4D7C1008929A0 /* flattr_ed.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flattr_ed.cpp; path = source/flattr_ed.cpp; sourceTree = "<group>"; }; + F504A66C03CE39F501A80AC9 /* flatom_part.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flatom_part.cpp; path = source/flatom_part.cpp; sourceTree = "<group>"; }; + F504A66D03CE39F501A80AC9 /* flitem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flitem.cpp; path = source/flitem.cpp; sourceTree = "<group>"; }; + F504A66E03CE39F501A80AC9 /* flmeth.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flmeth.cpp; path = source/flmeth.cpp; sourceTree = "<group>"; }; + F504A66F03CE39F501A80AC9 /* flmsg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flmsg.cpp; path = source/flmsg.cpp; sourceTree = "<group>"; }; + F504A67003CE39F501A80AC9 /* flprefix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flprefix.h; sourceTree = "<group>"; }; + F504A67103CE39F501A80AC9 /* flproxy.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flproxy.cpp; path = source/flproxy.cpp; sourceTree = "<group>"; }; + F504A67203CE39F501A80AC9 /* flqueue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flqueue.cpp; path = source/flqueue.cpp; sourceTree = "<group>"; }; + F504A67303CE39F501A80AC9 /* flstk.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flstk.cpp; path = source/flstk.cpp; sourceTree = "<group>"; }; + F504A67403CE39F501A80AC9 /* flstk.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flstk.h; sourceTree = "<group>"; }; + F55CED7B0383E50201A80AC9 /* flatom_pr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flatom_pr.cpp; path = source/flatom_pr.cpp; sourceTree = SOURCE_ROOT; }; + F55CED7C0383E50201A80AC9 /* flatom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flatom.cpp; path = source/flatom.cpp; sourceTree = SOURCE_ROOT; }; + F55CED7D0383E50201A80AC9 /* flattr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flattr.cpp; path = source/flattr.cpp; sourceTree = SOURCE_ROOT; }; + F55CED7E0383E50201A80AC9 /* flbase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flbase.cpp; path = source/flbase.cpp; sourceTree = SOURCE_ROOT; }; + F55CED7F0383E50201A80AC9 /* flbase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flbase.h; sourceTree = "<group>"; }; + F55CED800383E50201A80AC9 /* flbuf.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flbuf.cpp; path = source/flbuf.cpp; sourceTree = SOURCE_ROOT; }; + F55CED810383E50201A80AC9 /* flclass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flclass.h; sourceTree = "<group>"; }; + F55CED860383E50201A80AC9 /* fldefs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fldefs.h; path = source/fldefs.h; sourceTree = SOURCE_ROOT; }; + F55CED870383E50201A80AC9 /* fldoxygen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldoxygen.h; sourceTree = "<group>"; }; + F55CED880383E50201A80AC9 /* fldsp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fldsp.cpp; path = source/fldsp.cpp; sourceTree = SOURCE_ROOT; }; + F55CED890383E50201A80AC9 /* fldsp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldsp.h; sourceTree = "<group>"; }; + F55CED8A0383E50201A80AC9 /* flext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flext.cpp; path = source/flext.cpp; sourceTree = SOURCE_ROOT; }; + F55CED8B0383E50201A80AC9 /* flext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flext.h; sourceTree = "<group>"; }; + F55CED8C0383E50201A80AC9 /* flinternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flinternal.h; sourceTree = "<group>"; }; + F55CED8D0383E50201A80AC9 /* fllib.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fllib.cpp; path = source/fllib.cpp; sourceTree = SOURCE_ROOT; }; + F55CED8E0383E50201A80AC9 /* flmspbuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flmspbuffer.h; sourceTree = "<group>"; }; + F55CED8F0383E50201A80AC9 /* flout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flout.cpp; path = source/flout.cpp; sourceTree = SOURCE_ROOT; }; + F55CED900383E50201A80AC9 /* flsndobj.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flsndobj.cpp; path = source/flsndobj.cpp; sourceTree = SOURCE_ROOT; }; + F55CED910383E50201A80AC9 /* flsndobj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flsndobj.h; sourceTree = "<group>"; }; + F55CED920383E50201A80AC9 /* flstdc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flstdc.h; sourceTree = "<group>"; }; + F55CED930383E50201A80AC9 /* flsupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flsupport.cpp; path = source/flsupport.cpp; sourceTree = SOURCE_ROOT; }; + F55CED940383E50201A80AC9 /* flsupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = flsupport.h; sourceTree = "<group>"; }; + F55CED950383E50201A80AC9 /* flthr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flthr.cpp; path = source/flthr.cpp; sourceTree = SOURCE_ROOT; }; + F55CED960383E50201A80AC9 /* flutil.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flutil.cpp; path = source/flutil.cpp; sourceTree = SOURCE_ROOT; }; + F55CED970383E50201A80AC9 /* flxlet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flxlet.cpp; path = source/flxlet.cpp; sourceTree = SOURCE_ROOT; }; + F598D263044CC4A001A80AC9 /* flbind.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flbind.cpp; path = source/flbind.cpp; sourceTree = "<group>"; }; + F598D264044CC4A001A80AC9 /* flsimd.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = flsimd.cpp; path = source/flsimd.cpp; sourceTree = "<group>"; }; + F5B1FAC8041191190179CFEF /* fltimer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fltimer.cpp; path = source/fltimer.cpp; sourceTree = "<group>"; }; + F5CBC5B804757BC801A0C81C /* fldefs_attradd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_attradd.h; sourceTree = "<group>"; }; + F5CBC5B904757BC801A0C81C /* fldefs_attrcb.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_attrcb.h; sourceTree = "<group>"; }; + F5CBC5BA04757BC801A0C81C /* fldefs_attrvar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_attrvar.h; sourceTree = "<group>"; }; + F5CBC5BB04757BC801A0C81C /* fldefs_hdr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_hdr.h; sourceTree = "<group>"; }; + F5CBC5BC04757BC801A0C81C /* fldefs_methadd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_methadd.h; sourceTree = "<group>"; }; + F5CBC5BD04757BC801A0C81C /* fldefs_methbind.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_methbind.h; sourceTree = "<group>"; }; + F5CBC5BE04757BC801A0C81C /* fldefs_methcall.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_methcall.h; sourceTree = "<group>"; }; + F5CBC5BF04757BC801A0C81C /* fldefs_methcb.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_methcb.h; sourceTree = "<group>"; }; + F5CBC5C004757BC801A0C81C /* fldefs_meththr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_meththr.h; sourceTree = "<group>"; }; + F5CBC5C104757BC801A0C81C /* fldefs_setup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = fldefs_setup.h; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E99747CB0770545100206F68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E9974803077054CD00206F68 /* vecLib.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E997483D0770570800206F68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E997483E0770570800206F68 /* vecLib.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974884077058C100206F68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E99748D107705BAF00206F68 /* ApplicationServices.framework in Frameworks */, + E907FC2F1ACB4EEF003B821A /* vecLib.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E99749BC07705CC400206F68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E99749BD07705CC400206F68 /* vecLib.framework in Frameworks */, + E9974E160770780D00206F68 /* MaxAPI.framework in Frameworks */, + E9974E170770780D00206F68 /* MaxAudioAPI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974BC207705F1400206F68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E9974BC307705F1400206F68 /* vecLib.framework in Frameworks */, + E9974E180770780D00206F68 /* MaxAPI.framework in Frameworks */, + E9974E190770780D00206F68 /* MaxAudioAPI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974BF707705F4F00206F68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E9974BF807705F4F00206F68 /* vecLib.framework in Frameworks */, + E9974BF907705F4F00206F68 /* ApplicationServices.framework in Frameworks */, + E9974E1A0770780D00206F68 /* MaxAPI.framework in Frameworks */, + E9974E1B0770780D00206F68 /* MaxAudioAPI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DDFF38A45A11DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + E99747CD0770545100206F68 /* libflext-pd_sd.a */, + E997483F0770570800206F68 /* libflext-pd_td.a */, + E9974886077058C100206F68 /* libflext-pd_d.dylib */, + E99749BE07705CC400206F68 /* libflext-max_sd.a */, + E9974BC407705F1400206F68 /* libflext-max_td.a */, + E9974BFA07705F4F00206F68 /* libflext-max_d.dylib */, + ); + name = Products; + sourceTree = "<group>"; + }; + 0867D691FE84028FC02AAC07 /* flext-PB */ = { + isa = PBXGroup; + children = ( + F55CEDB50383E50D01A80AC9 /* Headers */, + 08FB77ACFE841707C02AAC07 /* Source */, + 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */, + 034768DDFF38A45A11DB9C8B /* Products */, + ); + name = "flext-PB"; + sourceTree = "<group>"; + }; + 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + E9974E140770780D00206F68 /* MaxAPI.framework */, + E9974E150770780D00206F68 /* MaxAudioAPI.framework */, + E99748D007705BAF00206F68 /* ApplicationServices.framework */, + E9974802077054CD00206F68 /* vecLib.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = "<group>"; + }; + 08FB77ACFE841707C02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + F55CED7C0383E50201A80AC9 /* flatom.cpp */, + F504A66C03CE39F501A80AC9 /* flatom_part.cpp */, + F55CED7B0383E50201A80AC9 /* flatom_pr.cpp */, + F55CED7D0383E50201A80AC9 /* flattr.cpp */, + E9BDCC4104F4D7C1008929A0 /* flattr_ed.cpp */, + F55CED7E0383E50201A80AC9 /* flbase.cpp */, + F598D263044CC4A001A80AC9 /* flbind.cpp */, + F55CED800383E50201A80AC9 /* flbuf.cpp */, + F55CED880383E50201A80AC9 /* fldsp.cpp */, + F55CED8A0383E50201A80AC9 /* flext.cpp */, + F504A66D03CE39F501A80AC9 /* flitem.cpp */, + F55CED8D0383E50201A80AC9 /* fllib.cpp */, + E99A3DCE0D3592AB00E692EF /* flmap.cpp */, + F504A66E03CE39F501A80AC9 /* flmeth.cpp */, + F504A66F03CE39F501A80AC9 /* flmsg.cpp */, + F55CED8F0383E50201A80AC9 /* flout.cpp */, + F504A67103CE39F501A80AC9 /* flproxy.cpp */, + F504A67203CE39F501A80AC9 /* flqueue.cpp */, + F598D264044CC4A001A80AC9 /* flsimd.cpp */, + F55CED930383E50201A80AC9 /* flsupport.cpp */, + F55CED950383E50201A80AC9 /* flthr.cpp */, + F5B1FAC8041191190179CFEF /* fltimer.cpp */, + F55CED960383E50201A80AC9 /* flutil.cpp */, + F55CED970383E50201A80AC9 /* flxlet.cpp */, + F55CED900383E50201A80AC9 /* flsndobj.cpp */, + F504A67303CE39F501A80AC9 /* flstk.cpp */, + ); + name = Source; + sourceTree = SOURCE_ROOT; + }; + E99A3D870D358FB800E692EF /* lockfree */ = { + isa = PBXGroup; + children = ( + E99A3D8B0D35903A00E692EF /* atomic_int.hpp */, + E99A3D8C0D35903A00E692EF /* atomic_ptr.hpp */, + E99A3D8D0D35903A00E692EF /* branch_hints.hpp */, + E99A3D8E0D35903A00E692EF /* cas.hpp */, + E99A3D8F0D35903A00E692EF /* fifo.hpp */, + E99A3D900D35903A00E692EF /* prefix.hpp */, + E99A3D910D35903A00E692EF /* stack.hpp */, + ); + path = lockfree; + sourceTree = "<group>"; + }; + F55CEDB50383E50D01A80AC9 /* Headers */ = { + isa = PBXGroup; + children = ( + E99A3DD50D3592D100E692EF /* flcontainers.h */, + E99A3DD60D3592D100E692EF /* flfeatures.h */, + E99A3DD70D3592D100E692EF /* flmap.h */, + E99A3D870D358FB800E692EF /* lockfree */, + F5CBC61C04757BDA01A0C81C /* Defs */, + F504A67003CE39F501A80AC9 /* flprefix.h */, + F55CED7F0383E50201A80AC9 /* flbase.h */, + F55CED810383E50201A80AC9 /* flclass.h */, + F55CED870383E50201A80AC9 /* fldoxygen.h */, + F55CED890383E50201A80AC9 /* fldsp.h */, + F55CED8B0383E50201A80AC9 /* flext.h */, + F55CED8C0383E50201A80AC9 /* flinternal.h */, + F55CED8E0383E50201A80AC9 /* flmspbuffer.h */, + F55CED910383E50201A80AC9 /* flsndobj.h */, + F55CED920383E50201A80AC9 /* flstdc.h */, + F55CED940383E50201A80AC9 /* flsupport.h */, + F504A67403CE39F501A80AC9 /* flstk.h */, + E95B343A0F40BEE3006336AA /* flpushns.h */, + E95B34410F40BEF0006336AA /* flpopns.h */, + ); + name = Headers; + path = source; + sourceTree = "<group>"; + }; + F5CBC61C04757BDA01A0C81C /* Defs */ = { + isa = PBXGroup; + children = ( + F55CED860383E50201A80AC9 /* fldefs.h */, + F5CBC5B804757BC801A0C81C /* fldefs_attradd.h */, + F5CBC5B904757BC801A0C81C /* fldefs_attrcb.h */, + F5CBC5BA04757BC801A0C81C /* fldefs_attrvar.h */, + F5CBC5BB04757BC801A0C81C /* fldefs_hdr.h */, + F5CBC5BC04757BC801A0C81C /* fldefs_methadd.h */, + F5CBC5BD04757BC801A0C81C /* fldefs_methbind.h */, + F5CBC5BE04757BC801A0C81C /* fldefs_methcall.h */, + F5CBC5BF04757BC801A0C81C /* fldefs_methcb.h */, + F5CBC5C004757BC801A0C81C /* fldefs_meththr.h */, + F5CBC5C104757BC801A0C81C /* fldefs_setup.h */, + ); + name = Defs; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + E99747C90770545100206F68 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E99747FA0770548F00206F68 /* flprefix.h in Headers */, + E99747E80770548F00206F68 /* flbase.h in Headers */, + E99747E90770548F00206F68 /* flclass.h in Headers */, + E99747F50770548F00206F68 /* fldoxygen.h in Headers */, + E99747F60770548F00206F68 /* fldsp.h in Headers */, + E99747F70770548F00206F68 /* flext.h in Headers */, + E99747F80770548F00206F68 /* flinternal.h in Headers */, + E99747F90770548F00206F68 /* flmspbuffer.h in Headers */, + E99747FC0770548F00206F68 /* flstdc.h in Headers */, + E99747FE0770548F00206F68 /* flsupport.h in Headers */, + E99747EA0770548F00206F68 /* fldefs.h in Headers */, + E99747EB0770548F00206F68 /* fldefs_attradd.h in Headers */, + E99747EC0770548F00206F68 /* fldefs_attrcb.h in Headers */, + E99747ED0770548F00206F68 /* fldefs_attrvar.h in Headers */, + E99747EE0770548F00206F68 /* fldefs_hdr.h in Headers */, + E99747EF0770548F00206F68 /* fldefs_methadd.h in Headers */, + E99747F00770548F00206F68 /* fldefs_methbind.h in Headers */, + E99747F10770548F00206F68 /* fldefs_methcall.h in Headers */, + E99747F20770548F00206F68 /* fldefs_methcb.h in Headers */, + E99747F30770548F00206F68 /* fldefs_meththr.h in Headers */, + E99747F40770548F00206F68 /* fldefs_setup.h in Headers */, + E99A3D990D35903A00E692EF /* atomic_int.hpp in Headers */, + E99A3D9A0D35903A00E692EF /* atomic_ptr.hpp in Headers */, + E99A3D9B0D35903A00E692EF /* branch_hints.hpp in Headers */, + E99A3D9C0D35903A00E692EF /* cas.hpp in Headers */, + E99A3D9D0D35903A00E692EF /* fifo.hpp in Headers */, + E99A3D9E0D35903A00E692EF /* prefix.hpp in Headers */, + E99A3D9F0D35903A00E692EF /* stack.hpp in Headers */, + E99A3DDB0D3592D100E692EF /* flcontainers.h in Headers */, + E99A3DDC0D3592D100E692EF /* flfeatures.h in Headers */, + E99A3DDD0D3592D100E692EF /* flmap.h in Headers */, + E95B34400F40BEE3006336AA /* flpushns.h in Headers */, + E95B34470F40BEF0006336AA /* flpopns.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E997480E0770570800206F68 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E997480F0770570800206F68 /* flprefix.h in Headers */, + E99748100770570800206F68 /* flbase.h in Headers */, + E99748110770570800206F68 /* flclass.h in Headers */, + E99748120770570800206F68 /* fldoxygen.h in Headers */, + E99748130770570800206F68 /* fldsp.h in Headers */, + E99748140770570800206F68 /* flext.h in Headers */, + E99748150770570800206F68 /* flinternal.h in Headers */, + E99748160770570800206F68 /* flmspbuffer.h in Headers */, + E99748170770570800206F68 /* flstdc.h in Headers */, + E99748180770570800206F68 /* flsupport.h in Headers */, + E99748190770570800206F68 /* fldefs.h in Headers */, + E997481A0770570800206F68 /* fldefs_attradd.h in Headers */, + E997481B0770570800206F68 /* fldefs_attrcb.h in Headers */, + E997481C0770570800206F68 /* fldefs_attrvar.h in Headers */, + E997481D0770570800206F68 /* fldefs_hdr.h in Headers */, + E997481E0770570800206F68 /* fldefs_methadd.h in Headers */, + E997481F0770570800206F68 /* fldefs_methbind.h in Headers */, + E99748200770570800206F68 /* fldefs_methcall.h in Headers */, + E99748210770570800206F68 /* fldefs_methcb.h in Headers */, + E99748220770570800206F68 /* fldefs_meththr.h in Headers */, + E99748230770570800206F68 /* fldefs_setup.h in Headers */, + E99A3DA00D35903A00E692EF /* atomic_int.hpp in Headers */, + E99A3DA10D35903A00E692EF /* atomic_ptr.hpp in Headers */, + E99A3DA20D35903A00E692EF /* branch_hints.hpp in Headers */, + E99A3DA30D35903A00E692EF /* cas.hpp in Headers */, + E99A3DA40D35903A00E692EF /* fifo.hpp in Headers */, + E99A3DA50D35903A00E692EF /* prefix.hpp in Headers */, + E99A3DA60D35903A00E692EF /* stack.hpp in Headers */, + E99A3DDE0D3592D100E692EF /* flcontainers.h in Headers */, + E99A3DDF0D3592D100E692EF /* flfeatures.h in Headers */, + E99A3DE00D3592D100E692EF /* flmap.h in Headers */, + E95B343B0F40BEE3006336AA /* flpushns.h in Headers */, + E95B34420F40BEF0006336AA /* flpopns.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974882077058C100206F68 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E99748B00770595E00206F68 /* fldefs.h in Headers */, + E99748B10770595E00206F68 /* fldefs_attradd.h in Headers */, + E99748B20770595E00206F68 /* fldefs_attrcb.h in Headers */, + E99748B30770595E00206F68 /* fldefs_attrvar.h in Headers */, + E99748B40770595E00206F68 /* fldefs_hdr.h in Headers */, + E99748B50770595E00206F68 /* fldefs_methadd.h in Headers */, + E99748B60770595E00206F68 /* fldefs_methbind.h in Headers */, + E99748B70770595E00206F68 /* fldefs_methcall.h in Headers */, + E99748B80770595E00206F68 /* fldefs_methcb.h in Headers */, + E99748B90770595E00206F68 /* fldefs_meththr.h in Headers */, + E99748BA0770595E00206F68 /* fldefs_setup.h in Headers */, + E99748A40770595500206F68 /* flprefix.h in Headers */, + E99748A50770595500206F68 /* flbase.h in Headers */, + E99748A60770595500206F68 /* flclass.h in Headers */, + E99748A70770595500206F68 /* fldoxygen.h in Headers */, + E99748A80770595500206F68 /* fldsp.h in Headers */, + E99748A90770595600206F68 /* flext.h in Headers */, + E99748AA0770595600206F68 /* flinternal.h in Headers */, + E99748AB0770595600206F68 /* flmspbuffer.h in Headers */, + E99748AC0770595600206F68 /* flsndobj.h in Headers */, + E99748AD0770595600206F68 /* flstdc.h in Headers */, + E99748AE0770595600206F68 /* flsupport.h in Headers */, + E99748AF0770595600206F68 /* flstk.h in Headers */, + E99A3D920D35903A00E692EF /* atomic_int.hpp in Headers */, + E99A3D930D35903A00E692EF /* atomic_ptr.hpp in Headers */, + E99A3D940D35903A00E692EF /* branch_hints.hpp in Headers */, + E99A3D950D35903A00E692EF /* cas.hpp in Headers */, + E99A3D960D35903A00E692EF /* fifo.hpp in Headers */, + E99A3D970D35903A00E692EF /* prefix.hpp in Headers */, + E99A3D980D35903A00E692EF /* stack.hpp in Headers */, + E99A3DD80D3592D100E692EF /* flcontainers.h in Headers */, + E99A3DD90D3592D100E692EF /* flfeatures.h in Headers */, + E99A3DDA0D3592D100E692EF /* flmap.h in Headers */, + E95B343C0F40BEE3006336AA /* flpushns.h in Headers */, + E95B34430F40BEF0006336AA /* flpopns.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E997498D07705CC400206F68 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E997498E07705CC400206F68 /* flprefix.h in Headers */, + E997498F07705CC400206F68 /* flbase.h in Headers */, + E997499007705CC400206F68 /* flclass.h in Headers */, + E997499107705CC400206F68 /* fldoxygen.h in Headers */, + E997499207705CC400206F68 /* fldsp.h in Headers */, + E997499307705CC400206F68 /* flext.h in Headers */, + E997499407705CC400206F68 /* flinternal.h in Headers */, + E997499507705CC400206F68 /* flmspbuffer.h in Headers */, + E997499607705CC400206F68 /* flstdc.h in Headers */, + E997499707705CC400206F68 /* flsupport.h in Headers */, + E997499807705CC400206F68 /* fldefs.h in Headers */, + E997499907705CC400206F68 /* fldefs_attradd.h in Headers */, + E997499A07705CC400206F68 /* fldefs_attrcb.h in Headers */, + E997499B07705CC400206F68 /* fldefs_attrvar.h in Headers */, + E997499C07705CC400206F68 /* fldefs_hdr.h in Headers */, + E997499D07705CC400206F68 /* fldefs_methadd.h in Headers */, + E997499E07705CC400206F68 /* fldefs_methbind.h in Headers */, + E997499F07705CC400206F68 /* fldefs_methcall.h in Headers */, + E99749A007705CC400206F68 /* fldefs_methcb.h in Headers */, + E99749A107705CC400206F68 /* fldefs_meththr.h in Headers */, + E99749A207705CC400206F68 /* fldefs_setup.h in Headers */, + E99A3DA70D35903A00E692EF /* atomic_int.hpp in Headers */, + E99A3DA80D35903A00E692EF /* atomic_ptr.hpp in Headers */, + E99A3DA90D35903A00E692EF /* branch_hints.hpp in Headers */, + E99A3DAA0D35903A00E692EF /* cas.hpp in Headers */, + E99A3DAB0D35903A00E692EF /* fifo.hpp in Headers */, + E99A3DAC0D35903A00E692EF /* prefix.hpp in Headers */, + E99A3DAD0D35903A00E692EF /* stack.hpp in Headers */, + E99A3DE10D3592D100E692EF /* flcontainers.h in Headers */, + E99A3DE20D3592D100E692EF /* flfeatures.h in Headers */, + E99A3DE30D3592D100E692EF /* flmap.h in Headers */, + E95B343F0F40BEE3006336AA /* flpushns.h in Headers */, + E95B34460F40BEF0006336AA /* flpopns.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974B9307705F1400206F68 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E9974B9407705F1400206F68 /* flprefix.h in Headers */, + E9974B9507705F1400206F68 /* flbase.h in Headers */, + E9974B9607705F1400206F68 /* flclass.h in Headers */, + E9974B9707705F1400206F68 /* fldoxygen.h in Headers */, + E9974B9807705F1400206F68 /* fldsp.h in Headers */, + E9974B9907705F1400206F68 /* flext.h in Headers */, + E9974B9A07705F1400206F68 /* flinternal.h in Headers */, + E9974B9B07705F1400206F68 /* flmspbuffer.h in Headers */, + E9974B9C07705F1400206F68 /* flstdc.h in Headers */, + E9974B9D07705F1400206F68 /* flsupport.h in Headers */, + E9974B9E07705F1400206F68 /* fldefs.h in Headers */, + E9974B9F07705F1400206F68 /* fldefs_attradd.h in Headers */, + E9974BA007705F1400206F68 /* fldefs_attrcb.h in Headers */, + E9974BA107705F1400206F68 /* fldefs_attrvar.h in Headers */, + E9974BA207705F1400206F68 /* fldefs_hdr.h in Headers */, + E9974BA307705F1400206F68 /* fldefs_methadd.h in Headers */, + E9974BA407705F1400206F68 /* fldefs_methbind.h in Headers */, + E9974BA507705F1400206F68 /* fldefs_methcall.h in Headers */, + E9974BA607705F1400206F68 /* fldefs_methcb.h in Headers */, + E9974BA707705F1400206F68 /* fldefs_meththr.h in Headers */, + E9974BA807705F1400206F68 /* fldefs_setup.h in Headers */, + E99A3DAE0D35903A00E692EF /* atomic_int.hpp in Headers */, + E99A3DAF0D35903A00E692EF /* atomic_ptr.hpp in Headers */, + E99A3DB00D35903A00E692EF /* branch_hints.hpp in Headers */, + E99A3DB10D35903A00E692EF /* cas.hpp in Headers */, + E99A3DB20D35903A00E692EF /* fifo.hpp in Headers */, + E99A3DB30D35903A00E692EF /* prefix.hpp in Headers */, + E99A3DB40D35903A00E692EF /* stack.hpp in Headers */, + E99A3DE40D3592D100E692EF /* flcontainers.h in Headers */, + E99A3DE50D3592D100E692EF /* flfeatures.h in Headers */, + E99A3DE60D3592D100E692EF /* flmap.h in Headers */, + E95B343D0F40BEE3006336AA /* flpushns.h in Headers */, + E95B34440F40BEF0006336AA /* flpopns.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974BC607705F4F00206F68 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E9974BC707705F4F00206F68 /* fldefs.h in Headers */, + E9974BC807705F4F00206F68 /* fldefs_attradd.h in Headers */, + E9974BC907705F4F00206F68 /* fldefs_attrcb.h in Headers */, + E9974BCA07705F4F00206F68 /* fldefs_attrvar.h in Headers */, + E9974BCB07705F4F00206F68 /* fldefs_hdr.h in Headers */, + E9974BCC07705F4F00206F68 /* fldefs_methadd.h in Headers */, + E9974BCD07705F4F00206F68 /* fldefs_methbind.h in Headers */, + E9974BCE07705F4F00206F68 /* fldefs_methcall.h in Headers */, + E9974BCF07705F4F00206F68 /* fldefs_methcb.h in Headers */, + E9974BD007705F4F00206F68 /* fldefs_meththr.h in Headers */, + E9974BD107705F4F00206F68 /* fldefs_setup.h in Headers */, + E9974BD207705F4F00206F68 /* flprefix.h in Headers */, + E9974BD307705F4F00206F68 /* flbase.h in Headers */, + E9974BD407705F4F00206F68 /* flclass.h in Headers */, + E9974BD507705F4F00206F68 /* fldoxygen.h in Headers */, + E9974BD607705F4F00206F68 /* fldsp.h in Headers */, + E9974BD707705F4F00206F68 /* flext.h in Headers */, + E9974BD807705F4F00206F68 /* flinternal.h in Headers */, + E9974BD907705F4F00206F68 /* flmspbuffer.h in Headers */, + E9974BDA07705F4F00206F68 /* flsndobj.h in Headers */, + E9974BDB07705F4F00206F68 /* flstdc.h in Headers */, + E9974BDC07705F4F00206F68 /* flsupport.h in Headers */, + E9974BDD07705F4F00206F68 /* flstk.h in Headers */, + E99A3DB50D35903A00E692EF /* atomic_int.hpp in Headers */, + E99A3DB60D35903A00E692EF /* atomic_ptr.hpp in Headers */, + E99A3DB70D35903A00E692EF /* branch_hints.hpp in Headers */, + E99A3DB80D35903A00E692EF /* cas.hpp in Headers */, + E99A3DB90D35903A00E692EF /* fifo.hpp in Headers */, + E99A3DBA0D35903A00E692EF /* prefix.hpp in Headers */, + E99A3DBB0D35903A00E692EF /* stack.hpp in Headers */, + E99A3DE70D3592D100E692EF /* flcontainers.h in Headers */, + E99A3DE80D3592D100E692EF /* flfeatures.h in Headers */, + E99A3DE90D3592D100E692EF /* flmap.h in Headers */, + E95B343E0F40BEE3006336AA /* flpushns.h in Headers */, + E95B34450F40BEF0006336AA /* flpopns.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + E99747CC0770545100206F68 /* PD static single */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9A5BCA10A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "PD static single" */; + buildPhases = ( + E99747C90770545100206F68 /* Headers */, + E99747CA0770545100206F68 /* Sources */, + E99747CB0770545100206F68 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PD static single"; + productName = "PD static single"; + productReference = E99747CD0770545100206F68 /* libflext-pd_sd.a */; + productType = "com.apple.product-type.library.static"; + }; + E997480D0770570800206F68 /* PD static multi */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9A5BCA50A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "PD static multi" */; + buildPhases = ( + E997480E0770570800206F68 /* Headers */, + E99748240770570800206F68 /* Sources */, + E997483D0770570800206F68 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PD static multi"; + productName = "PD static single"; + productReference = E997483F0770570800206F68 /* libflext-pd_td.a */; + productType = "com.apple.product-type.library.static"; + }; + E9974885077058C100206F68 /* PD shared */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9A5BCA90A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "PD shared" */; + buildPhases = ( + E9974882077058C100206F68 /* Headers */, + E9974883077058C100206F68 /* Sources */, + E9974884077058C100206F68 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PD shared"; + productName = "PD shared"; + productReference = E9974886077058C100206F68 /* libflext-pd_d.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + E997498C07705CC400206F68 /* Max static single */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9A5BCAD0A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "Max static single" */; + buildPhases = ( + E997498D07705CC400206F68 /* Headers */, + E99749A307705CC400206F68 /* Sources */, + E99749BC07705CC400206F68 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Max static single"; + productName = "PD static single"; + productReference = E99749BE07705CC400206F68 /* libflext-max_sd.a */; + productType = "com.apple.product-type.library.static"; + }; + E9974B9207705F1400206F68 /* Max static multi */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9A5BCB10A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "Max static multi" */; + buildPhases = ( + E9974B9307705F1400206F68 /* Headers */, + E9974BA907705F1400206F68 /* Sources */, + E9974BC207705F1400206F68 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Max static multi"; + productName = "PD static single"; + productReference = E9974BC407705F1400206F68 /* libflext-max_td.a */; + productType = "com.apple.product-type.library.static"; + }; + E9974BC507705F4F00206F68 /* Max shared */ = { + isa = PBXNativeTarget; + buildConfigurationList = E9A5BCB50A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "Max shared" */; + buildPhases = ( + E9974BC607705F4F00206F68 /* Headers */, + E9974BDE07705F4F00206F68 /* Sources */, + E9974BF707705F4F00206F68 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Max shared"; + productName = "PD shared"; + productReference = E9974BFA07705F4F00206F68 /* libflext-max_d.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0620; + }; + buildConfigurationList = E9A5BCB90A3381C400AD9F03 /* Build configuration list for PBXProject "flext" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 0867D691FE84028FC02AAC07 /* flext-PB */; + productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E99747CC0770545100206F68 /* PD static single */, + E997480D0770570800206F68 /* PD static multi */, + E9974885077058C100206F68 /* PD shared */, + E997498C07705CC400206F68 /* Max static single */, + E9974B9207705F1400206F68 /* Max static multi */, + E9974BC507705F4F00206F68 /* Max shared */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E99747CA0770545100206F68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E99747CE0770548700206F68 /* flatom.cpp in Sources */, + E99747D00770548700206F68 /* flatom_part.cpp in Sources */, + E99747D10770548700206F68 /* flatom_pr.cpp in Sources */, + E99747D20770548700206F68 /* flattr.cpp in Sources */, + E99747D30770548700206F68 /* flattr_ed.cpp in Sources */, + E99747D40770548700206F68 /* flbase.cpp in Sources */, + E99747D50770548700206F68 /* flbind.cpp in Sources */, + E99747D60770548700206F68 /* flbuf.cpp in Sources */, + E99747D70770548700206F68 /* fldsp.cpp in Sources */, + E99747D80770548700206F68 /* flext.cpp in Sources */, + E99747D90770548700206F68 /* flitem.cpp in Sources */, + E99747DA0770548700206F68 /* fllib.cpp in Sources */, + E99747DB0770548700206F68 /* flmeth.cpp in Sources */, + E99747DC0770548700206F68 /* flmsg.cpp in Sources */, + E99747DD0770548700206F68 /* flout.cpp in Sources */, + E99747DE0770548700206F68 /* flproxy.cpp in Sources */, + E99747DF0770548700206F68 /* flqueue.cpp in Sources */, + E99747E00770548700206F68 /* flsimd.cpp in Sources */, + E99747E30770548700206F68 /* flsupport.cpp in Sources */, + E99747E40770548700206F68 /* flthr.cpp in Sources */, + E99747E50770548700206F68 /* fltimer.cpp in Sources */, + E99747E60770548700206F68 /* flutil.cpp in Sources */, + E99747E70770548700206F68 /* flxlet.cpp in Sources */, + E99A3DD00D3592AB00E692EF /* flmap.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E99748240770570800206F68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E99748250770570800206F68 /* flatom.cpp in Sources */, + E99748270770570800206F68 /* flatom_part.cpp in Sources */, + E99748280770570800206F68 /* flatom_pr.cpp in Sources */, + E99748290770570800206F68 /* flattr.cpp in Sources */, + E997482A0770570800206F68 /* flattr_ed.cpp in Sources */, + E997482B0770570800206F68 /* flbase.cpp in Sources */, + E997482C0770570800206F68 /* flbind.cpp in Sources */, + E997482D0770570800206F68 /* flbuf.cpp in Sources */, + E997482E0770570800206F68 /* fldsp.cpp in Sources */, + E997482F0770570800206F68 /* flext.cpp in Sources */, + E99748300770570800206F68 /* flitem.cpp in Sources */, + E99748310770570800206F68 /* fllib.cpp in Sources */, + E99748320770570800206F68 /* flmeth.cpp in Sources */, + E99748330770570800206F68 /* flmsg.cpp in Sources */, + E99748340770570800206F68 /* flout.cpp in Sources */, + E99748350770570800206F68 /* flproxy.cpp in Sources */, + E99748360770570800206F68 /* flqueue.cpp in Sources */, + E99748370770570800206F68 /* flsimd.cpp in Sources */, + E99748380770570800206F68 /* flsupport.cpp in Sources */, + E99748390770570800206F68 /* flthr.cpp in Sources */, + E997483A0770570800206F68 /* fltimer.cpp in Sources */, + E997483B0770570800206F68 /* flutil.cpp in Sources */, + E997483C0770570800206F68 /* flxlet.cpp in Sources */, + E99A3DD10D3592AB00E692EF /* flmap.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974883077058C100206F68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E997488C0770593C00206F68 /* flatom.cpp in Sources */, + E997488E0770593C00206F68 /* flatom_part.cpp in Sources */, + E997488F0770593C00206F68 /* flatom_pr.cpp in Sources */, + E99748900770593C00206F68 /* flattr.cpp in Sources */, + E99748910770593C00206F68 /* flattr_ed.cpp in Sources */, + E99748920770593C00206F68 /* flbase.cpp in Sources */, + E99748930770593C00206F68 /* flbind.cpp in Sources */, + E99748940770593C00206F68 /* flbuf.cpp in Sources */, + E99748950770593C00206F68 /* fldsp.cpp in Sources */, + E99748960770593C00206F68 /* flext.cpp in Sources */, + E99748970770593C00206F68 /* flitem.cpp in Sources */, + E99748980770593C00206F68 /* fllib.cpp in Sources */, + E99748990770593C00206F68 /* flmeth.cpp in Sources */, + E997489A0770593C00206F68 /* flmsg.cpp in Sources */, + E997489B0770593C00206F68 /* flout.cpp in Sources */, + E997489C0770593C00206F68 /* flproxy.cpp in Sources */, + E997489D0770593C00206F68 /* flqueue.cpp in Sources */, + E997489E0770593C00206F68 /* flsimd.cpp in Sources */, + E997489F0770593C00206F68 /* flsupport.cpp in Sources */, + E99748A00770593C00206F68 /* flthr.cpp in Sources */, + E99748A10770593C00206F68 /* fltimer.cpp in Sources */, + E99748A20770593C00206F68 /* flutil.cpp in Sources */, + E99748A30770593C00206F68 /* flxlet.cpp in Sources */, + E99A3DCF0D3592AB00E692EF /* flmap.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E99749A307705CC400206F68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E99749A407705CC400206F68 /* flatom.cpp in Sources */, + E99749A607705CC400206F68 /* flatom_part.cpp in Sources */, + E99749A707705CC400206F68 /* flatom_pr.cpp in Sources */, + E99749A807705CC400206F68 /* flattr.cpp in Sources */, + E99749A907705CC400206F68 /* flattr_ed.cpp in Sources */, + E99749AA07705CC400206F68 /* flbase.cpp in Sources */, + E99749AB07705CC400206F68 /* flbind.cpp in Sources */, + E99749AC07705CC400206F68 /* flbuf.cpp in Sources */, + E99749AD07705CC400206F68 /* fldsp.cpp in Sources */, + E99749AE07705CC400206F68 /* flext.cpp in Sources */, + E99749AF07705CC400206F68 /* flitem.cpp in Sources */, + E99749B007705CC400206F68 /* fllib.cpp in Sources */, + E99749B107705CC400206F68 /* flmeth.cpp in Sources */, + E99749B207705CC400206F68 /* flmsg.cpp in Sources */, + E99749B307705CC400206F68 /* flout.cpp in Sources */, + E99749B407705CC400206F68 /* flproxy.cpp in Sources */, + E99749B507705CC400206F68 /* flqueue.cpp in Sources */, + E99749B607705CC400206F68 /* flsimd.cpp in Sources */, + E99749B707705CC400206F68 /* flsupport.cpp in Sources */, + E99749B807705CC400206F68 /* flthr.cpp in Sources */, + E99749B907705CC400206F68 /* fltimer.cpp in Sources */, + E99749BA07705CC400206F68 /* flutil.cpp in Sources */, + E99749BB07705CC400206F68 /* flxlet.cpp in Sources */, + E99A3DD20D3592AB00E692EF /* flmap.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974BA907705F1400206F68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E9974BAA07705F1400206F68 /* flatom.cpp in Sources */, + E9974BAC07705F1400206F68 /* flatom_part.cpp in Sources */, + E9974BAD07705F1400206F68 /* flatom_pr.cpp in Sources */, + E9974BAE07705F1400206F68 /* flattr.cpp in Sources */, + E9974BAF07705F1400206F68 /* flattr_ed.cpp in Sources */, + E9974BB007705F1400206F68 /* flbase.cpp in Sources */, + E9974BB107705F1400206F68 /* flbind.cpp in Sources */, + E9974BB207705F1400206F68 /* flbuf.cpp in Sources */, + E9974BB307705F1400206F68 /* fldsp.cpp in Sources */, + E9974BB407705F1400206F68 /* flext.cpp in Sources */, + E9974BB507705F1400206F68 /* flitem.cpp in Sources */, + E9974BB607705F1400206F68 /* fllib.cpp in Sources */, + E9974BB707705F1400206F68 /* flmeth.cpp in Sources */, + E9974BB807705F1400206F68 /* flmsg.cpp in Sources */, + E9974BB907705F1400206F68 /* flout.cpp in Sources */, + E9974BBA07705F1400206F68 /* flproxy.cpp in Sources */, + E9974BBB07705F1400206F68 /* flqueue.cpp in Sources */, + E9974BBC07705F1400206F68 /* flsimd.cpp in Sources */, + E9974BBD07705F1400206F68 /* flsupport.cpp in Sources */, + E9974BBE07705F1400206F68 /* flthr.cpp in Sources */, + E9974BBF07705F1400206F68 /* fltimer.cpp in Sources */, + E9974BC007705F1400206F68 /* flutil.cpp in Sources */, + E9974BC107705F1400206F68 /* flxlet.cpp in Sources */, + E99A3DD30D3592AB00E692EF /* flmap.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E9974BDE07705F4F00206F68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E9974BDF07705F4F00206F68 /* flatom.cpp in Sources */, + E9974BE107705F4F00206F68 /* flatom_part.cpp in Sources */, + E9974BE207705F4F00206F68 /* flatom_pr.cpp in Sources */, + E9974BE307705F4F00206F68 /* flattr.cpp in Sources */, + E9974BE407705F4F00206F68 /* flattr_ed.cpp in Sources */, + E9974BE507705F4F00206F68 /* flbase.cpp in Sources */, + E9974BE607705F4F00206F68 /* flbind.cpp in Sources */, + E9974BE707705F4F00206F68 /* flbuf.cpp in Sources */, + E9974BE807705F4F00206F68 /* fldsp.cpp in Sources */, + E9974BE907705F4F00206F68 /* flext.cpp in Sources */, + E9974BEA07705F4F00206F68 /* flitem.cpp in Sources */, + E9974BEB07705F4F00206F68 /* fllib.cpp in Sources */, + E9974BEC07705F4F00206F68 /* flmeth.cpp in Sources */, + E9974BED07705F4F00206F68 /* flmsg.cpp in Sources */, + E9974BEE07705F4F00206F68 /* flout.cpp in Sources */, + E9974BEF07705F4F00206F68 /* flproxy.cpp in Sources */, + E9974BF007705F4F00206F68 /* flqueue.cpp in Sources */, + E9974BF107705F4F00206F68 /* flsimd.cpp in Sources */, + E9974BF207705F4F00206F68 /* flsupport.cpp in Sources */, + E9974BF307705F4F00206F68 /* flthr.cpp in Sources */, + E9974BF407705F4F00206F68 /* fltimer.cpp in Sources */, + E9974BF507705F4F00206F68 /* flutil.cpp in Sources */, + E9974BF607705F4F00206F68 /* flxlet.cpp in Sources */, + E99A3DD40D3592AB00E692EF /* flmap.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + E9A5BCA20A3381C400AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=2", + ); + HEADER_SEARCH_PATHS = "$(PD)/src"; + PRODUCT_NAME = "$(inherited)-pd_sd"; + }; + name = Development; + }; + E9A5BCA30A3381C400AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=2", + ); + HEADER_SEARCH_PATHS = "$(PD)/src"; + PRODUCT_NAME = "$(inherited)-pd_s"; + }; + name = Deployment; + }; + E9A5BCA60A3381C400AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=2", + FLEXT_THREADS, + ); + HEADER_SEARCH_PATHS = "$(PD)/src"; + PRODUCT_NAME = "$(inherited)-pd_td"; + }; + name = Development; + }; + E9A5BCA70A3381C400AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=2", + FLEXT_THREADS, + ); + HEADER_SEARCH_PATHS = "$(PD)/src"; + PRODUCT_NAME = "$(inherited)-pd_t"; + }; + name = Deployment; + }; + E9A5BCAA0A3381C400AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=2", + FLEXT_SHARED, + ); + HEADER_SEARCH_PATHS = "$(PD)/src"; + MACH_O_TYPE = mh_dylib; + OTHER_LDFLAGS = ( + "-undefined", + dynamic_lookup, + ); + PRODUCT_NAME = "$(inherited)-pd_d"; + }; + name = Development; + }; + E9A5BCAB0A3381C400AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=2", + FLEXT_SHARED, + ); + HEADER_SEARCH_PATHS = "$(PD)/src"; + MACH_O_TYPE = mh_dylib; + OTHER_LDFLAGS = ( + "-undefined", + dynamic_lookup, + ); + PRODUCT_NAME = "$(inherited)-pd"; + }; + name = Deployment; + }; + E9A5BCAE0A3381C400AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=1", + MAC_VERSION, + ); + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + ); + PRODUCT_NAME = "$(inherited)-max_sd"; + }; + name = Development; + }; + E9A5BCAF0A3381C400AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=1", + ); + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + ); + PRODUCT_NAME = "$(inherited)-max_s"; + }; + name = Deployment; + }; + E9A5BCB20A3381C400AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=1", + FLEXT_THREADS, + ); + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + ); + PRODUCT_NAME = "$(inherited)-max_td"; + }; + name = Development; + }; + E9A5BCB30A3381C400AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=1", + FLEXT_THREADS, + ); + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + ); + PRODUCT_NAME = "$(inherited)-max_t"; + }; + name = Deployment; + }; + E9A5BCB60A3381C400AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=1", + FLEXT_SHARED, + ); + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + ); + LIBRARY_SEARCH_PATHS = ( + "$(maxsdk)/msp-includes", + "$(maxsdk)/msp-includes", + ); + MACH_O_TYPE = mh_dylib; + PRODUCT_NAME = "$(inherited)-max_d"; + }; + name = Development; + }; + E9A5BCB70A3381C400AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "FLEXT_SYS=1", + FLEXT_SHARED, + ); + HEADER_SEARCH_PATHS = ( + "$(maxsdk)/max-includes", + "$(maxsdk)/msp-includes", + ); + LIBRARY_SEARCH_PATHS = ( + "$(maxsdk)/msp-includes", + "$(maxsdk)/msp-includes", + ); + MACH_O_TYPE = mh_dylib; + PRODUCT_NAME = "$(inherited)-max"; + }; + name = Deployment; + }; + E9A5BCBA0A3381C400AD9F03 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = source/flext.h; + GCC_PREPROCESSOR_DEFINITIONS = ( + FLEXT_DEBUG, + FLEXT_USE_SIMD, + FLEXT_USE_CMEM, + ); + MACOSX_DEPLOYMENT_TARGET = 10.6; + PRODUCT_NAME = "$(PROJECT_NAME)"; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Development; + }; + E9A5BCBB0A3381C400AD9F03 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = source/flext.h; + GCC_PREPROCESSOR_DEFINITIONS = ( + FLEXT_USE_SIMD, + FLEXT_USE_CMEM, + ); + MACOSX_DEPLOYMENT_TARGET = 10.6; + PRODUCT_NAME = "$(PROJECT_NAME)"; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E9A5BCA10A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "PD static single" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BCA20A3381C400AD9F03 /* Development */, + E9A5BCA30A3381C400AD9F03 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Deployment; + }; + E9A5BCA50A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "PD static multi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BCA60A3381C400AD9F03 /* Development */, + E9A5BCA70A3381C400AD9F03 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Deployment; + }; + E9A5BCA90A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "PD shared" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BCAA0A3381C400AD9F03 /* Development */, + E9A5BCAB0A3381C400AD9F03 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Deployment; + }; + E9A5BCAD0A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "Max static single" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BCAE0A3381C400AD9F03 /* Development */, + E9A5BCAF0A3381C400AD9F03 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Deployment; + }; + E9A5BCB10A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "Max static multi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BCB20A3381C400AD9F03 /* Development */, + E9A5BCB30A3381C400AD9F03 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Deployment; + }; + E9A5BCB50A3381C400AD9F03 /* Build configuration list for PBXNativeTarget "Max shared" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BCB60A3381C400AD9F03 /* Development */, + E9A5BCB70A3381C400AD9F03 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Deployment; + }; + E9A5BCB90A3381C400AD9F03 /* Build configuration list for PBXProject "flext" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E9A5BCBA0A3381C400AD9F03 /* Development */, + E9A5BCBB0A3381C400AD9F03 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Deployment; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff --git a/externals/grill/trunk/flext/flext_settings_VS.props b/externals/grill/trunk/flext/flext_settings_VS.props new file mode 100644 index 0000000000000000000000000000000000000000..cec87b7ff24198f0ac15e6923304e51af229264e --- /dev/null +++ b/externals/grill/trunk/flext/flext_settings_VS.props @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ImportGroup Label="PropertySheets" /> + <PropertyGroup Label="UserMacros"> + <FLEXTPATH>C:\flext_svn\</FLEXTPATH> + <MAXSDKPATH>C:\maxmspsdk\c74support</MAXSDKPATH> + <PDPATH>C:\_pd_</PDPATH> + <STK_INC>%HOMEDRIVE%\%HOMEPATH%\stk\include</STK_INC> + <STK_LIB /> + <SNDOBJ_INC>%HOMEDRIVE%\%HOMEPATH%\SndObj\include</SNDOBJ_INC> + <SNDOBJ_LIB /> + <PTHREADSINC>%HOMEDRIVE%\%HOMEPATH%\pthreads\include</PTHREADSINC> + <PTHREADSLIB /> + </PropertyGroup> + <PropertyGroup /> + <ItemDefinitionGroup> + <ClCompile> + <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <AdditionalDependencies> + </AdditionalDependencies> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <BuildMacro Include="FLEXTPATH"> + <Value>$(FLEXTPATH)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="MAXSDKPATH"> + <Value>$(MAXSDKPATH)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="PDPATH"> + <Value>$(PDPATH)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="STK_INC"> + <Value>$(STK_INC)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="STK_LIB"> + <Value>$(STK_LIB)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="SNDOBJ_INC"> + <Value>$(SNDOBJ_INC)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="SNDOBJ_LIB"> + <Value>$(SNDOBJ_LIB)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="PTHREADSINC"> + <Value>$(PTHREADSINC)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + <BuildMacro Include="PTHREADSLIB"> + <Value>$(PTHREADSLIB)</Value> + <EnvironmentVariable>true</EnvironmentVariable> + </BuildMacro> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/externals/grill/trunk/flext/gpl.txt b/externals/grill/trunk/flext/gpl.txt new file mode 100644 index 0000000000000000000000000000000000000000..5ea29a7df45b73059f49c2c5c2ac65a134aa0808 --- /dev/null +++ b/externals/grill/trunk/flext/gpl.txt @@ -0,0 +1,346 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flatom.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flatom.cpp new file mode 100755 index 0000000000000000000000000000000000000000..366e101ceec1f6ec9634d2b0b3e2c084c2a1b03a --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flatom.cpp @@ -0,0 +1,179 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flatom.cpp + \brief Definitions for handling the t_atom type and lists thereof. +*/ + +#ifndef __FLEXT_ATOM_CPP +#define __FLEXT_ATOM_CPP + +#include "flext.h" + +#include <cstring> // for memcpy + +#include "flpushns.h" + +#if FLEXT_SYS != FLEXT_SYS_JMAX +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::CmpAtom(const t_atom &a,const t_atom &b) +{ + if(GetType(a) == GetType(b)) { + switch(GetType(a)) { + case A_FLOAT: return GetFloat(a) == GetFloat(b)?0:(GetFloat(a) < GetFloat(b)?-1:1); +#if FLEXT_SYS == FLEXT_SYS_MAX + case A_INT: return GetInt(a) == GetInt(b)?0:(GetInt(a) < GetInt(b)?-1:1); +#endif + case A_SYMBOL: return GetSymbol(a) == GetSymbol(b)?0:strcmp(GetString(a),GetString(b)); +#if FLEXT_SYS == FLEXT_SYS_PD + case A_POINTER: return GetPointer(a) == GetPointer(b)?0:(GetPointer(a) < GetPointer(b)?-1:1); +#endif + default: + // can't be compared..... + FLEXT_ASSERT(false); + return 0; + } + } + else + return GetType(a) < GetType(b)?-1:1; +} +#else +#error Not implemented +#endif + +FLEXT_TEMPIMPL(t_atom *FLEXT_CLASSDEF(flext))::CopyList(int argc,const t_atom *argv) +{ + t_atom *dst = new t_atom[argc]; + memcpy(dst,argv,argc*sizeof(t_atom)); + return dst; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::CopyAtoms(int cnt,t_atom *dst,const t_atom *src) +{ + if(dst < src) + // forward + memcpy(dst,src,cnt*sizeof(t_atom)); + else + // backwards + while(cnt--) dst[cnt] = src[cnt]; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomList::Alloc(int sz,int keepix,int keeplen,int keepto) +{ + if(lst) { + if(cnt == sz) { + if(keepix >= 0 && keepix != keepto) { + int c = keeplen >= 0?keeplen:cnt; + FLEXT_ASSERT(c+keepto <= cnt); + FLEXT_ASSERT(c+keepix <= cnt); + CopyAtoms(c,lst+keepto,lst+keepix); + } + + return; // no change + } + + t_atom *l; + if(sz) { + l = new t_atom[sz]; + if(keepix >= 0) { + // keep contents + int c = keeplen >= 0?keeplen:(cnt > sz?sz:cnt); + FLEXT_ASSERT(c+keepto <= sz); + FLEXT_ASSERT(c+keepix <= cnt); + CopyAtoms(c,l+keepto,lst+keepix); + } + } + else + l = NULL; + + Free(); + lst = l,cnt = sz; + } + else { + FLEXT_ASSERT(cnt == 0); + if(sz) lst = new t_atom[cnt = sz]; + } +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::AtomList::~AtomList() { Free(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomList::Free() +{ + if(lst) { + delete[] lst; lst = NULL; + cnt = 0; + } + else + FLEXT_ASSERT(cnt == 0); +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext))::AtomList &FLEXT_CLASSDEF(flext))::AtomList::Set(int argc,const t_atom *argv,int offs,bool resize) +{ + int ncnt = argc+offs; + if(resize) Alloc(ncnt); + + // argv can be NULL independently from argc + if(argv) CopyAtoms(argc,lst+offs,argv); + + return *this; +} + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::AtomList::Compare(const AtomList &a) const +{ + if(Count() == a.Count()) { + for(int i = 0; i < Count(); ++i) { + int cmp = CmpAtom(lst[i],a[i]); + if(cmp) return cmp; + } + return 0; + } + else + return Count() < a.Count()?-1:1; +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::AtomListStaticBase::~AtomListStaticBase() { Free(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomListStaticBase::Alloc(int sz,int keepix,int keeplen,int keepto) +{ + if(sz <= precnt) { + // small enough for pre-allocated space + + if(AtomList::lst != predata && AtomList::lst) { + // currently allocated memory is larger than what we need + + if(keepix >= 0) { + // keep contents + int c = keeplen >= 0?keeplen:(AtomList::cnt > sz?sz:AtomList::cnt); + FLEXT_ASSERT(c+keepto <= precnt); + FLEXT_ASSERT(c+keepix <= AtomList::cnt); + CopyAtoms(c,predata+keepto,AtomList::lst+keepix); + } + + // free allocated memory + AtomList::Free(); + } + AtomList::lst = predata; + AtomList::cnt = sz; + } + else + AtomList::Alloc(sz,keepix,keeplen,keepto); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomListStaticBase::Free() +{ + if(AtomList::lst != predata) + AtomList::Free(); + else { + AtomList::lst = NULL; + AtomList::cnt = 0; + } +} + +#include "flpopns.h" + +#endif // __FLEXT_ATOM_CPP + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flatom_part.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flatom_part.cpp new file mode 100755 index 0000000000000000000000000000000000000000..8d4a23f76480f9ff81a105686fe2cbd41b5472dd --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flatom_part.cpp @@ -0,0 +1,44 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flatom_part.cpp + \brief Definitions for handling the t_atom type and lists thereof. +*/ + +#ifndef __FLEXT_ATOM_PART_CPP +#define __FLEXT_ATOM_PART_CPP + +#include "flext.h" + +#include "flpushns.h" + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::AtomList::Get(t_atom *argv,int mxsz) const +{ + int argc = Count(); + if(mxsz >= 0 && argc > mxsz) argc = mxsz; + + for(int i = 0; i < argc; ++i) SetAtom(argv[i],lst[i]); + + return argc; +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomList::GetPart(int offs,int len,AtomList &ret) const +{ + if(offs+len > Count()) { + len = Count()-offs; + if(len < 0) len = 0; + } + + ret(len,Atoms()+offs); +} + +#include "flpopns.h" + +#endif // __FLEXT_ATOM_PART_CPP + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flatom_pr.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flatom_pr.cpp new file mode 100755 index 0000000000000000000000000000000000000000..795f37ba0d7a313651050a593f2446f32294c5dd --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flatom_pr.cpp @@ -0,0 +1,139 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flatom_pr.cpp + \brief Definitions for printing and scanning the t_atom type. +*/ + +#ifndef __FLEXT_ATOM_PR_CPP +#define __FLEXT_ATOM_PR_CPP + +#include "flext.h" + +#include <cctype> +#include <cstdlib> +#include <cstring> +#include <cstdio> + +#include "flpushns.h" + +#ifdef _MSC_VER +#define snprintf _snprintf +#endif + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::PrintAtom(const t_atom &a,char *buf,size_t bufsz) +{ + bool ok = true; + if(IsFloat(a)) { + ok = STD::snprintf(buf,bufsz,"%g",GetFloat(a)) > 0; + } + else if(IsInt(a)) { + ok = STD::snprintf(buf,bufsz,"%i",GetInt(a)) > 0; + } + else if(IsSymbol(a)) { + const char *c = GetString(a); + size_t len = strlen(c); + if(len < bufsz) { + memcpy(buf,c,len); buf[len] = 0; + ok = true; + } + else + ok = false; + } +#if FLEXT_SYS == FLEXT_SYS_PD +#ifndef FLEXT_COMPATIBLE + else if(IsPointer(a)) { + ok = STD::snprintf(buf,bufsz,"%p",GetPointer(a)) > 0; + } +#endif + else if(a.a_type == A_DOLLAR) { + ok = STD::snprintf(buf,bufsz,"$%d",a.a_w.w_index) > 0; + } + else if(a.a_type == A_DOLLSYM) { + ok = STD::snprintf(buf,bufsz,"$%s",GetString(a)) > 0; + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + else if(a.a_type == A_DOLLAR) { + ok = STD::snprintf(buf,bufsz,"$%ld",a.a_w.w_long) > 0; + } +#else +//#pragma message("Not implemented") +#endif + else { + error("flext: atom type unknown"); + ok = false; + } + return ok; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz) +{ + bool ok = true; + for(int i = 0; ok && i < argc && bufsz > 0; ++i) { + if(i) { *(buf++) = ' '; --bufsz; } // prepend space + + if(PrintAtom(argv[i],buf,bufsz)) { + size_t len = strlen(buf); + buf += len,bufsz -= len; + } + else + ok = false; + } + *buf = 0; + return ok; +} + + +FLEXT_TEMPIMPL(const char *FLEXT_CLASSDEF(flext))::ScanAtom(t_atom &a,const char *c) +{ + // skip leading whitespace + while(*c && isspace(*c)) ++c; + if(!*c) return NULL; + + // go to next space and save character + char *end = const_cast<char *>(c); + while(*end && !isspace(*end)) ++end; + char sv = *end; + + float fres; + // first try float + char *endp; + // see if it's a float - thanks to Frank Barknecht + fres = (float)strtod(c,&endp); + if(*c && endp != c) { + int ires = (int)fres; // try a cast + if(fres == ires) + SetInt(a,ires); + else + SetFloat(a,fres); + } + // no, it's a symbol + else + SetString(a,c); + + *end = sv; + + return end; +} + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::ScanList(int argc,t_atom *argv,const char *buf) +{ + int read; + for(read = 0; read < argc; ++read) + { + buf = ScanAtom(argv[read],buf); + if(!buf) break; + } + return read; +} + +#include "flpopns.h" + +#endif // __FLEXT_ATOM_PR_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flattr.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flattr.cpp new file mode 100755 index 0000000000000000000000000000000000000000..84ad85afd1ef9f58a3960c6ac61a1ca7e407f4f2 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flattr.cpp @@ -0,0 +1,453 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flattr.cpp + \brief Attribute handling for the flext base class +*/ + +#ifndef __FLEXT_ATTR_CPP +#define __FLEXT_ATTR_CPP + +#include "flext.h" + +#include <cstring> +#include <cctype> +#include <set> + +#include "flpushns.h" + +#ifdef __MWERKS__ +#define STD std +#else +#define STD +#endif + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::AttrItem::AttrItem(const t_symbol *t,metharg tp,methfun f,int fl): + Item(NULL),index(0), + flags(fl|afl_shown), + argtp(tp),fun(f), + counter(NULL),tag(t) +{} + + +/* +FLEXT_CLASSDEF(flext_base)::AttrDataCont::AttrDataCont() {} + +FLEXT_CLASSDEF(flext_base)::AttrDataCont::~AttrDataCont() +{ + for(iterator it = begin(); it != end(); ++it) + if(it.data()) delete it.data(); +} +*/ + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::AttrDataCont::~AttrDataCont() { clear(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AttrDataCont::clear() +{ + for(FLEXT_TEMP_TYPENAME AttrDataCont::iterator it(*this); it; ++it) delete it.data(); + TablePtrMap<const t_symbol *,AttrData *,8>::clear(); +} + +//! Add get and set attributes +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddAttrib(ItemCont *aa,ItemCont *ma,const t_symbol *asym,metharg tp,methfun gfun,methfun sfun) +{ + AttrItem *a,*b; + + FLEXT_ASSERT(asym != sym__ && asym != sym_list && asym != sym_float && asym != sym_symbol && asym != sym_anything); + + if(sfun) // if commented out, there will be a warning at run-time (more user-friendly) + { + a = new AttrItem(asym,tp,sfun,AttrItem::afl_set); + a->index = aa->Members(); + aa->Add(a,asym); + + // bind attribute to a method + MethItem *mi = new MethItem(a); + mi->SetArgs(sfun,1,new metharg(tp)); + ma->Add(mi,asym); + } + else + a = NULL; + + if(gfun) // if commented out, there will be a warning at run-time (more user-friendly) + { + b = new AttrItem(asym,tp,gfun,AttrItem::afl_get); + b->index = aa->Members(); + aa->Add(b,asym); + + static char tmp[256] = "get"; + strcpy(tmp+3,GetString(asym)); + + // bind attribute to a method + MethItem *mi = new MethItem(b); + mi->SetArgs(gfun,0,NULL); + ma->Add(mi,MakeSymbol(tmp)); + } + else + b = NULL; + + if(a && b) { + a->counter = b; + b->counter = a; + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddAttrib(const t_symbol *attr,metharg tp,methfun gfun,methfun sfun) +{ + if(HasAttributes()) + AddAttrib(ThAttrs(),ThMeths(),attr,tp,gfun,sfun); + else + error("%s - attribute procession is not enabled!",thisName()); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddAttrib(t_classid c,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun) +{ + AddAttrib(ClAttrs(c),ClMeths(c),attr,tp,gfun,sfun); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ListAttrib(AtomList &la) const +{ + typedef TablePtrMap<int,const t_symbol *,32> AttrList; + AttrList list[2]; + ItemCont *clattrhead = ClAttrs(thisClassId()); + + int i; + for(i = 0; i <= 1; ++i) { + ItemCont *a = i?attrhead:clattrhead; + if(a && a->Contained(0)) { + ItemSet &ai = a->GetInlet(); + for(FLEXT_TEMP_TYPENAME ItemSet::iterator as(ai); as; ++as) { + for(Item *al = as.data(); al; al = al->nxt) { + AttrItem *aa = (AttrItem *)al; + list[i].insert(aa->index,as.key()); + break; + } + } + } + } + + la((int)(list[0].size()+list[1].size())); + int ix = 0; + for(i = 0; i <= 1; ++i) + for(AttrList::iterator it(list[i]); it; ++it) + SetSymbol(la[ix++],it.data()); +} + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext_base))::CheckAttrib(int argc,const t_atom *argv) +{ + int offs = 0; + for(; offs < argc; ++offs) + if(IsString(argv[offs]) && *GetString(argv[offs]) == '@') break; + return offs; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::InitAttrib(int argc,const t_atom *argv) +{ + int cur,nxt; + for(cur = 0; cur < argc; cur = nxt) { + // find next @symbol + for(nxt = cur+1; nxt < argc; ++nxt) + if(IsString(argv[nxt]) && *GetString(argv[nxt]) == '@') break; + + const t_symbol *tag = MakeSymbol(GetString(argv[cur])+1); + + // find puttable attribute + AttrItem *attr = FindAttrib(tag,false,true); + if(attr) { + // make an entry (there are none beforehand...) +/* + AttrDataCont::iterator it = attrdata->find(tag); + if(it == attrdata->end()) { + AttrDataCont::pair pair; + pair.key() = tag; + pair.data() = new AttrData; + it = attrdata->insert(attrdata->begin(),pair); + } + + AttrData &a = *it.data(); + a.SetInit(true); + a.SetInitValue(nxt-cur-1,argv+cur+1); + + // pass value to object + SetAttrib(tag,attr,a.GetInitValue()); +*/ + AttrData *a = attrdata->find(tag); + if(!a) { + AttrData *old = attrdata->insert(tag,a = new AttrData); + FLEXT_ASSERT(!old); + } + + a->SetInit(true); + a->SetInitValue(nxt-cur-1,argv+cur+1); + + // pass value to object + SetAttrib(tag,attr,a->GetInitValue()); + } + } + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::ListAttrib() const +{ + if(HasAttributes()) { + // defined in flsupport.cpp + AtomListStatic<32> la; + ListAttrib(la); + ToOutAnything(GetOutAttr(),sym_attributes,la.Count(),la.Atoms()); + return true; + } + else + return false; +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::AttrItem *FLEXT_CLASSDEF(flext_base))::FindAttrib(const t_symbol *tag,bool get,bool msg) const +{ + ItemCont *clattrhead = ClAttrs(thisClassId()); + + // first search within object scope + AttrItem *a = NULL; + { + for(Item *lst = attrhead->FindList(tag); lst; lst = lst->nxt) { + AttrItem *b = (AttrItem *)lst; + if(get?b->IsGet():b->IsSet()) { a = b; break; } + } + } + + // then (if nothing found) search within class scope + if(!a) { + for(Item *lst = clattrhead->FindList(tag); lst; lst = lst->nxt) { + AttrItem *b = (AttrItem *)lst; + if(get?b->IsGet():b->IsSet()) { a = b; break; } + } + } + + if(!a && msg) { + // print a message + error("%s - %s: attribute not found",thisName(),GetString(tag)); + } + return a; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::SetAttrib(const t_symbol *tag,int argc,const t_atom *argv) +{ + // search for matching attribute + AttrItem *a = FindAttrib(tag,false,true); + return a && SetAttrib(tag,a,argc,argv); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::SetAttrib(const t_symbol *tag,AttrItem *a,int argc,const t_atom *argv) +{ + if(a->fun) { + bool ok = true; + + t_any any; + switch(a->argtp) { + case a_float: + if(argc == 1 && CanbeFloat(argv[0])) { + any.ft = GetAFloat(argv[0]); + ((methfun_1)a->fun)(this,any); + } + else ok = false; + break; + case a_int: + if(argc == 1 && CanbeInt(argv[0])) { + any.it = GetAInt(argv[0]); + ((methfun_1)a->fun)(this,any); + } + else ok = false; + break; + case a_symbol: + if(argc == 1 && IsSymbol(argv[0])) { + t_atom at; + GetParamSym(at,GetSymbol(argv[0]),thisCanvas()); + any.st = const_cast<t_symbol *>(GetSymbol(at)); + ((methfun_1)a->fun)(this,any); + } + else ok = false; + break; + case a_bool: + if(argc == 1 && CanbeBool(argv[0])) { + any.bt = GetABool(argv[0]); + ((methfun_1)a->fun)(this,any); + } + else ok = false; + break; + case a_LIST: { + AtomListStatic<16> la(argc); + for(int i = 0; i < argc; ++i) + if(IsSymbol(argv[i])) + GetParamSym(la[i],GetSymbol(argv[i]),thisCanvas()); + else + la[i] = argv[i]; + + any.vt = &la; + ((methfun_1)a->fun)(this,any); + break; + } + default: + ERRINTERNAL(); + } + + if(!ok) + post("%s - wrong arguments for attribute %s",thisName(),GetString(tag)); + } + else + post("%s - attribute %s has no get method",thisName(),GetString(tag)); + return true; +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::GetAttrib(const t_symbol *tag,AttrItem *a,AtomList &la) const +{ + bool ok = true; + // main attribute tag + if(a) { + if(a->fun) { + t_any any; + switch(a->argtp) { + case a_float: { + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + la(1); + SetFloat(la[0],any.ft); + break; + } + case a_int: { + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + la(1); + SetInt(la[0],any.it); + break; + } + case a_bool: { + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + la(1); + SetBool(la[0],any.bt); + break; + } + case a_symbol: { + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + la(1); + SetSymbol(la[0],any.st); + break; + } + case a_LIST: { + any.vt = &la; + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + break; + } + default: + ERRINTERNAL(); + ok = false; + } + } + else { + post("%s - attribute %s has no get method",thisName(),GetString(tag)); + ok = false; + } + } + else { + error("%s - %s: attribute not found",thisName(),GetString(tag)); + ok = false; + } + return ok; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::GetAttrib(const t_symbol *s,AtomList &a) const +{ + AttrItem *attr = FindAttrib(s,true); + return attr && GetAttrib(s,attr,a); +} + +//! \param tag symbol "get[attribute]" +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::DumpAttrib(const t_symbol *tag,AttrItem *a) const +{ + AtomListStatic<16> la; + bool ret = GetAttrib(tag,a,la); + if(ret) { + ToOutAnything(GetOutAttr(),a->tag,la.Count(),la.Atoms()); + } + return ret; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::DumpAttrib(const t_symbol *attr) const +{ + AttrItem *item = FindAttrib(attr,true); + return item && DumpAttrib(attr,item); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::BangAttrib(const t_symbol *attr,AttrItem *item) +{ + AtomListStatic<16> val; + AttrItem *item2; + if(!item->IsGet()) + item = item->Counterpart(); + if(item) { + item2 = item->Counterpart(); + return item2 && GetAttrib(attr,item,val) && SetAttrib(attr,item2,val); + } + else + return false; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::BangAttrib(const t_symbol *attr) +{ + AttrItem *item = FindAttrib(attr,true); + return item && BangAttrib(attr,item); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::BangAttribAll() +{ + ItemCont *clattrhead = ClAttrs(thisClassId()); + + for(int i = 0; i <= 1; ++i) { + ItemCont *a = i?attrhead:clattrhead; + if(a) { + ItemSet &ai = a->GetInlet(); // \todo need to check for presence of inlet 0? +/* + for(ItemSet::iterator as = ai.begin(); as != ai.end(); ++as) { + for(Item *al = as.data(); al; al = al->nxt) { + AttrItem *a = (AttrItem *)al; + if(a->IsGet() && a->BothExist()) BangAttrib(as.key(),a); + } + } +*/ + for(FLEXT_TEMP_TYPENAME ItemSet::iterator as(ai); as; ++as) { + for(Item *al = as.data(); al; al = al->nxt) { + AttrItem *a = (AttrItem *)al; + if(a->IsGet() && a->BothExist()) BangAttrib(as.key(),a); + } + } + } + } + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::ShowAttrib(AttrItem *a,bool show) const +{ + if(show) a->flags |= AttrItem::afl_shown; + else a->flags &= ~AttrItem::afl_shown; + + // also change counterpart, if present + AttrItem *ca = a->Counterpart(); + if(ca) { + if(show) ca->flags |= AttrItem::afl_shown; + else ca->flags &= ~AttrItem::afl_shown; + } + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::ShowAttrib(const t_symbol *attr,bool show) const +{ + AttrItem *item = FindAttrib(attr,true); + return item && ShowAttrib(item,show); +} + +#include "flpopns.h" + +#endif // __FLEXT_ATTR_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flattr_ed.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flattr_ed.cpp new file mode 100755 index 0000000000000000000000000000000000000000..d8e9568d75a2611017046181116de089a4aed45b --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flattr_ed.cpp @@ -0,0 +1,884 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flattr_ed.cpp + \brief Attribute editor (property dialog) for PD +*/ + +#ifndef __FLEXT_ATTR_ED_CPP +#define __FLEXT_ATTR_ED_CPP + +#include "flext.h" + +#include "flpushns.h" + +#if FLEXT_SYS == FLEXT_SYS_PD + +#ifdef _MSC_VER +#pragma warning( disable : 4091 ) +#endif + + +#if defined(FLEXT_ATTRHIDE) || PD_MINOR_VERSION < 37 +#define __FLEXT_WIDGETBEHAVIOR +#endif + +////////////////////////////////////////////////////// +#ifdef __FLEXT_WIDGETBEHAVIOR +// we need non-public headers! +#pragma message("Attention: non-public headers used - binary is bound to a specific version") + +#include <g_canvas.h> + +/* +#ifdef PD_DEVEL_VERSION +#define __FLEXT_CLONEWIDGET +#endif +*/ + +#ifndef __FLEXT_CLONEWIDGET +#include <m_imp.h> +#endif + +#endif +////////////////////////////////////////////////////// + + +#include <string.h> +#include <stdio.h> + + +#ifdef FLEXT_ATTRHIDE +#ifndef __FLEXT_CLONEWIDGET +static t_visfn ori_vis = NULL; +static t_selectfn ori_select = NULL; +#endif +#endif + + +#ifdef FLEXT_ATTRHIDE +#define ST_DISABLED "" +#else +#define ST_DISABLED " -state disabled" +#endif + + +#ifndef FLEXT_NOATTREDIT + +//! generate the script for the property dialog +FLEXT_TEMPLATE +void tclscript() +{ + static bool havecode = false; + if(havecode) return; + else havecode = true; + + sys_vgui(const_cast<char *>( + "proc flext_escatoms {lst} {\n" + "set tmp {}\n" + "foreach a $lst {\n" +// "set a [regsub {\\\\} $a \\\\\\\\]\n" // replace \ with \\ ... must be first + "set a [regsub {\\$} $a \\\\$]\n" // replace $ with \$ +// "set a [regsub {\\{} $a \\\\\\{]\n" // replace { with \{ +// "set a [regsub {\\}} $a \\\\\\}]\n" // replace } with \} +// "set a [regsub {\\ } $a \\\\\\ ]\n" // replace space with \space + "set a [regsub {,} $a \\\\,]\n" // replace , with \, + "set a [regsub {;} $a \\\\\\;]\n" // replace ; with \; + "lappend tmp $a\n" + "}\n" + "return $tmp\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_makevalue {id ix} {\n" + // strip "." from the TK id to make a variable name suffix + "set vid [string trimleft $id .]\n" + + "set var_attr_name [concat [concat var_name_$ix]_$vid ]\n" + "set var_attr_init [concat [concat var_init_$ix]_$vid ]\n" + "set var_attr_val [concat [concat var_val_$ix]_$vid ]\n" + "set var_attr_save [concat [concat var_save_$ix]_$vid ]\n" + "set var_attr_type [concat [concat var_type_$ix]_$vid ]\n" + + "global $var_attr_name $var_attr_init $var_attr_val $var_attr_save $var_attr_type\n" + + "set lst {}\n" + + "if { [expr $$var_attr_type] != 0 } {\n" + // attribute is puttable + + "lappend lst [eval concat $$var_attr_name]\n" + + // process current value + "set tmp [flext_escatoms [eval concat $$var_attr_val]]\n" + "set lst [concat $lst [llength $tmp] $tmp]\n" + + // process init value + "set tmp [flext_escatoms [eval concat $$var_attr_init]]\n" + "set lst [concat $lst [llength $tmp] $tmp]\n" + + "lappend lst [eval concat $$var_attr_save]\n" + "}\n" + + // return list + "return $lst\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_apply {id ix} {\n" + "set lst [flext_makevalue $id $ix]\n" + "set lst [eval concat $lst]\n" // remove curly braces from character escaping + "pd [concat $id attributedialog $lst \\;]\n" + "}\n" + + "proc flext_applyall {id alen} {\n" + // make a list of the attribute values (including save flags) + + "set lst {}\n" + "for {set ix 1} {$ix <= $alen} {incr ix} {\n" + "set lst [concat $lst [flext_makevalue $id $ix]]\n" + "}\n" + "set lst [eval concat $lst]\n" // remove curly braces from character escaping + + "pd [concat $id attributedialog $lst \\;]\n" + "}\n" + + "proc flext_cancel {id} {\n" + "pd [concat $id cancel \\;]\n" + "}\n" + + "proc flext_ok {id alen} {\n" + "flext_applyall $id $alen\n" + "flext_cancel $id\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_help {id} {\n" + "toplevel $id.hw\n" + "wm title $id.hw \"Flext attribute editor help\"\n" + + "frame $id.hw.buttons\n" + "pack $id.hw.buttons -side bottom -fill x -pady 2m\n" + + "text $id.hw.text -relief sunken -bd 2 -yscrollcommand \"$id.hw.scroll set\" -setgrid 1 -width 80 -height 10 -wrap word\n" + "scrollbar $id.hw.scroll -command \"$id.hw.text yview\"\n" + "pack $id.hw.scroll -side right -fill y\n" + "pack $id.hw.text -expand yes -fill both\n" + + "button $id.hw.buttons.ok -text OK -command \"destroy $id.hw\"\n" + "pack $id.hw.buttons.ok -side left -expand 1\n" + "bind $id.hw {<KeyPress-Escape>} \"destroy $id.hw\"\n" + + "$id.hw.text tag configure big -font {Arial 10 bold}\n" + "$id.hw.text configure -font {Arial 8 bold}\n" + "$id.hw.text insert end \"" + "The flext attribute editor lets you query or change attribute values exposed by an external object. \" big \"\n\n" + "Local variable names ($-values) will only be saved as such for init values. " + "Alternatively, # can be used instead of $.\n" + "Ctrl-Button on a text field will open an editor window where text can be entered more comfortably.\n" + "\"\n" + "$id.hw.text configure -state disabled\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_copyval {dst src} {\n" + "global $src $dst\n" + "set $dst [expr $$src]\n" + "}\n" + + "proc flext_textcopy {id idtxt var} {\n" + "global $var\n" + "set txt [eval $idtxt get 0.0 end]\n" + // strip newline characters + "set tmp {}\n" + "foreach t $txt { lappend tmp [string trim $t] }\n" + "set $var $tmp\n" + "destroy $id\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_textzoom {id var title attr edit} {\n" + "global $var\n" + "toplevel $id.w\n" + "wm title $id.w [concat $title \" @\" $attr]\n" +// "wm iconname $w \"text\"\n" +// "positionWindow $id.w\n" + + "frame $id.w.buttons\n" + "pack $id.w.buttons -side bottom -fill x -pady 2m\n" + + "text $id.w.text -relief sunken -bd 2 -yscrollcommand \"$id.w.scroll set\" -setgrid 1 -width 80 -height 20\n" + "scrollbar $id.w.scroll -command \"$id.w.text yview\"\n" + "pack $id.w.scroll -side right -fill y\n" + "pack $id.w.text -expand yes -fill both\n" + + // insert text with newlines + "set txt [split [expr $$var] ,]\n" + "set lines [llength $txt]\n" + "for {set ix 0} {$ix < ($lines-1)} {incr ix} {\n" + "$id.w.text insert end [string trim [lindex $txt $ix] ]\n" + "$id.w.text insert end \" ,\\n\"\n" + "}\n" + "$id.w.text insert end [string trim [lindex $txt end] ]\n" + + "$id.w.text mark set insert 0.0\n" + + "if { $edit != 0 } then {\n" + "button $id.w.buttons.ok -text OK -command \"flext_textcopy $id.w $id.w.text $var\"\n" + "pack $id.w.buttons.ok -side left -expand 1\n" +// "bind $id.w {<Shift-KeyPress-Return>} \"flext_textcopy $id.w $id.w.text $var\"\n" + "} " + "else { $id.w.text configure -state disabled }\n" + + "button $id.w.buttons.cancel -text Cancel -command \"destroy $id.w\"\n" + "pack $id.w.buttons.cancel -side left -expand 1\n" + "bind $id.w {<KeyPress-Escape>} \"destroy $id.w\"\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc pdtk_flext_dialog {id title attrlist} {\n" + "set vid [string trimleft $id .]\n" + "set alen [expr [llength $attrlist] / 6 ]\n" + + "toplevel $id\n" + "wm title $id $title\n" + "wm protocol $id WM_DELETE_WINDOW [concat flext_cancel $id]\n" + + "frame $id.frame\n" + "set row 0\n" + + // set grow parameters + "grid columnconfigure $id.frame 0 -weight 1\n" // label + "grid columnconfigure $id.frame {1 4} -weight 3\n" // value entry + "grid columnconfigure $id.frame {2 3} -weight 0\n" // copy buttons + "grid columnconfigure $id.frame 5 -weight 1\n" // apply button + "grid columnconfigure $id.frame {6 7 8} -weight 0\n" // radio buttons + + "grid rowconfigure $id.frame {0 1} -weight 0\n" + + // set column labels + "label $id.frame.label -text {attribute} -font {Helvetica 9 bold}\n" + "label $id.frame.init -text {initial value} -font {Helvetica 9 bold}\n" + "label $id.frame.copy -text {copy} -font {Helvetica 9 bold}\n" + "label $id.frame.val -text {current value} -font {Helvetica 9 bold}\n" + "label $id.frame.apply -text {} -font {Helvetica 9 bold}\n" // why must this be empty? + "foreach {i txt} {0 {don't\rsave} 1 {do\rinit} 2 {always\rsave} } {\n" + "label $id.frame.b$i -text $txt -font {Helvetica 7 bold}\n" + "}\n" + + "grid config $id.frame.label -column 0 -row $row \n" + "grid config $id.frame.init -column 1 -row $row \n" + "grid config $id.frame.copy -column 2 -columnspan 2 -row $row \n" + "grid config $id.frame.val -column 4 -row $row \n" + "grid config $id.frame.apply -column 5 -row $row \n" + "foreach i {0 1 2} { grid config $id.frame.b$i -column [expr $i + 6] -row $row }\n" + "incr row\n" + + // Separator + "frame $id.frame.sep -relief ridge -bd 1 -height 2\n" + "grid config $id.frame.sep -column 0 -columnspan 9 -row $row -pady 2 -sticky {snew}\n" + "incr row\n") + ); + sys_vgui(const_cast<char *>( + "set ix 1\n" + "foreach {an av ai atp asv afl} $attrlist {\n" + "grid rowconfigure $id.frame $row -weight 1\n" + + // get attribute name + "set var_attr_name [concat [concat var_name_$ix]_$vid ]\n" + "global $var_attr_name\n" + "set $var_attr_name $an\n" + + // get attribute init value (list) + "set var_attr_init [concat [concat var_init_$ix]_$vid ]\n" + "global $var_attr_init\n" + "set $var_attr_init $ai\n" + + // get attribute value (list) + "set var_attr_val [concat [concat var_val_$ix]_$vid ]\n" + "global $var_attr_val\n" + "set $var_attr_val $av\n" + + // get save flag + "set var_attr_save [concat [concat var_save_$ix]_$vid ]\n" + "global $var_attr_save\n" + "set $var_attr_save $asv\n" + + // get type flag + "set var_attr_type [concat [concat var_type_$ix]_$vid ]\n" + "global $var_attr_type\n" + "set $var_attr_type $afl\n" + + // add dialog elements to window + + // attribute label + "label $id.frame.label-$ix -text \"$an :\" -font {Helvetica 8 bold}\n" + "grid config $id.frame.label-$ix -column 0 -row $row -padx 5 -sticky {e}\n") + ); + sys_vgui(const_cast<char *>( + "if { $afl != 0 } {\n" + // attribute is puttable + + // entry field for initial value + // entry field for current value + + // choose entry field type + "switch $atp {\n" + "0 - 1 {\n" // int or float + "entry $id.frame.init-$ix -textvariable $var_attr_init" ST_DISABLED "\n" + "entry $id.frame.val-$ix -textvariable $var_attr_val\n" + "}\n" + "2 {\n" // boolean + "checkbutton $id.frame.init-$ix -variable $var_attr_init" ST_DISABLED "\n" + "checkbutton $id.frame.val-$ix -variable $var_attr_val\n" + "}\n" + "3 {\n" // symbol + "entry $id.frame.init-$ix -textvariable $var_attr_init" ST_DISABLED "\n" + "entry $id.frame.val-$ix -textvariable $var_attr_val\n" + "}\n" + "4 - 5 {\n" // list or unknown + "entry $id.frame.init-$ix -textvariable $var_attr_init" ST_DISABLED "\n" + "bind $id.frame.init-$ix {<Control-Button-1>} \" flext_textzoom $id.frame.init-$ix $var_attr_init { $title } $an 1\"\n" + "entry $id.frame.val-$ix -textvariable $var_attr_val\n" + "bind $id.frame.val-$ix {<Control-Button-1>} \" flext_textzoom $id.frame.val-$ix $var_attr_val { $title } $an 1\"\n" + "}\n" + "}\n" + + "grid config $id.frame.init-$ix -column 1 -row $row -padx 5 -sticky {ew}\n" + "grid config $id.frame.val-$ix -column 4 -row $row -padx 5 -sticky {ew}\n" + + // copy buttons + "button $id.frame.b2i-$ix -text {<-} -height 1 -command \" flext_copyval $var_attr_init $var_attr_val \"" ST_DISABLED "\n" + "grid config $id.frame.b2i-$ix -column 2 -row $row -sticky {ew}\n" + "button $id.frame.b2c-$ix -text {->} -height 1 -command \" flext_copyval $var_attr_val $var_attr_init \"\n" + "grid config $id.frame.b2c-$ix -column 3 -row $row -sticky {ew}\n" + + // apply button + "button $id.frame.apply-$ix -text {Apply} -height 1 -command \" flext_apply $id $ix \"\n" + "grid config $id.frame.apply-$ix -column 5 -row $row -sticky {ew}\n" + + // radiobuttons + "foreach {i c} {0 black 1 blue 2 red} {\n" + "radiobutton $id.frame.b$i-$ix -value $i -foreground $c -variable $var_attr_save" ST_DISABLED "\n" + "grid config $id.frame.b$i-$ix -column [expr $i + 6] -row $row\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "} else {\n" + // attribute is gettable only + + // entry field for current value (read-only) + + // choose display field type + "switch $atp {\n" + "0 - 1 {\n" // int or float + "entry $id.frame.val-$ix -textvariable $var_attr_val -state disabled\n" + "}\n" + "2 {\n" // boolean + "checkbutton $id.frame.val-$ix -variable $var_attr_val -state disabled\n" + "}\n" + "3 {\n" // symbol + "entry $id.frame.val-$ix -textvariable $var_attr_val -state disabled\n" + "}\n" + "4 - 5 {\n" // list or unknown + "entry $id.frame.val-$ix -textvariable $var_attr_val -state disabled\n" + "bind $id.frame.val-$ix {<Control-Button-1>} \" flext_textzoom $id.frame.val-$ix $var_attr_val { $title } $an 0\"\n" + "}\n" + "}\n" + +// "entry $id.fval.val-$ix -textvariable $var_attr_val -state disabled\n" + "grid config $id.frame.val-$ix -column 4 -row $row -padx 5 -sticky {ew}\n" + + "label $id.frame.readonly-$ix -text \"read-only\"\n" + "grid config $id.frame.readonly-$ix -column 6 -columnspan 3 -row $row -padx 5 -sticky {ew}\n" + "}\n" + + // increase counter + "incr ix\n" + "incr row\n" + "}\n" + + // empty space + "grid rowconfigure $id.frame $row -weight 1\n" + "frame $id.frame.dummy\n" + "grid config $id.frame.dummy -column 0 -columnspan 9 -row $row\n" + "incr row\n") + ); + sys_vgui(const_cast<char *>( + // Separator + "frame $id.sep2 -relief ridge -bd 1 -height 2\n" + + // Buttons + "frame $id.buttonframe\n" + + "button $id.buttonframe.cancel -text {Leave} -width 20 -command \" flext_cancel $id \"\n" + "button $id.buttonframe.apply -text {Apply all} -width 20 -command \" flext_applyall $id $alen \"\n" + "button $id.buttonframe.ok -text {Apply & Leave} -width 20 -command \" flext_ok $id $alen \"\n" + "button $id.buttonframe.help -text {Help} -width 10 -command \" flext_help $id \"\n" + + "grid columnconfigure $id.buttonframe {0 1 2 3} -weight 1\n" + "grid config $id.buttonframe.cancel $id.buttonframe.apply $id.buttonframe.ok $id.buttonframe.help -padx 2 -sticky {snew}\n" + +// "scrollbar $id.scroll -command \"$id.frame yview\"\n" + + "pack $id.buttonframe $id.sep2 -pady 2 -expand 0 -side bottom -fill x\n" +// "pack $id.scroll -side right -fill y\n" + "pack $id.frame -expand 1 -side top -fill both\n" + + // Key bindings + "bind $id {<KeyPress-Escape>} \" flext_cancel $id \"\n" + "bind $id {<KeyPress-Return>} \" flext_ok $id $alen \"\n" + "bind $id {<Shift-KeyPress-Return>} \" flext_applyall $id $alen \"\n" + "}\n") + ); +} + +#endif + + +#ifdef __FLEXT_WIDGETBEHAVIOR +static t_widgetbehavior widgetbehavior; +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::SetGfx(t_classid c) +{ + t_class *cl = getClass(c); + // widgetbehavior struct MUST be resident... (static is just ok here) + +#ifdef __FLEXT_WIDGETBEHAVIOR +#ifndef __FLEXT_CLONEWIDGET + widgetbehavior.w_visfn = cl->c_wb->w_visfn; + widgetbehavior.w_selectfn = cl->c_wb->w_selectfn; + widgetbehavior.w_getrectfn = cl->c_wb->w_getrectfn; + widgetbehavior.w_displacefn = cl->c_wb->w_displacefn; + widgetbehavior.w_activatefn = cl->c_wb->w_activatefn; + widgetbehavior.w_deletefn = cl->c_wb->w_deletefn; + widgetbehavior.w_selectfn = cl->c_wb->w_selectfn; + widgetbehavior.w_clickfn = cl->c_wb->w_clickfn; +#else + widgetbehavior.w_visfn = text_widgetbehavior.w_visfn; + widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn; + widgetbehavior.w_getrectfn = text_widgetbehavior.w_getrectfn; + widgetbehavior.w_displacefn = text_widgetbehavior.w_displacefn; + widgetbehavior.w_activatefn = text_widgetbehavior.w_activatefn; + widgetbehavior.w_deletefn = text_widgetbehavior.w_deletefn; + widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn; + widgetbehavior.w_clickfn = text_widgetbehavior.w_clickfn; +#endif +#endif + +#ifdef FLEXT_ATTRHIDE + +#ifndef __FLEXT_CLONEWIDGET + ori_vis = widgetbehavior.w_visfn; + ori_select = widgetbehavior.w_selectfn; +#endif + widgetbehavior.w_visfn = (t_visfn)cb_GfxVis; + widgetbehavior.w_selectfn = (t_selectfn)cb_GfxSelect; + +#if PD_MINOR_VERSION >= 37 + class_setsavefn(cl,(t_savefn)cb_GfxSave); +#else + widgetbehavior.w_savefn = (t_savefn)cb_GfxSave; +#endif + +#endif // FLEXT_ATTRHIDE + + +#ifndef FLEXT_NOATTREDIT + +#if PD_MINOR_VERSION >= 37 + class_setpropertiesfn(cl,(t_propertiesfn)cb_GfxProperties); +#else + widgetbehavior.w_propertiesfn = (t_propertiesfn)cb_GfxProperties; +#endif + + FLEXT_TEMPINST(tclscript)(); +#endif // FLEXT_NOATTREDIT + +#ifdef __FLEXT_WIDGETBEHAVIOR + class_setwidget(cl, &widgetbehavior); +#endif +} + + +#ifndef FLEXT_NOATTREDIT + +FLEXT_TEMPLATE +size_t escapeit(char *dst,size_t maxlen,const char *src) +{ + char *d; + for(d = dst; *src && (d-dst) < (int)maxlen; ++src) { + if(*src == '%') + *(d++) = '%',*(d++) = '%'; + else + *(d++) = *src; + } + *d = 0; + return d-dst; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_GfxProperties(flext_hdr *c, t_glist *) +{ + flext_base *th = thisObject(c); + char buf[1000]; + + // beginning of proc + sys_vgui(const_cast<char *>("proc pdtk_flext_dialog_%p {title} {\n"),th); + + sys_vgui(const_cast<char *>("pdtk_flext_dialog $title {\n")); + + // add title + t_text *x = (t_text *)c; + FLEXT_ASSERT(x->te_binbuf); + + int argc = binbuf_getnatom(x->te_binbuf); + t_atom *argv = binbuf_getvec(x->te_binbuf); + + PrintList(argc,argv,buf,sizeof(buf)); + sys_vgui(const_cast<char *>("%s } {\n"),buf); + + AtomListStatic<32> la; + th->ListAttrib(la); + int cnt = la.Count(); + + for(int i = 0; i < cnt; ++i) { + const t_symbol *sym = GetSymbol(la[i]); + + // get attribute + AttrItem *gattr = th->FindAttrib(sym,true); + // get puttable attribute + AttrItem *pattr = gattr?gattr->Counterpart():th->FindAttrib(sym,false); + + // get flags + int sv; + const AtomList *initdata; + const AttrData *a = th->attrdata->find(sym); +// AttrDataCont::iterator it = th->attrdata->find(sym); +// if(it == th->attrdata->end()) + if(!a) + sv = 0,initdata = NULL; + else { +// const AttrData &a = *it.data(); + if(a->IsSaved()) + sv = 2; + else if(a->IsInit()) + sv = 1; + else + sv = 0; + initdata = a->IsInitValue()?&a->GetInitValue():NULL; + } + + // get attribute type + int tp; + bool list; + switch((gattr?gattr:pattr)->argtp) { + case a_int: tp = 0; list = false; break; + case a_float: tp = 1; list = false; break; + case a_bool: tp = 2; list = false; break; + case a_symbol: tp = 3; list = true; break; + case a_list: + case a_LIST: tp = 4; list = true; break; + default: + tp = 5; list = true; + FLEXT_ASSERT(false); + } + + sys_vgui(const_cast<char *>(list?"%s {":"%s "),GetString(sym)); + + AtomListStatic<32> lv; + if(gattr) { // gettable attribute is present + // Retrieve attribute value + th->GetAttrib(sym,gattr,lv); + + char *b = buf; *b = 0; + for(int i = 0; i < lv.Count(); ++i) { + char tmp[100]; + PrintAtom(lv[i],tmp,sizeof tmp); + b += FLEXT_TEMPINST(escapeit)(b,sizeof(buf)+buf-b,tmp); + if(i < lv.Count()-1) { *(b++) = ' '; *b = 0; } + } + sys_vgui(const_cast<char *>("%s"),buf); + } + else + sys_vgui(const_cast<char *>("{}")); + + sys_vgui(const_cast<char *>(list?"} {":" ")); + + if(pattr) { + // if there is initialization data take this, otherwise take the current data + const AtomList &lp = initdata?*initdata:static_cast<const AtomList &>(lv); + + char *b = buf; *b = 0; + for(int i = 0; i < lp.Count(); ++i) { + char tmp[256]; + PrintAtom(lp[i],tmp,sizeof(tmp)); + b += FLEXT_TEMPINST(escapeit)(b,sizeof(buf)+buf-b,tmp); + if(i < lp.Count()-1) { *(b++) = ' '; *b = 0; } + } + sys_vgui(const_cast<char *>("%s"),buf); + } + else + sys_vgui(const_cast<char *>("{}")); + + + sys_vgui(const_cast<char *>(list?"} %i %i %i \n":" %i %i %i \n"),tp,sv,pattr?(pattr->BothExist()?2:1):0); + } + + sys_vgui(const_cast<char *>(" } }\n")); // end of proc + + STD::sprintf(buf,"pdtk_flext_dialog_%p %%s\n",th); + gfxstub_new((t_pd *)th->thisHdr(), th->thisHdr(),buf); + + //! \todo delete proc in TCL space +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::cb_AttrDialog(flext_base *th,int argc,const t_atom *argv) +{ + for(int i = 0; i < argc; ) { + FLEXT_ASSERT(IsSymbol(argv[i])); + + // get name + const t_symbol *aname = GetSymbol(argv[i]); + i++; + + // get current value + FLEXT_ASSERT(CanbeInt(argv[i])); + int ccnt,coffs; + ccnt = GetAInt(argv[i]); + coffs = ++i; + i += ccnt; + + // get init value + FLEXT_ASSERT(CanbeInt(argv[i])); + int icnt,ioffs; + icnt = GetAInt(argv[i]); + ioffs = ++i; + i += icnt; + + FLEXT_ASSERT(i < argc); + int sv = GetAInt(argv[i]); + ++i; + + // find puttable attribute + AttrItem *attr = th->FindAttrib(aname,false); + if(attr) { + bool ret = th->SetAttrib(aname,attr,ccnt,argv+coffs); + FLEXT_ASSERT(ret); + + AttrData *a = th->attrdata->find(aname); + if(sv >= 1) { + // if data not present create it + if(!a) { + AttrData *old = th->attrdata->insert(aname,a = new AttrData); + FLEXT_ASSERT(!old); + } + + a->SetSave(sv == 2); + a->SetInit(true); + a->SetInitValue(icnt,argv+ioffs); + } + else { + if(a) { + // if data is present reset flags + a->SetSave(false); + a->SetInit(false); + + // let init data as is + } + } + } + else { + post("%s - Attribute %s can't be set",th->thisName(),GetString(aname)); + } + } + return true; +} + +#endif // FLEXT_NOATTREDIT + + +#ifdef FLEXT_ATTRHIDE + +template<typename=void> +void BinbufAdd(t_binbuf *b,const t_atom &at,bool transdoll) +{ + if(transdoll && at.a_type == A_DOLLAR) { + char tbuf[MAXPDSTRING]; + sprintf(tbuf, "$%d", at.a_w.w_index); + binbuf_addv(b,"s",flext::MakeSymbol(tbuf)); + } + else if(transdoll && at.a_type == A_DOLLSYM) { + char tbuf[MAXPDSTRING]; + sprintf(tbuf, "$%s", at.a_w.w_symbol->s_name); + binbuf_addv(b,"s",flext::MakeSymbol(tbuf)); + } + else + binbuf_add(b,1,const_cast<t_atom *>(&at)); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::BinbufArgs(t_binbuf *b,t_binbuf *args,bool withname,bool transdoll) +{ + int argc = binbuf_getnatom(args); + t_atom *argv = binbuf_getvec(args); + int i,cnt = CheckAttrib(argc,argv); + // process the creation arguments + for(i = withname?0:1; i < cnt; ++i) BinbufAdd(b,argv[i],transdoll); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::BinbufAttr(t_binbuf *b,bool transdoll) +{ + // process the attributes + AtomListStatic<32> la,lv; + ListAttrib(la); + int i,cnt = la.Count(); + + for(i = 0; i < cnt; ++i) { + const t_symbol *sym = GetSymbol(la[i]); + const AtomList *lref = NULL; + + AttrData *a = attrdata->find(sym); + if(a) { + if(a->IsInit() && a->IsInitValue()) { + lref = &a->GetInitValue(); + +#if 0 ///////////////////////////////////////////////////////////// + // check for $-parameters + lv = lref->Count(); + for(int j = 0; j < lref->Count(); ++j) { + const char *s = IsSymbol((*lref)[j])?GetString((*lref)[j]):NULL; + if(s && s[0] == '$') { // TODO: More refined checking? + // prepend a "\" + char tmp[256]; *tmp = '\\'; + strcpy(tmp+1,s); + SetString(lv[j],tmp); + } + else + lv[i] = (*lref)[j]; + } + + lref = &lv; +#endif ///////////////////////////////////////////////////////////// + } +// else if(a.IsSaved()) { + else if(a->IsSaved()) { + AttrItem *attr = FindAttrib(sym,true); + + // attribute must be gettable (so that the data can be retrieved) and puttable (so that the data can be inited) + if(attr && attr->BothExist()) { + GetAttrib(sym,attr,lv); + lref = &lv; + } + } + } + + if(lref) { + char attrname[256]; *attrname= '@'; + // store name + strcpy(attrname+1,GetString(sym)); + binbuf_addv(b,"s",MakeSymbol(attrname)); + + // store value + for(int j = 0; j < lref->Count(); ++j) BinbufAdd(b,(*lref)[j],transdoll); + } + } +} + +//! Strip the attributes off the object command line +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_GfxVis(flext_hdr *c, t_glist *gl, int vis) +{ + if(!gl->gl_isgraph || gl->gl_havewindow) { + // show object if it's not inside a GOP + + flext_base *th = thisObject(c); + t_text *x = (t_text *)c; + FLEXT_ASSERT(x->te_binbuf); + + t_binbuf *b = binbuf_new(); + th->BinbufArgs(b,x->te_binbuf,true,false); + + // delete old object box text + binbuf_free(x->te_binbuf); + // set new one + x->te_binbuf = b; + + t_rtext *rt = glist_findrtext(gl,x); + rtext_retext(rt); + + // now display the changed text with the normal drawing function + #ifdef __FLEXT_CLONEWIDGET + text_widgetbehavior.w_visfn((t_gobj *)c,gl,vis); + #else + ori_vis((t_gobj *)c,gl,vis); + #endif + } + // else don't show +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_GfxSelect(flext_hdr *c,t_glist *gl,int state) +{ + t_text *x = (t_text *)c; + flext_base *th = thisObject(c); + + if(!gl->gl_isgraph || gl->gl_havewindow) { + if(state || !gl->gl_editor->e_textdirty) { + // change text only on selection + // OR if text has _not_ been changed + // -> since object will not be recreated we have to get rid + // of the attribute text + + FLEXT_ASSERT(x->te_binbuf); + + t_binbuf *b = binbuf_new(); + th->BinbufArgs(b,x->te_binbuf,true,false); + if(state) th->BinbufAttr(b,false); + + // delete old object box text + binbuf_free(x->te_binbuf); + // set new one + x->te_binbuf = b; + + t_rtext *rt = glist_findrtext(gl,x); + rtext_retext(rt); + + // fix lines + canvas_fixlinesfor(gl,x); + } + + // call original function + #ifdef __FLEXT_CLONEWIDGET + text_widgetbehavior.w_selectfn((t_gobj *)c,gl,state); + #else + ori_select((t_gobj *)c,gl,state); + #endif + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_GfxSave(flext_hdr *c, t_binbuf *b) +{ + flext_base *th = thisObject(c); + t_text *t = (t_text *)c; + binbuf_addv(b, "ssiis", gensym("#X"),gensym("obj"), t->te_xpix, t->te_ypix,MakeSymbol(th->thisName())); + + // process the object arguments + th->BinbufArgs(b,t->te_binbuf,false,true); + // process the attributes + th->BinbufAttr(b,true); + // add end sign + binbuf_addv(b, ";"); +} + +#endif // FLEXT_ATTRHIDE + +#endif // FLEXT_SYS_PD + +#include "flpopns.h" + +#endif // __FLEXT_ATTR_ED_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flbase.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flbase.cpp new file mode 100755 index 0000000000000000000000000000000000000000..beda80ae06f324b735d0b68ad1e172398587d484 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flbase.cpp @@ -0,0 +1,215 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flbase.cpp + \brief Implementation of the internal flext base classes. + + \remark This is all derived from GEM by Mark Danks +*/ + +#ifndef __FLEXT_BASE_CPP +#define __FLEXT_BASE_CPP + +#include "flext.h" + +#include "flinternal.h" +#include <cstring> +#include <cctype> +#include <cstdlib> + +#if FLEXT_SYS == FLEXT_SYS_PD +#ifdef _MSC_VER + #pragma warning (push) + #pragma warning (disable:4091) +#endif +// for canvas_realizedollar (should be non-critical) +#include <g_canvas.h> +#ifdef _MSC_VER + #pragma warning (pop) +#endif +#endif + +#include "flpushns.h" + +///////////////////////////////////////////////////////// +// +// flext_obj +// +///////////////////////////////////////////////////////// + +FLEXT_TEMPIMPL(flext_hdr *FLEXT_CLASSDEF(flext_obj))::m_holder = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext_obj))::m_holdname = NULL; +FLEXT_TEMPIMPL(FLEXT_TEMPINST(flext_class) *FLEXT_CLASSDEF(flext_obj))::m_holdclass = NULL; +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext_obj))::m_holdaargc = 0; +FLEXT_TEMPIMPL(const t_atom *FLEXT_CLASSDEF(flext_obj))::m_holdaargv = NULL; +//FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::process_attributes = false; + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::initing = false; +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::exiting = false; +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::init_ok; + +//FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::ProcessAttributes(bool attr) { process_attributes = attr; } + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext_obj))::sym__shP = NULL; +#endif + +///////////////////////////////////////////////////////// +// Constructor +// +///////////////////////////////////////////////////////// +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_obj))::FLEXT_CLASSDEF(flext_obj)() + : x_obj(m_holder) + , clss(m_holdclass) + , m_name(m_holdname) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + m_canvas = canvas_getcurrent(); +#elif FLEXT_SYS == FLEXT_SYS_MAX + m_canvas = (t_patcher *)sym__shP->s_thing; + x_obj->curinlet = 0; +#endif +} + +///////////////////////////////////////////////////////// +// Destructor +// +///////////////////////////////////////////////////////// +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_obj))::~FLEXT_CLASSDEF(flext_obj)() +{ + x_obj = NULL; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::__setup__(t_classid) +{ +#if FLEXT_SYS == FLEXT_SYS_MAX + sym__shP = MakeSymbol("#P"); +#endif + flext::Setup(); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::Init() { return true; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::Finalize() { return true; } +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::Exit() {} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::DefineHelp(t_classid c,const char *ref,const char *dir,bool addtilde) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + char tmp[256]; + if(dir && *dir) { + strcpy(tmp,dir); + char *last = tmp+strlen(tmp)-1; + if(*last != '/') strcat(last,"/"); + strcat(last,ref); + } + else + strcpy(tmp,ref); + if(addtilde) strcat(tmp,"~"); + + ::class_sethelpsymbol(getClass(c),gensym(const_cast<char *>(tmp))); +#else + // no solution for Max/MSP yet +#endif +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::GetParamSym(t_atom &dst,const t_symbol *sym,t_canvas *c) +{ +#if FLEXT_SYS == FLEXT_SYS_PD && defined(PD_MINOR_VERSION) && PD_MINOR_VERSION >= 37 + if(!c) c = canvas_getcurrent(); + + const char *s = GetString(sym); + if((s[0] == '$' || s[0] == '#') && isdigit(s[1])) { + const t_symbol *res; + // patcher parameter detected... get value! + if(s[0] != '$') { + char tmp[MAXPDSTRING]; + strcpy(tmp,s); + tmp[0] = '$'; + res = canvas_realizedollar(c,const_cast<t_symbol *>(MakeSymbol(tmp))); + } + else + res = canvas_realizedollar(c,const_cast<t_symbol *>(sym)); + + // check for number + const char *c = GetString(res); + while(*c && (isdigit(*c) || *c == '.')) ++c; + + if(!*c) + SetFloat(dst,(float)atof(GetString(res))); + else + SetSymbol(dst,res); + return true; + } + else +#else +// #pragma message("Not implemented") +#endif + SetSymbol(dst,sym); + return true; +} + + +#if FLEXT_SYS == FLEXT_SYS_PD +// this declaration is missing in m_pd.h (0.37-0 and -1) +// but it is there in 0.37-2 (but how to tell which micro-version?) +extern "C" +#ifdef _MSC_VER +__declspec(dllimport) +#endif +void canvas_getargs(int *argcp, t_atom **argvp); +#endif + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::GetCanvasArgs(AtomList &args) const +{ +#if FLEXT_SYS == FLEXT_SYS_PD + int argc; + t_atom *argv; + canvas_getargs(&argc,&argv); + args(argc,argv); +#else +// #pragma message("Not implemented") + args(0); +#endif +} + + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPLATE short patcher_myvol(t_patcher *x) +{ +#ifndef MM_UNIFIED // Max5 check... we don't know what to do yet + t_box *w; + if(x->p_vol) + return x->p_vol; + else if((w = (t_box *)x->p_vnewobj) != NULL) + return FLEXT_TEMPINST(patcher_myvol)(w->b_patcher); + else +#endif + return 0; +} +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::GetCanvasDir(char *buf,size_t bufsz) const +{ +#if FLEXT_SYS == FLEXT_SYS_PD + const char *c = GetString(canvas_getdir(thisCanvas())); + strncpy(buf,c,bufsz); +#elif FLEXT_SYS == FLEXT_SYS_MAX + short path = FLEXT_TEMPINST(patcher_myvol)(thisCanvas()); + // \TODO dangerous!! no check for path length (got to be long enough... like 1024 chars) + path_topathname(path,NULL,buf); +#else +#error Not implemented +#endif +} + +#include "flpopns.h" + +#endif // __FLEXT_BASE_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flbase.h b/externals/grill/trunk/flext/libbuild/include/flext/flbase.h new file mode 100755 index 0000000000000000000000000000000000000000..448c035aa010f36be78b1c331f2ff550cc6c9f8b --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flbase.h @@ -0,0 +1,624 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flbase.h + \brief Internal flext base classes + + \remark This uses some ideas of GEM invented by Mark Danks +*/ + +#ifndef __FLEXT_BASE_H +#define __FLEXT_BASE_H + +#include "flstdc.h" +#include "flsupport.h" +#include <map> + +#include "flpushns.h" + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj); + +typedef FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_obj)) flext_obj; + +// ---------------------------------------------------------------------------- +/*! \brief The obligatory PD or Max/MSP object header + \internal + + This is in a separate struct to assure that obj is the very first thing. + If it were the first thing in flext_obj, then there could be problems with + the virtual table of the C++ class. +*/ +// ---------------------------------------------------------------------------- + +struct FLEXT_SHARE flext_hdr +{ + /*! \defgroup FLEXT_OBJHEADER Actual PD or Max/MSP object + \internal + @{ + */ + + /*! \brief The obligatory object header + \note MUST reside at memory offset 0 (no virtual table possible) + */ + t_sigobj obj; + +#if FLEXT_SYS == FLEXT_SYS_PD + //! PD only: float signal holder for pd + float defsig; +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX + //! Max/MSP only: current inlet used by proxy objects + long curinlet; +#endif + + /*! \brief This points to the actual polymorphic C++ class + */ + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_obj)) *data; + + //! @} FLEXT_OBJHEADER +}; + + +FLEXT_TEMPLATE class flext_class; + +typedef std::map<const t_symbol *,FLEXT_TEMPINST(flext_class) *> LibMap; + +class flext_library; + +// ---------------------------------------------------------------------------- +/*! \brief The mother of base classes for all flext external objects + + Each extern which is written in C++ needs to use the #defines at the + end of this header file. + + The define + + FLEXT_HEADER(NEW_CLASS, PARENT_CLASS) + + should be somewhere in your header file. + One of the defines like + + FLEXT_NEW(NEW_CLASS) + or + FLEXT_NEW_2(NEW_CLASS, float, float) + + should be the first thing in your implementation file. + NEW_CLASS is the name of your class and PARENT_CLASS is the + parent of your class. +*/ +// ---------------------------------------------------------------------------- + +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj): + public flext +{ + public: + +// --- creation ------------------------------------------------------- + + /*! \defgroup FLEXT_OBJ_CREATION Object creation/destruction functionality + @{ + */ + + //! Constructor + FLEXT_CLASSDEF(flext_obj)(); + + //! Destructor + virtual ~FLEXT_CLASSDEF(flext_obj)(); + + /*! \brief Signal a construction problem + \note This should only be used in the constructor. Object creation will be aborted. + */ + static void InitProblem() { init_ok = false; } + + /*! \brief Enable/disable attribute procession (default = false) + \note Use that in the static class setup function (also library setup function) + */ +// static void ProcessAttributes(bool attr); //{ process_attributes = attr; } + + //! Virtual function called at creation time (but after the constructor) + // this also guarantees that there are no instances of flext_obj + virtual bool Init(); + + //! Virtual function called after Init() has succeeded + virtual bool Finalize(); + + //! Virtual function called at destruction (before the destructor) + virtual void Exit(); + + //! @} FLEXT_OBJ_CREATION + +// --- info ------------------------------------------------------- + + /*! \defgroup FLEXT_OBJ_INFO Get various information + @{ + */ + + //! Get the object's canvas + t_canvas *thisCanvas() const { return m_canvas; } + + //! Get the PD or Max/MSP object + t_sigobj *thisHdr() { FLEXT_ASSERT(x_obj); return &x_obj->obj; } + const t_sigobj *thisHdr() const { FLEXT_ASSERT(x_obj); return &x_obj->obj; } + //! Get the class name (as a string) + const char *thisName() const { return GetString(m_name); } + //! Get the class name (as a symbol) + const t_symbol *thisNameSym() const { return m_name; } + //! Get the class pointer + t_class *thisClass() const; + + //! Typedef for unique class identifier + typedef FLEXT_TEMPINST(flext_class) *t_classid; + + //! Get unique id for object class + t_classid thisClassId() const { return clss; } + + //! Get class pointer from class id + static t_class *getClass(t_classid id); + + static bool HasAttributes(t_classid id); + static bool IsDSP(t_classid id); + static bool HasDSPIn(t_classid id); + static bool IsLib(t_classid id); + + bool HasAttributes() const; + bool IsLib() const; + bool IsDSP() const; + bool HasDSPIn() const; + +#if FLEXT_SYS == FLEXT_SYS_MAX + // under Max/MSP it could be necessary to activate DSP also for message objects + // namely for those coexisting with DSP objects in a library + bool NeedDSP() const; +#endif + + //! @} FLEXT_OBJ_INFO + +// --- help ------------------------------------------------------- + + /*! \defgroup FLEXT_OBJ_HELP Help/assistance functionality + \remark This is still PD only + @{ + */ + + /*! Define the help reference symbol for a class + \internal + */ + static void DefineHelp(t_classid c,const char *ref,const char *dir = NULL,bool addtilde = false); + + //! Define the help reference symbol for a class + void DefineHelp(const char *ref,const char *dir = NULL,bool addtilde = false) { DefineHelp(thisClassId(),ref,dir,addtilde); } + + //! @} FLEXT_OBJ_HELP + + +// --- internal stuff ------------------------------------------------------- + + /*! \defgroup FLEXT_OBJ_INTERNAL Internal stuff + \internal + @{ + */ + + protected: + + //! backpointer to object header + mutable flext_hdr *x_obj; + + //! pointer to flext class definition + FLEXT_TEMPINST(flext_class) *clss; + +// static bool process_attributes; + +#if FLEXT_SYS == FLEXT_SYS_MAX + t_critical lock; + void Lock() { critical_enter(lock); } + void Unlock() { critical_exit(lock); } + static void SysLock() { critical_enter(0); } + static void SysUnlock() { critical_exit(0); } +#elif FLEXT_SYS == FLEXT_SYS_PD + void Lock() {} + void Unlock() {} + static void SysLock() {} + static void SysUnlock() {} +#else + #error +#endif + + class Locker + { + public: + Locker(flext_obj *o = NULL): obj(o) { if(obj) obj->Lock(); else SysLock(); } + Locker(flext_hdr *h): obj(h->data) { FLEXT_ASSERT(obj); obj->Lock(); } + ~Locker() { if(obj) obj->Unlock(); else SysUnlock(); } + protected: + flext_obj *obj; + }; + + private: + + //! The canvas (patcher) that the object is in + mutable t_canvas *m_canvas; + + //! Flag for successful object construction + static bool init_ok; + + // flags for init and exit procedure; + static bool initing; + static bool exiting; + + public: + + //! Creation callback + static void __setup__(t_classid); + + /*! \brief This is a temporary holder + \warning don't touch it! + */ + static flext_hdr *m_holder; + //! Hold object's class during construction + static FLEXT_TEMPINST(flext_class) *m_holdclass; + //! Hold object's name during construction + static const t_symbol *m_holdname; + + //! Holders for attribute procession flag + static int m_holdaargc; + static const t_atom *m_holdaargv; + + /*! The object's name in the patcher + \note objects of the same class can have various alias names! + */ + const t_symbol *m_name; + + /*! Return true if in object initialization phase + true when in constructor or Init, false when in Finalize + */ + static bool Initing() { return initing; } + + //! Return true if in object destruction phase (Exit or destructor) + static bool Exiting() { return exiting; } + + // Definitions for library objects + static void lib_init(const char *name,void setupfun()); + static void obj_add(bool lib,bool dsp,bool noi,bool attr,const char *idname,const char *names,void setupfun(t_classid),FLEXT_CLASSDEF(flext_obj) *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...); + +#if FLEXT_SYS == FLEXT_SYS_MAX + static flext_hdr *obj_new(const t_symbol *s,short argc,t_atom *argv); +#else + static flext_hdr *obj_new(const t_symbol *s,int argc,t_atom *argv); +#endif + static void obj_free(flext_hdr *o); + + //! Convert $0 or #0 symbol into appropriate value + static bool GetParamSym(t_atom &dst,const t_symbol *s,t_canvas *c); + + //! Get the canvas arguments + void GetCanvasArgs(AtomList &args) const; + + //! Get the canvas/patcher directory + void GetCanvasDir(char *buf,size_t bufsz) const; + + protected: + + // Current library class + static flext_library *curlib; + + // static initialization (with constructor) doesn't work for Codewarrior + static LibMap *libnames; + + static FLEXT_TEMPINST(flext_class) *FindName(const t_symbol *s,FLEXT_TEMPINST(flext_class) *o = NULL); + +#if FLEXT_SYS == FLEXT_SYS_PD + static t_class *buf_class; + static void cb_buffer_dsp(void *c,t_signal **sp); +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX + static const t_symbol *sym__shP; +#endif + + //! @} FLEXT_OBJ_INTERNAL +}; + + +// max. 4 creation args (see the following macros) +#define FLEXT_MAXNEWARGS 4 + +// max. 5 method args (see the following macros) +#define FLEXT_MAXMETHARGS 5 + +// prefixes for the macro generated handler functions +#define FLEXT_CALL_PRE(F) flext_c_##F +#define FLEXT_THR_PRE(F) flext_t_##F +#define FLEXT_GET_PRE(F) flext_g_##F +#define FLEXT_SET_PRE(F) flext_s_##F + + +#ifndef FLEXT_ATTRIBUTES +/*! \brief Switch for global attribute processing + \note Should be set to 1 or 0 (or not be defined) + \ingroup FLEXT_DEFS +*/ +#define FLEXT_ATTRIBUTES \ +\ +0 + + +#elif FLEXT_ATTRIBUTES != 0 && FLEXT_ATTRIBUTES != 1 +#error "FLEXT_ATTRIBUTES must be 0 or 1" +#endif + +// ---------------------------------------- +// These should be used in the header +// ---------------------------------------- + + +#define FLEXT_REALHDR(NEW_CLASS, PARENT_CLASS) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { delete hdr->data; } \ +static void __setup__(t_classid classid) { thisParent::__setup__(classid); } + + +#define FLEXT_REALHDR_S(NEW_CLASS, PARENT_CLASS,SETUPFUN) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { delete hdr->data; } \ +static void __setup__(t_classid classid) { \ + thisParent::__setup__(classid); \ + thisType::SETUPFUN(classid); \ +} + +#define FLEXT_REALHDR_T(NEW_CLASS, PARENT_CLASS) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +typedef typename thisParent::t_classid t_classid; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { delete hdr->data; } \ +static void __setup__(t_classid classid) { thisParent::__setup__(classid); } + + +#define FLEXT_REALHDR_TS(NEW_CLASS, PARENT_CLASS,SETUPFUN) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +typedef typename thisParent::t_classid t_classid; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { delete hdr->data; } \ +static void __setup__(t_classid classid) { \ + thisParent::__setup__(classid); \ + thisType::SETUPFUN(classid); \ +} + + +// generate name of dsp/non-dsp setup function +#if defined(FLEXT_USE_HEX_SETUP_NAME) && defined(FLEXT_SYS_PD) + #define FLEXT_STPF_0(NAME) setup_##NAME + #define FLEXT_STPF_1(NAME) setup_##NAME +#elif FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + #define FLEXT_STPF_0(NAME) NAME##_setup + #define FLEXT_STPF_1(NAME) NAME##_tilde_setup +#else +#error Platform not supported +#endif + +#define FLEXT_STPF_(DSP) FLEXT_STPF_##DSP +#define FLEXT_STPF(NAME,DSP) FLEXT_STPF_(DSP)(NAME) + + +// -------------------------------------------------------------------------------------- + + +// used in library setup functions to register the individual objects in the library +#define REAL_SETUP(cl,DSP) extern void FLEXT_STPF(cl,DSP)(); FLEXT_STPF(cl,DSP)(); + +#ifdef FLEXT_USE_NAMESPACE + #define _FLEXT_REAL_SETUP_NAME(NAME) ::##NAME##_setup +#else + #define _FLEXT_REAL_SETUP_NAME(NAME) NAME##_setup +#endif + +// specify that to define the library itself +#if FLEXT_SYS == FLEXT_SYS_PD +# define REAL_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT void _FLEXT_REAL_SETUP_NAME(NAME)() { flext_obj::lib_init(#NAME,SETUPFUN); } +#elif FLEXT_SYS == FLEXT_SYS_MAX +# define REAL_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT int main() { flext_obj::lib_init(#NAME,SETUPFUN); return 0; } +#else +# error Platform not supported +#endif + + +// -------------------------------------------------- + + +#define FLEXT_EXP_0 extern "C" FLEXT_EXT +#define FLEXT_EXP_1 +#define FLEXT_EXP(LIB) FLEXT_EXP_##LIB + +#if FLEXT_SYS == FLEXT_SYS_PD +#define FLEXT_OBJ_SETUP_0(NEW_CLASS,DSP) +#elif FLEXT_SYS == FLEXT_SYS_MAX +#define FLEXT_OBJ_SETUP_0(NEW_CLASS,DSP) extern "C" FLEXT_EXT int main() { FLEXT_STPF(NEW_CLASS,DSP)(); return 0; } +#else +#error not implemented +#endif + +#define FLEXT_OBJ_SETUP_1(NEW_CLASS,DSP) + +#define FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) FLEXT_OBJ_SETUP_##LIB(NEW_CLASS,DSP) + + + +// ---------------------------------------- +// These definitions are used below +// ---------------------------------------- + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + // maybe that's not necessary + #define FLEXTTPN_NULL A_NULL + #if FLEXT_SYS == FLEXT_SYS_PD + #define FLEXTTPN_PTR A_POINTER + #else + #define FLEXTTPN_INT A_INT + #define FLEXTTPN_DEFINT A_DEFINT + #endif + #define FLEXTTPN_FLOAT A_FLOAT + #define FLEXTTPN_DEFFLOAT A_DEFFLOAT + #define FLEXTTPN_SYM A_SYMBOL + #define FLEXTTPN_DEFSYM A_DEFSYMBOL + #define FLEXTTPN_VAR A_GIMME +#else + #define FLEXTTPN_NULL 0 + #define FLEXTTPN_PTR 1 + #define FLEXTTPN_INT 2 + #define FLEXTTPN_FLOAT 3 + #define FLEXTTPN_SYM 4 + #define FLEXTTPN_VAR 5 + #define FLEXTTPN_DEFINT 6 + #define FLEXTTPN_DEFFLOAT 7 + #define FLEXTTPN_DEFSYM 8 +#endif + +// Shortcuts for PD/Max type arguments +#define FLEXTTYPE_void FLEXTTPN_NULL +#define CALLBTYPE_void void +#define FLEXTTYPE_float FLEXTTPN_FLOAT +#define FLEXTTYPE_float0 FLEXTTPN_DEFFLOAT +#define CALLBTYPE_float float +#define FLEXTTYPE_t_float FLEXTTPN_FLOAT +#define CALLBTYPE_t_float t_float + +#if FLEXT_SYS == FLEXT_SYS_PD +#define FLEXTTYPE_int FLEXTTPN_FLOAT +#define FLEXTTYPE_int0 FLEXTTPN_DEFFLOAT +#define CALLBTYPE_int float +#define FLEXTTYPE_bool FLEXTTPN_FLOAT +#define FLEXTTYPE_bool0 FLEXTTPN_DEFFLOAT +#define CALLBTYPE_bool float +#elif FLEXT_SYS == FLEXT_SYS_MAX +#define FLEXTTYPE_int FLEXTTPN_INT +#define FLEXTTYPE_int0 FLEXTTPN_DEFINT +#define CALLBTYPE_int int +#define FLEXTTYPE_bool FLEXTTPN_INT +#define FLEXTTYPE_bool0 FLEXTTPN_DEFINT +#define CALLBTYPE_bool int +#else +#error Platform not supported +#endif + +#define FLEXTTYPE_t_symptr FLEXTTPN_SYM +#define FLEXTTYPE_t_symptr0 FLEXTTPN_DEFSYM +#define CALLBTYPE_t_symptr t_symptr +#define FLEXTTYPE_t_symtype FLEXTTYPE_t_symptr +#define FLEXTTYPE_t_symtype0 FLEXTTYPE_t_symptr0 +#define CALLBTYPE_t_symtype t_symptr +#define FLEXTTYPE_t_ptrtype FLEXTTPN_PTR +#define CALLBTYPE_t_ptrtype t_ptrtype + +#define FLEXTTP(TP) FLEXTTYPE_ ## TP +#define CALLBTP(TP) CALLBTYPE_ ## TP + + +#define ARGMEMBER_bool(a) GetBool(a) +#define ARGMEMBER_bool0(a) ARGMEMBER_bool(a) +#define ARGMEMBER_int(a) GetInt(a) +#define ARGMEMBER_int0(a) ARGMEMBER_int(a) +#define ARGMEMBER_float(a) GetFloat(a) +#define ARGMEMBER_float0(a) ARGMEMBER_float(a) +#define ARGMEMBER_t_symptr(a) GetSymbol(a) +#define ARGMEMBER_t_symptr0(a) ARGMEMBER_t_symptr(a) +#define ARGMEMBER_t_symtype(a) ARGMEMBER_t_symptr(a) +#define ARGMEMBER_t_symtype0(a) ARGMEMBER_t_symptr0(a) +#define ARGCAST(a,tp) ARGMEMBER_##tp(a) + +#define REAL_NEW(NAME,NEW_CLASS,DSP,NOI,LIB) \ +flext_obj *NEW_CLASS::__init__(int ,t_atom *) \ +{ \ + return new NEW_CLASS; \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_V(NAME,NEW_CLASS,DSP,NOI,LIB) \ +flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \ +{ \ + return new NEW_CLASS(argc,argv); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,FLEXTTPN_VAR,FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_1(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1) \ +flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \ +{ \ + return new NEW_CLASS(ARGCAST(argv[0],TYPE1)); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_2(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1,TYPE2) \ +flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \ +{ \ + return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2)); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_3(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1, TYPE2, TYPE3) \ +flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \ +{ \ + return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2),ARGCAST(argv[2],TYPE3)); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_4(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1,TYPE2, TYPE3, TYPE4) \ +flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \ +{ \ + return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2),ARGCAST(argv[2],TYPE3),ARGCAST(argv[3],TYPE4)); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTP(TYPE4),FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + + +// Shortcuts for method arguments: +#define FLEXTARG_float a_float +#define FLEXTARG_int a_int +#define FLEXTARG_bool a_int +#define FLEXTARG_t_float a_float +#define FLEXTARG_t_symtype a_symbol +#define FLEXTARG_t_symptr a_symbol +#define FLEXTARG_t_ptrtype a_pointer + +#define FLEXTARG(TP) FLEXTARG_ ## TP + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flbind.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flbind.cpp new file mode 100755 index 0000000000000000000000000000000000000000..1a53d5c4fd81ba15e1b652c7c7f7a2722755059b --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flbind.cpp @@ -0,0 +1,279 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flbind.cpp + \brief Functionality for symbol-bound methods. +*/ + +#ifndef __FLEXT_BIND_CPP +#define __FLEXT_BIND_CPP + +#include "flext.h" +#include "flinternal.h" + +#include "flpushns.h" + +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_base))::pxbnd_class = NULL; + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPLATE +struct ProxyVars { + static t_object *px_freelist; + static t_messlist px_messlist[3]; +}; + +FLEXT_TEMPIMPL(t_object *ProxyVars)::px_freelist = NULL; +FLEXT_TEMPIMPL(t_messlist ProxyVars)::px_messlist[3]; +#endif + +/*! \brief Set up the proxy class for symbol-bound methods +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::SetupBindProxy() +{ + // already initialized? + if(!pxbnd_class) { +#if FLEXT_SYS == FLEXT_SYS_PD + pxbnd_class = class_new(gensym(const_cast<char *>("flext_base bind proxy")),NULL,NULL,sizeof(pxbnd_object),CLASS_PD|CLASS_NOINLET, A_NULL); + add_anything(pxbnd_class,pxbnd_object::px_method); // for symbol-bound methods +#elif FLEXT_SYS == FLEXT_SYS_MAX + pxbnd_class = new t_class; + + pxbnd_class->c_sym = const_cast<t_symbol *>(sym__); + pxbnd_class->c_freelist = &FLEXT_TEMPINST(ProxyVars)::px_freelist; + pxbnd_class->c_freefun = NULL; + pxbnd_class->c_size = sizeof(pxbnd_object); + pxbnd_class->c_tiny = 0; + pxbnd_class->c_noinlet = 1; + FLEXT_TEMPINST(ProxyVars)::px_messlist[0].m_sym = (t_symbol *)pxbnd_class; + + FLEXT_TEMPINST(ProxyVars)::px_messlist[1].m_sym = const_cast<t_symbol *>(sym_anything); + FLEXT_TEMPINST(ProxyVars)::px_messlist[1].m_fun = (method)pxbnd_object::px_method; + FLEXT_TEMPINST(ProxyVars)::px_messlist[1].m_type[0] = A_GIMME; + FLEXT_TEMPINST(ProxyVars)::px_messlist[1].m_type[1] = 0; + + FLEXT_TEMPINST(ProxyVars)::px_messlist[2].m_sym = 0; +#else +#pragma warning("Not implemented!") +#endif + } +} + + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::BindItem::BindItem(bool (*f)(flext_base *,t_symbol *s,int,t_atom *,void *data),pxbnd_object *p): + Item(NULL),fun(f),px(p) +{} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::BindItem::~BindItem() +{ + if(px) { + FLEXT_ASSERT(!fun); // check if already unbound + object_free(&px->obj); + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::BindItem::Unbind(const t_symbol *tag) +{ + if(px) { + FLEXT_ASSERT(fun); + +#if FLEXT_SYS == FLEXT_SYS_PD + pd_unbind(&px->obj.ob_pd,const_cast<t_symbol *>(tag)); +#elif FLEXT_SYS == FLEXT_SYS_MAX + if(tag->s_thing == (t_object *)px) + const_cast<t_symbol *>(tag)->s_thing = NULL; + else + error("flext - Binding to symbol %s not found",tag->s_name); +#else +# pragma warning("Not implemented") +#endif + + fun = NULL; + } +} + +#if FLEXT_SYS == FLEXT_SYS_PD + //! Bind object to a symbol + FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Bind(const t_symbol *sym) { pd_bind(&thisHdr()->ob_pd,const_cast<t_symbol *>(sym)); return true; } + //! Unbind object from a symbol + FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Unbind(const t_symbol *sym) { pd_unbind(&thisHdr()->ob_pd,const_cast<t_symbol *>(sym)); return true; } +#elif FLEXT_SYS == FLEXT_SYS_MAX + //! Bind object to a symbol + FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Bind(const t_symbol *sym) { if(sym->s_thing) return false; else { const_cast<t_symbol *>(sym)->s_thing = (t_object *)thisHdr(); return true; } } + //! Unbind object from a symbol + FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Unbind(const t_symbol *sym) { if(sym->s_thing != (t_object *)thisHdr()) return false; else { const_cast<t_symbol *>(sym)->s_thing = NULL; return true; } } +#endif + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::BindMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void *data) +{ + if(!bindhead) + bindhead = new ItemCont; + else { + // Search for symbol + for(Item *it = bindhead->FindList(sym); it; it = it->nxt) { + BindItem *item = (BindItem *)it; + + // go through all items with matching tag + if(item->fun == fun) { + // function already registered -> bail out! + post("%s - Symbol already bound with this method",thisName()); + return false; + } + } + } + + SetupBindProxy(); + +#if FLEXT_SYS == FLEXT_SYS_PD + pxbnd_object *px = (pxbnd_object *)object_new(pxbnd_class); +#elif FLEXT_SYS == FLEXT_SYS_MAX + pxbnd_object *px = (pxbnd_object *)newobject(FLEXT_TEMPINST(ProxyVars)::px_messlist); +#else +#pragma warning("Not implemented!") +#endif + + if(px) { + BindItem *mi = new BindItem(fun,px); + bindhead->Add(mi,sym); + + px->init(this,mi,data); + +#if FLEXT_SYS == FLEXT_SYS_PD + pd_bind(&px->obj.ob_pd,const_cast<t_symbol *>(sym)); +#elif FLEXT_SYS == FLEXT_SYS_MAX + #if 1 // old code + if(!sym->s_thing) + const_cast<t_symbol *>(sym)->s_thing = (t_object *)px; + else + error("%s - Symbol is already bound",thisName()); + #else + void *binding = object_register(gensym("flext"),const_cast<t_symbol *>(sym),(t_object *)px); + #endif +#else +# pragma warning("Not implemented") +#endif + } + else + error("%s - Symbol proxy could not be created",thisName()); + + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::UnbindMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void **data) +{ + bool ok = false; + + if(bindhead && bindhead->Contained(0)) { + ItemSet &set = bindhead->GetInlet(); + +/* + ItemSet::iterator it1,it2; + if(sym) { + // specific tag + it1 = it2 = set.find(sym); it2++; + } + else { + // any tag + it1 = set.begin(),it2 = set.end(); + } + + BindItem *it = NULL; + for(ItemSet::iterator si = it1; si != it2 && !it; ++si) { + for(Item *i = si.data(); i; i = i->nxt) { + BindItem *item = (BindItem *)i; + if(!fun || item->fun == fun) + { + it = item; + if(!sym) sym = si.key(); + break; + } + } + } +*/ + BindItem *item = NULL; + if(sym) { + // symbol is given + Item *it = set.find(sym); + if(fun) { + // check if function matches + for(; it && static_cast<BindItem *>(it)->fun != fun; it = it->nxt) {} + } + item = static_cast<BindItem *>(it); + } + else { + // take any entry that matches + for(FLEXT_TEMP_TYPENAME ItemSet::iterator si(set); si && !item; ++si) { + for(Item *i = si.data(); i; i = i->nxt) { + BindItem *bit = (BindItem *)i; + if(!fun || bit->fun == fun) { + item = bit; + if(!sym) sym = si.key(); + break; + } + } + } + } + + if(item) { + if(data) *data = item->px->data; + ok = bindhead->Remove(item,sym,0,false); + if(ok) { + item->Unbind(sym); + delete item; + } + } + } + return ok; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::GetBoundMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void *&data) +{ + if(bindhead) { + // Search for symbol + for(Item *it = bindhead->FindList(sym); it; it = it->nxt) { + BindItem *item = (BindItem *)it; + + // go through all items with matching tag + if(item->fun == fun) { + data = item->px->data; + return true; + } + } + } + return false; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::UnbindAll() +{ + if(bindhead && bindhead->Contained(0)) { + ItemSet &set = bindhead->GetInlet(); +// for(ItemSet::iterator si = set.begin(); si != set.end(); ++si) { + for(FLEXT_TEMP_TYPENAME ItemSet::iterator si(set); si; ++si) { + Item *lst = si.data(); + while(lst) { + Item *nxt = lst->nxt; + BindItem *it = (BindItem *)lst; + it->Unbind(si.key()); + delete it; + lst = nxt; + } + } + set.clear(); + } + return true; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::pxbnd_object::px_method(pxbnd_object *c,const t_symbol *s,int argc,t_atom *argv) +{ + c->item->fun(c->base,(t_symbol *)s,argc,(t_atom *)argv,c->data); +} + +#include "flpopns.h" + +#endif // __FLEXT_BIND_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flbuf.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flbuf.cpp new file mode 100755 index 0000000000000000000000000000000000000000..ee34c28588925436263e5cd336c181a36730c313 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flbuf.cpp @@ -0,0 +1,398 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flbuf.cpp + \brief Implementation of the buffer abstraction class. +*/ + +#ifndef __FLEXT_BUF_CPP +#define __FLEXT_BUF_CPP + +#include "flext.h" +#include "flfeatures.h" +#include <set> + +#include "flpushns.h" + +#if FLEXT_SYS != FLEXT_SYS_JMAX + +#if FLEXT_SYS == FLEXT_SYS_PD +#define DIRTY_INTERVAL 0 // buffer dirty check in msec + +FLEXT_TEMPLATE +class Buffers: + public std::set<flext::buffer *> +{ +public: + static FLEXT_TEMPINST(Buffers) buffers; +}; + +FLEXT_TEMPIMPL(FLEXT_TEMPINST(Buffers) Buffers)::buffers; + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::cb_buffer_dsp(void *c,t_signal **sp) +{ + for(FLEXT_TEMPINST(Buffers)::iterator it = FLEXT_TEMPINST(Buffers)::buffers.begin(); it != FLEXT_TEMPINST(Buffers)::buffers.end(); ++it) + (*it)->Set(); +} +#endif + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::buffer::buffer(const t_symbol *bn,bool delayed): + sym(NULL),data(NULL), + chns(0),frames(0) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + arr = NULL; + interval = DIRTY_INTERVAL; + isdirty = false; + ticking = false; + + // we probably should make this global... work on the set of registered buffers + tick = clock_new(this,(t_method)cb_tick); +#endif + + if(bn) Set(bn,delayed); + + ClearDirty(); + +#if FLEXT_SYS == FLEXT_SYS_PD + // register buffer + FLEXT_ASSERT(FLEXT_TEMPINST(Buffers)::buffers.find(this) == FLEXT_TEMPINST(Buffers)::buffers.end()); + FLEXT_TEMPINST(Buffers)::buffers.insert(this); +#endif +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::buffer::~buffer() +{ +#if FLEXT_SYS == FLEXT_SYS_PD + if(tick) clock_free(tick); +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD + // unregister buffer + FLEXT_ASSERT(FLEXT_TEMPINST(Buffers)::buffers.find(this) != FLEXT_TEMPINST(Buffers)::buffers.end()); + FLEXT_TEMPINST(Buffers)::buffers.erase(this); +#endif +} + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::buffer::Set(const t_symbol *s,bool nameonly) +{ + int ret = 0; + bool valid = data != NULL; // valid now? (before change) + + if(s && sym != s) { + ret = 1; + data = NULL; + frames = 0; + chns = 0; + } + + if(s && *GetString(s)) sym = s; + + if(!sym) { + if(valid) ret = -1; + } + else if(!nameonly) { +#if FLEXT_SYS == FLEXT_SYS_PD + arr = (t_garray *)pd_findbyclass(const_cast<t_symbol *>(sym), garray_class); + if(!arr) + { + if (*GetString(sym)) FLEXT_LOG1("buffer: no such array '%s'",GetString(sym)); +// sym = NULL; + if(valid) ret = -1; + } + else { + int frames1; + FLEXT_ARRAYTYPE *data1; + if(!FLEXT_PD_ARRAYGRAB(arr, &frames1, &data1)) + { + error("buffer: bad template '%s'",GetString(sym)); + data = NULL; + frames = 0; + if(valid) ret = -1; + } + else { + ret = 0; + garray_usedindsp(arr); + if(frames != frames1) { frames = frames1; if(!ret) ret = 1; } + Element *data2 = reinterpret_cast<Element *>(data1); + if(data != data2) { data = data2; if(!ret) ret = 1; } + chns = 1; + } + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + if(sym->s_thing) { + const t_buffer *p = (const t_buffer *)sym->s_thing; + + FLEXT_ASSERT(!NOGOOD(p)); + + if(ob_sym(p) != sym_buffer) { + post("buffer: object '%s' not valid (type %s)",GetString(sym),GetString(ob_sym(p))); + if(valid) ret = -2; + } + else { +#ifdef FLEXT_DEBUG +// post("flext: buffer object '%s' - valid:%i samples:%i channels:%i frames:%i",GetString(sym),p->b_valid,p->b_frames,p->b_nchans,p->b_frames); +#endif + Element *data1 = reinterpret_cast<Element *>(p->b_samples); + if(data != data1) { data = data1; if(!ret) ret = 1; } + if(chns != p->b_nchans) { chns = p->b_nchans; if(!ret) ret = 1; } + if(frames != p->b_frames) { frames = p->b_frames; if(!ret) ret = 1; } + } + } + else { + FLEXT_LOG1("buffer: symbol '%s' not defined", GetString(sym)); + /*if(valid)*/ ret = -1; + } +#else +#error not implemented +#endif + } + + return ret; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::buffer::Update() +{ + FLEXT_ASSERT(sym); + + bool upd = false; + +#if FLEXT_SYS == FLEXT_SYS_PD + if(!arr) return data == NULL; + + int frames1; + FLEXT_ARRAYTYPE *data1; + if(!FLEXT_PD_ARRAYGRAB(arr, &frames1, &data1)) { + data = NULL; + chns = 0; + frames = 0; + upd = true; + } + else { + Element *data2 = reinterpret_cast<Element *>(data1); + if(data != data2 || frames != frames1) { + data = data2; + frames = frames1; + upd = true; + } + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + const t_buffer *p = (const t_buffer *)sym->s_thing; + if(p) { + FLEXT_ASSERT(!NOGOOD(p) && ob_sym(p) == sym_buffer); + + Element *data1 = reinterpret_cast<Element *>(p->b_samples); + if(data != data1 || chns != p->b_nchans || frames != p->b_frames) { + data = data1; + chns = p->b_nchans; + frames = p->b_frames; + upd = true; + } + } + else { + // buffer~ has e.g. been renamed + data = NULL; + chns = 0; + frames = 0; + upd = true; + } +#else +#error not implemented +#endif + return upd; +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext))::buffer::lock_t FLEXT_CLASSDEF(flext))::buffer::Lock() +{ + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + FLEXT_ASSERT(arr); +#ifdef _FLEXT_HAVE_PD_GARRAYLOCKS + garray_lock(arr); +#endif + return false; +#elif FLEXT_SYS == FLEXT_SYS_MAX + t_buffer *p = (t_buffer *)sym->s_thing; + FLEXT_ASSERT(p); +#ifdef _FLEXT_HAVE_MAX_INUSEFLAG + long old = p->b_inuse; +#ifdef ATOMIC_INCREMENT + ATOMIC_INCREMENT(&p->b_inuse); +#else + p->b_inuse = 1; +#endif + return old; +#else + return 0; +#endif +#else +#error not implemented +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::Unlock(flext::buffer::lock_t prv) +{ + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + FLEXT_ASSERT(arr); +#ifdef _FLEXT_HAVE_PD_GARRAYLOCKS + garray_unlock(arr); +#endif +#elif FLEXT_SYS == FLEXT_SYS_MAX + t_buffer *p = (t_buffer *)sym->s_thing; + FLEXT_ASSERT(p); +#ifdef _FLEXT_HAVE_MAX_INUSEFLAG +#ifdef ATOMIC_INCREMENT + ATOMIC_DECREMENT(&p->b_inuse); +#else + p->b_inuse = prv; +#endif +#endif +#else +#error not implemented +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::Frames(int fr,bool keep,bool zero) +{ + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + // is this function guaranteed to keep memory and set rest to zero? + ::garray_resize(arr,(float)fr); + Update(); +#elif FLEXT_SYS == FLEXT_SYS_MAX + Element *tmp = NULL; + int sz = frames; + if(fr < sz) sz = fr; + + if(keep) { + // copy buffer data to tmp storage + tmp = (Element *)NewAligned(sz*sizeof(Element)); + FLEXT_ASSERT(tmp); + CopySamples(tmp,data,sz); + } + + t_atom msg; + t_buffer *buf = (t_buffer *)sym->s_thing; + // b_msr reflects buffer sample rate... is this what we want? + // Max bug: adding half a sample to prevent roundoff errors.... + float ms = (fr+0.5)/buf->b_msr; + + SetFloat(msg,ms); + ::typedmess((object *)buf,(t_symbol *)sym_size,1,&msg); + + Update(); + + if(tmp) { + // copy data back + CopySamples(data,tmp,sz); + FreeAligned(tmp); + if(zero && sz < fr) ZeroSamples(data+sz,fr-sz); + } + else + if(zero) ZeroSamples(data,fr); +#else +#error +#endif +} + + +#if FLEXT_SYS == FLEXT_SYS_PD +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::SetRefrIntv(float intv) +{ + interval = intv; + if(interval == 0 && ticking) { + clock_unset(tick); + ticking = false; + } +} +#elif FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::SetRefrIntv(float) {} +#else +#error +#endif + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::Dirty(bool force) +{ + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + if((!ticking) && (interval || force)) { + ticking = true; + cb_tick(this); // immediately redraw + } + else { + if(force) clock_delay(tick,0); + isdirty = true; + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + t_buffer *p = (t_buffer *)sym->s_thing; + FLEXT_ASSERT(p && !NOGOOD(p)); + ::object_method((t_object *)p,(t_symbol *)sym_dirty); +// p->b_modtime = gettime(); +#else +#error Not implemented +#endif +} + +#if FLEXT_SYS == FLEXT_SYS_PD +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::cb_tick(buffer *b) +{ + if(b->arr) garray_redraw(b->arr); +#ifdef FLEXT_DEBUG + else error("buffer: array is NULL"); +#endif + + if(b->isdirty && b->interval) { + b->isdirty = false; + b->ticking = true; + clock_delay(b->tick,b->interval); + } + else + b->ticking = false; +} +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::ClearDirty() +{ +#if FLEXT_SYS == FLEXT_SYS_PD + cleantime = clock_getlogicaltime(); +#elif FLEXT_SYS == FLEXT_SYS_MAX + cleantime = gettime(); +#else +#error Not implemented +#endif +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::buffer::IsDirty() const +{ + if(!sym) return false; +#if FLEXT_SYS == FLEXT_SYS_PD + #ifdef _FLEXT_HAVE_PD_GARRAYUPDATETIME + return arr && (isdirty || garray_updatetime(arr) > cleantime); + #else + // Don't know.... (no method in PD judging whether buffer has been changed from outside flext...) + return true; + #endif +#elif FLEXT_SYS == FLEXT_SYS_MAX + t_buffer *p = (t_buffer *)sym->s_thing; + FLEXT_ASSERT(p && !NOGOOD(p)); + return p->b_modtime > cleantime; +#else +#error Not implemented +#endif +} + +#endif // Jmax + +#include "flpopns.h" + +#endif // __FLEXT_BUF_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flclass.h b/externals/grill/trunk/flext/libbuild/include/flext/flclass.h new file mode 100755 index 0000000000000000000000000000000000000000..c519ae3270496b07a96ecf22d2aaf6c38d11a414 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flclass.h @@ -0,0 +1,1131 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flclass.h + \brief User accessible flext base classes + +*/ + +#ifndef __FLCLASS_H +#define __FLCLASS_H + +// include the header file declaring the base classes +#include "flbase.h" +#include "flsupport.h" +#include "flmap.h" +#include "flinternal.h" + +#ifdef _MSC_VER +#pragma warning(disable: 4786) +#endif + +#ifdef __BORLANDC__ +#pragma warn -8008 // Condition is always false +#pragma warn -8057 // Parameter is never used +#pragma warn -8066 // Unreachable code +#endif + + +#include "flpushns.h" + +// === flext_base ================================================== + +/*! \brief Flext message only base object + + This is the base class from which typical external objects derive. + DSP objects should use the flext_dsp class which inherits from flext_base and + provides the necessary functionality. + + For a valid external object class you would also need FLEXT_HEADER, also if it's only + a base class without instantiated objects again. + To make an instance of an object class you would typically use FLEXT_NEW or + its companions. + + See the flext_obj class for additional information. +*/ + + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_base); + +typedef class FLEXT_SHARE FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) flext_base; + +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext_base): + public flext_obj +{ + FLEXT_HEADER_S(FLEXT_CLASSDEF(flext_base),flext_obj,Setup) + + friend class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj); + +public: + +// --- inheritable virtual methods -------------------------------- + + /*! \defgroup FLEXT_C_VIRTUAL Virtual base class functions + + @{ + */ + + //! called on patcher load (not on mere object creation!) + virtual void CbLoadbang(); + virtual void m_loadbang(); + + //! called on (double-)click into object box + virtual void CbClick(); + + /*! \brief Called for every incoming message. + All method handling is done in there + \return True if a handler was found and called + */ + virtual bool CbMethodHandler(int inlet,const t_symbol *s,int argc,const t_atom *argv); + + /*! \brief Called for every unhandled message (by CbMethodHandler) + */ + virtual bool CbMethodResort(int inlet,const t_symbol *s,int argc,const t_atom *argv); + virtual bool m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv); + + virtual bool CbIdle(); + +//! @} FLEXT_C_VIRTUAL + + +// --- inlet/outlet stuff ----------------------------------------- + + /*! \defgroup FLEXT_C_INOUT Flext in-/outlet functions + \note These must be called in the class' constructor + \note All (also default) inlets must be defined + @{ + */ + + /*! \defgroup FLEXT_C_IO_ADD Announce in-/outlet functions + @{ + */ + + // argument m specifies multiple inlet/outlet count + +// void AddInDef() { AddInlet(xlet_def,1); } + + /*! \brief Add inlet(s) for anythings + \remark That's the one to choose for the left-most (first) inlet unless it's a signal inlet. + */ + void AddInAnything(int m = 1) { AddInlet(xlet_any,m); } + /*! \brief Add inlet(s) for anythings (with description) + \remark That's the one to choose for the left-most (first) inlet unless it's a signal inlet. + */ + void AddInAnything(const char *desc,int m = 1) { AddInlet(xlet_any,m,desc); } + //! Add inlet(s) for floats + void AddInFloat(int m = 1) { AddInlet(xlet_float,m); } + //! Add inlet(s) for floats (with description) + void AddInFloat(const char *desc,int m = 1) { AddInlet(xlet_float,m,desc); } + //! Add inlet(s) for integers + void AddInInt(int m = 1) { AddInlet(xlet_int,m); } + //! Add inlet(s) for integers (with description) + void AddInInt(const char *desc,int m = 1) { AddInlet(xlet_int,m,desc); } + //! Add inlet(s) for symbols + void AddInSymbol(int m = 1) { AddInlet(xlet_sym,m); } + //! Add inlet(s) for symbol (with description) + void AddInSymbol(const char *desc,int m = 1) { AddInlet(xlet_sym,m,desc); } + //! Add inlet(s) for bang + void AddInBang(int m = 1) { AddInlet(xlet_sym,m); } + //! Add inlet(s) for bangs (with description) + void AddInBang(const char *desc,int m = 1) { AddInlet(xlet_sym,m,desc); } + //! Add inlet(s) for lists + void AddInList(int m = 1) { AddInlet(xlet_list,m); } + //! Add inlet(s) for lists (with description) + void AddInList(const char *desc,int m = 1) { AddInlet(xlet_list,m,desc); } + + //! Add outlet(s) for anythings + void AddOutAnything(int m = 1) { AddOutlet(xlet_any,m); } + //! Add outlet(s) for anythings (with description) + void AddOutAnything(const char *desc,int m = 1) { AddOutlet(xlet_any,m,desc); } + //! Add outlet(s) for floats + void AddOutFloat(int m = 1) { AddOutlet(xlet_float,m); } + //! Add outlet(s) for floats (with description) + void AddOutFloat(const char *desc,int m = 1) { AddOutlet(xlet_float,m,desc); } + //! Add outlet(s) for integers + void AddOutInt(int m = 1) { AddOutlet(xlet_int,m); } + //! Add outlet(s) for integers (with description) + void AddOutInt(const char *desc,int m = 1) { AddOutlet(xlet_int,m,desc); } + //! Add outlet(s) for symbols + void AddOutSymbol(int m = 1) { AddOutlet(xlet_sym,m); } + //! Add outlet(s) for symbols (with description) + void AddOutSymbol(const char *desc,int m = 1) { AddOutlet(xlet_sym,m,desc); } + //! Add outlet(s) for bangs + void AddOutBang(int m = 1) { AddOutlet(xlet_sym,m); } + //! Add outlet(s) for bangs (with description) + void AddOutBang(const char *desc,int m = 1) { AddOutlet(xlet_sym,m,desc); } + //! Add outlet(s) for lists + void AddOutList(int m = 1) { AddOutlet(xlet_list,m); } + //! Add outlet(s) for lists (with description) + void AddOutList(const char *desc,int m = 1) { AddOutlet(xlet_list,m,desc); } + + //! \deprecated inlets and outlets are now set up automatically + bool SetupInOut() { return true; } + + //! @} FLEXT_C_IO_ADD + + /*! \defgroup FLEXT_C_IO_MISC Miscellanous in-/outlet functionality + @{ + */ + + //! Get number of inlets + int CntIn() const { return incnt; } + //! Get number of outlets + int CntOut() const { return outcnt; } + //! Get number of signal inlets + int CntInSig() const { return insigs; } + //! Get number of signal outlets + int CntOutSig() const { return outsigs; } + + + //! Retrieve currently processed message tag (NULL if no message processing) + static const t_symbol *thisTag() { return curtag; } + + class outlet; + + //! Get pointer to outlet (not in the constructor!) + outlet *GetOut(int ix) const { return outlets[ix]; } + + int GetOutAttr() const { return HasAttributes()?CntOut():0; } + + //! @} FLEXT_C_IO_MISC + + /*! \defgroup FLEXT_C_IO_OUT Output data to inlets/outlets + @{ + */ + + // output messages + + //! Output bang (index n starts with 0) + void ToOutBang(int n) const; + + //! Output float (index n starts with 0) + void ToOutFloat(int n,float f) const; + + //! Output integer (index n starts with 0) + void ToOutInt(int n,int f) const; + + //! Output boolean (index n starts with 0) + void ToOutBool(int n,bool f) const { ToOutInt(n,f?1:0); } + + //! Output double (index n starts with 0) + void ToOutDouble(int n,double d) const { t_atom dbl[2]; ToOutList(n,2,SetDouble(dbl,d)); } + + //! Output symbol (index n starts with 0) + void ToOutSymbol(int n,const t_symbol *s) const; + //! Output string aka symbol (index n starts with 0) + void ToOutString(int n,const char *s) const { ToOutSymbol(n,MakeSymbol(s)); } + + //! Output atom (index n starts with 0) + void ToOutAtom(int n,const t_atom &at) const; + + //! Output list (index n starts with 0) + void ToOutList(int n,int argc,const t_atom *argv) const; + //! Output list (index n starts with 0) + void ToOutList(int n,const AtomList &list) const { ToOutList(n,list.Count(),list.Atoms()); } + + //! Output anything (index n starts with 0) + void ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const; + //! Output anything (index n starts with 0) + void ToOutAnything(int n,const AtomAnything &any) const { ToOutAnything(n,any.Header(),any.Count(),any.Atoms()); } + //! Output anything (index n starts with 0) + void ToOutAnything(int n,const t_symbol *s,const AtomList &list) const { ToOutAnything(n,s,list.Count(),list.Atoms()); } + + //! @} FLEXT_C_IO_OUT + + /*! \defgroup FLEXT_C_IO_QUEUE Low-priority output of data to inlets/outlets + @{ + */ + + //! Output low priority bang (index n starts with 0) + void ToQueueBang(int n) const; + + //! Output low priority float (index n starts with 0) + void ToQueueFloat(int n,float f) const; + + //! Output low priority integer (index n starts with 0) + void ToQueueInt(int n,int f) const; + + //! Output low priority boolean (index n starts with 0) + void ToQueueBool(int n,bool f) const { ToQueueInt(n,f?1:0); } + + //! Output double (index n starts with 0) + void ToQueueDouble(int n,double d) const { t_atom dbl[2]; ToQueueList(n,2,SetDouble(dbl,d)); } + + //! Output low priority symbol (index n starts with 0) + void ToQueueSymbol(int n,const t_symbol *s) const; + //! Output low priority string aka symbol (to appointed outlet) + void ToQueueString(int n,const char *s) const { ToQueueSymbol(n,MakeSymbol(s)); } + + //! Output low priority atom (index n starts with 0) + void ToQueueAtom(int n,const t_atom &at) const; + + //! Output low priority list (index n starts with 0) + void ToQueueList(int n,int argc,const t_atom *argv) const; + //! Output low priority list (index n starts with 0) + void ToQueueList(int n,const AtomList &list) const { ToQueueList(n,list.Count(),list.Atoms()); } + + //! Output low priority anything (index n starts with 0) + void ToQueueAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const; + //! Output low priority anything (index n starts with 0) + void ToQueueAnything(int n,const AtomAnything &any) const { ToQueueAnything(n,any.Header(),any.Count(),any.Atoms()); } + + //! @} FLEXT_C_IO_QUEUE + + + /*! \defgroup FLEXT_C_IO_SELF Output of data to inlets/outlets of this object + @{ + */ + + //! Send bang to self (inlet n) + void ToSelfBang(int n) const { ToQueueBang(-1-n); } + + //! Send float to self (inlet n) + void ToSelfFloat(int n,float f) const { ToQueueFloat(-1-n,f); } + + //! Send integer to self (inlet n) + void ToSelfInt(int n,int f) const { ToQueueInt(-1-n,f); } + + //! Send boolean to self (inlet n) + void ToSelfBool(int n,bool f) const { ToSelfInt(n,f?1:0); } + + //! Send double to self (index n starts with 0) + void ToSelfDouble(int n,double d) const { t_atom dbl[2]; ToSelfList(n,2,SetDouble(dbl,d)); } + + //! Send symbol to self (inlet n) + void ToSelfSymbol(int n,const t_symbol *s) const { ToQueueSymbol(-1-n,s); } + //! Send string aka symbol to self (inlet 0) + void ToSelfString(int n,const char *s) const { ToSelfSymbol(n,MakeSymbol(s)); } + + //! Output atom (index n starts with 0) + void ToSelfAtom(int n,const t_atom &at) const { ToQueueAtom(-1-n,at); } + + //! Send list to self (inlet n) + void ToSelfList(int n,int argc,const t_atom *argv) const { ToQueueList(-1-n,argc,argv); } + //! Send list to self (inlet n) + void ToSelfList(int n,const AtomList &list) const { ToSelfList(n,list.Count(),list.Atoms()); } + + //! Send anything to self (inlet n) + void ToSelfAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { ToQueueAnything(-1-n,s,argc,argv); } + //! Send anything to self (inlet n) + void ToSelfAnything(int n,const AtomAnything &any) const { ToSelfAnything(n,any.Header(),any.Count(),any.Atoms()); } + + //! @} FLEXT_C_IO_SELF + + + /*! \defgroup FLEXT_C_IO_MESSAGEBUNDLE Output of data via message bundles + + These are used to assure the sending of several messages from a second thread to the same logical time + + @{ + */ + + //! Output bang (index n starts with 0) + void MsgAddBang(MsgBundle *mb,int n) const; + + //! Output float (index n starts with 0) + void MsgAddFloat(MsgBundle *mb,int n,float f) const; + + //! Output integer (index n starts with 0) + void MsgAddInt(MsgBundle *mb,int n,int f) const; + + //! Output boolean (index n starts with 0) + void MsgAddBool(MsgBundle *mb,int n,bool f) const { MsgAddInt(mb,n,f?1:0); } + + //! Output double (index n starts with 0) + void MsgAddDouble(MsgBundle *mb,int n,double d) const { t_atom dbl[2]; MsgAddList(mb,n,2,SetDouble(dbl,d)); } + + //! Output symbol (index n starts with 0) + void MsgAddSymbol(MsgBundle *mb,int n,const t_symbol *s) const; + //! Output string aka symbol (to appointed outlet) + void MsgAddString(MsgBundle *mb,int n,const char *s) const { MsgAddSymbol(mb,n,MakeSymbol(s)); } + + //! Output atom (index n starts with 0) + void MsgAddAtom(MsgBundle *mb,int n,const t_atom &at) const; + + //! Output list (index n starts with 0) + void MsgAddList(MsgBundle *mb,int n,int argc,const t_atom *argv) const; + + //! Output list (index n starts with 0) + void MsgAddList(MsgBundle *mb,int n,const AtomList &list) const { MsgAddList(mb,n,list.Count(),list.Atoms()); } + + //! Output anything (index n starts with 0) + void MsgAddAnything(MsgBundle *mb,int n,const t_symbol *s,int argc,const t_atom *argv) const; + //! Output anything (index n starts with 0) + void MsgAddAnything(MsgBundle *mb,int n,const AtomAnything &any) const { MsgAddAnything(mb,n,any.Header(),any.Count(),any.Atoms()); } + + void MsgSelfBang(MsgBundle *mb,int n) const { MsgAddBang(mb,-1-n); } + + //! Send float to self (inlet n) + void MsgSelfFloat(MsgBundle *mb,int n,float f) const { MsgAddFloat(mb,-1-n,f); } + + //! Send integer to self (inlet n) + void MsgSelfInt(MsgBundle *mb,int n,int f) const { MsgAddInt(mb,-1-n,f); } + + //! Send boolean to self (inlet n) + void MsgSelfBool(MsgBundle *mb,int n,bool f) const { MsgSelfInt(mb,n,f?1:0); } + + //! Output double (index n starts with 0) + void MsgSelfDouble(MsgBundle *mb,int n,double d) const { t_atom dbl[2]; MsgSelfList(mb,n,2,SetDouble(dbl,d)); } + + //! Send symbol to self (inlet n) + void MsgSelfSymbol(MsgBundle *mb,int n,const t_symbol *s) const { MsgAddSymbol(mb,-1-n,s); } + //! Send string aka symbol to self (inlet 0) + void MsgSelfString(MsgBundle *mb,int n,const char *s) const { MsgSelfSymbol(mb,n,MakeSymbol(s)); } + + //! Output atom (index n starts with 0) + void MsgSelfAtom(MsgBundle *mb,int n,const t_atom &at) const { MsgAddAtom(mb,-1-n,at); } + + //! Send list to self (inlet n) + void MsgSelfList(MsgBundle *mb,int n,int argc,const t_atom *argv) const { MsgAddList(mb,-1-n,argc,argv); } + //! Send list to self (inlet n) + void MsgSelfList(MsgBundle *mb,int n,const AtomList &list) const { MsgSelfList(mb,n,list.Count(),list.Atoms()); } + + //! Send anything to self (inlet n) + void MsgSelfAnything(MsgBundle *mb,int n,const t_symbol *s,int argc,const t_atom *argv) const { MsgAddAnything(mb,-1-n,s,argc,argv); } + //! Send anything to self (inlet n) + void MsgSelfAnything(MsgBundle *mb,int n,const AtomAnything &any) const { MsgSelfAnything(mb,n,any.Header(),any.Count(),any.Atoms()); } + + //! @} FLEXT_C_IO_MESSAGEBUNDLE + +//! @} FLEXT_C_INOUT + + +// --- message handling ------------------------------------------- + + enum metharg { + a_null = 0, + a_float,a_int,a_bool, + a_symbol,a_pointer, + a_list,a_any, // (t_symbol *) / int / t_atom * + a_LIST,a_ANY // AtomList, AtomAnything + }; + + typedef bool (*methfun)(flext_base *c); + + /*! \defgroup FLEXT_C_ADDMETHOD Method handling (object scope) + \internal + @{ + */ + + void AddMethodDef(int inlet,const t_symbol *tag = NULL) { ThMeths()->Add(new MethItem,tag,inlet); } + void AddMethodDef(int inlet,const char *tag = NULL) { AddMethodDef(inlet,MakeSymbol(tag)); } + + void AddMethod(int inlet,bool (*m)(flext_base *)) { AddMethod(ThMeths(),inlet,sym_bang,(methfun)m,a_null); } + void AddMethod(int inlet,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_list,a_null); } + void AddMethod(int inlet,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_list,a_null); } + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_null); } // pure method + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ThMeths(),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything + void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything + void AddMethod(int inlet,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ThMeths(),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol + void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ThMeths(),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol + void AddMethod(int inlet,bool (*m)(flext_base *,float &)) { AddMethod(ThMeths(),inlet,sym_float,(methfun)m,a_float,a_null); } // single float + void AddMethod(int inlet,bool (*m)(flext_base *,float &,float &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_float,a_float,a_null); } // list of 2 floats + void AddMethod(int inlet,bool (*m)(flext_base *,float &,float &,float &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_float,a_float,a_float,a_null); } // list of 3 floats +#if FLEXT_SYS == FLEXT_SYS_PD + void AddMethod(int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,sym_float,(methfun)m,a_int,a_null); } // single float +#else + void AddMethod(int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,sym_int,(methfun)m,a_int,a_null); } // single float +#endif + void AddMethod(int inlet,bool (*m)(flext_base *,int &,int &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_int,a_int,a_null); } // list of 2 floats + void AddMethod(int inlet,bool (*m)(flext_base *,int &,int &,int &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_int,a_int,a_int,a_null); } // list of 3 floats + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,float &)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_float,a_null); } // method+float + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_int,a_null); } // method+int + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,float &)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int &)) { AddMethod(inlet,MakeSymbol(tag),m); } + + // Â¥schedule call of the CbIdle method during the next idle cycle + void AddIdle(); + + //! Set Max/MSP style of distributing list elements over (message) inlets + static void SetDist(t_classid c,bool d = true); + //! Query whether lists are distributed + bool DoDist() const; + + +//! @} FLEXT_C_ADDMETHOD + + /*! \defgroup FLEXT_C_CADDMETHOD Method handling (class scope) + \internal + @{ + */ + + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *)) { AddMethod(ClMeths(c),inlet,sym_bang,(methfun)m,a_null); } + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_list,a_null); } + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_list,a_null); } + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_null); } // pure method + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ClMeths(c),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ClMeths(c),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &)) { AddMethod(ClMeths(c),inlet,sym_float,(methfun)m,a_float,a_null); } // single float + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &,float &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_float,a_float,a_null); } // list of 2 floats + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &,float &,float &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_float,a_float,a_float,a_null); } // list of 3 floats +#if FLEXT_SYS == FLEXT_SYS_PD + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,sym_float,(methfun)m,a_int,a_null); } // single integer +#else + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,sym_int,(methfun)m,a_int,a_null); } // single integer +#endif + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &,int &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_int,a_int,a_null); } // list of 2 floats + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &,int &,int &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_int,a_int,a_int,a_null); } // list of 3 floats + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,float &)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_float,a_null); } // method+float + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_int,a_null); } // method+int + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,float &)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int &)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + + // Â¥schedule call of the given idlefun during the next idle cycle + static void AddIdle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv); + +//! @} FLEXT_C_CADDMETHOD + +// --- bind/unbind --------------------------------------- + + /*! \defgroup FLEXT_C_BIND Methods for binding a flext class to a symbol + + @{ + */ + + //! Bind object to a symbol + bool Bind(const t_symbol *sym); + //! Unbind object from a symbol + bool Unbind(const t_symbol *sym); + + //! Bind object to a symbol (as string) + bool Bind(const char *sym) { return Bind(MakeSymbol(sym)); } + //! Unbind object from a symbol (as string) + bool Unbind(const char *sym) { return Unbind(MakeSymbol(sym)); } + + /*! \brief Bind a method to a symbol + \param sym Symbol to bind to + \param meth Function to bind + \param data User data that is passed to the function + \return true on success + */ + bool BindMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *data = NULL); + /*! \brief Unbind a method from a symbol + \param sym Symbol to unbind from (if NULL... unbind all functions) + \param meth Method to unbind (if NULL ... unbind all functions bound to symbol) + \param data returns data pointer specified with BindMethod + \return true on success + */ + bool UnbindMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data) = NULL,void **data = NULL); + /*! \brief Get data of bound method of a symbol + \param sym Symbol to bind to + \param meth Function to bind + \param data Reference to returned user data + \return true on success (symbol/method combination was found) + */ + bool GetBoundMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *&data); + + //! \brief Bind a method to a symbol (as string) + bool BindMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *data = NULL) { return BindMethod(MakeSymbol(sym),meth,data); } + //! \brief Unbind a method from a symbol (as string) + bool UnbindMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data) = NULL,void **data = NULL) { return UnbindMethod(MakeSymbol(sym),meth,data); } + //! \brief Get data of bound method of a symbol (as string) + bool GetBoundMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *&data) { return GetBoundMethod(MakeSymbol(sym),meth,data); } + + /*! Unbind all symbol bindings + \note Memory associated to data pointers passed by BindMethod will not be freed! + */ + bool UnbindAll(); + +//! @} FLEXT_C_BIND + + // --- thread stuff ----------------------------------------------- + +#ifdef FLEXT_THREADS + /*! \defgroup FLEXT_C_THREAD Thread handling + + @{ + */ + + //! Start a thread for this object + bool StartThread(void (*meth)(thr_params *p),thr_params *p,const char * = NULL) { p->cl = this; return flext::LaunchThread(meth,p); } + + //! Terminate all threads of this object + bool StopThreads(); +#endif // FLEXT_THREADS + +//! @} FLEXT_C_THREAD + +// xxx internal stuff xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +public: // needed by VC++ 6 + + enum xlettype { + xlet_none = 0, + xlet_float,xlet_int,xlet_sym,xlet_list,xlet_any, + xlet_LIST,xlet_ANY, // use AtomList and AtomAnything + xlet_sig + }; + +protected: + + FLEXT_CLASSDEF(flext_base)(); + + /*! \brief Set up inlets and outlets, method and attribute lists + */ + virtual bool Init(); + + /*! \brief Deallocate all kinds of stuff + */ + virtual void Exit(); + + + /*! \defgroup FLEXT_C_ATTR Attribute handling methods (object scope) + @{ + */ + + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(attr,a_float,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(attr,a_int,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(attr,a_bool,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(attr,a_LIST,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(attr,a_ANY,(methfun)get,(methfun)set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(MakeSymbol(attr),get,set); } + +//! @} FLEXT_C_ATTR + + /*! \defgroup FLEXT_C_CATTR Attribute handling methods (class scope) + @{ + */ + + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(c,attr,a_float,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(c,attr,a_int,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(c,attr,a_bool,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(c,attr,a_symbol,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(c,attr,a_symbol,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(c,attr,a_LIST,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(c,attr,a_ANY,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(c,MakeSymbol(attr),get,set); } + +//! @} FLEXT_C_CATTR + + //! Dump an attribute to the attribute outlet + bool DumpAttrib(const t_symbol *attr) const; + //! Dump an attribute to the attribute outlet + bool DumpAttrib(const char *attr) const { return DumpAttrib(MakeSymbol(attr)); } + + // check for attribute symbol @ + static int CheckAttrib(int argc,const t_atom *argv); + // check for attribute symbol @ + static int CheckAttrib(const AtomList &args,int offset = 0) { return CheckAttrib(args.Count()-offset,args.Atoms()+offset)+offset; } + + //! List attributes + bool ListAttrib() const; + //! List attributes + void ListAttrib(AtomList &a) const; + //! Get an attribute value + bool GetAttrib(const t_symbol *s,AtomList &a) const; + //! Set an attribute value + bool SetAttrib(const t_symbol *s,int argc,const t_atom *argv); + //! Set an attribute value + bool SetAttrib(const t_symbol *s,const AtomList &a) { return SetAttrib(s,a.Count(),a.Atoms()); } + + // get and set the attribute + bool BangAttrib(const t_symbol *a); + // get and set the attribute + bool BangAttrib(const char *a) { return BangAttrib(MakeSymbol(a)); } + // get and set all (both get- and settables) + bool BangAttribAll(); + // show/hide the attribute + bool ShowAttrib(const t_symbol *a,bool show) const; + // show/hide the attribute + bool ShowAttrib(const char *a,bool show) { return ShowAttrib(MakeSymbol(a),show); } + + //! List methods + void ListMethods(AtomList &a,int inlet = 0) const; + +/*! \addtogroup FLEXT_C_INOUT + @{ +*/ + + //! \brief get a code for a list of inlets or outlets + unsigned long XletCode(xlettype tp = xlet_none,...); // end list with 0 (= tp_none) !! + + /*! \brief Add some inlets by a special code representing the types + \remark use XletCode function to get code value + */ + void AddInlets(unsigned long code); + + //! \brief Add one or more inlet(s) + void AddInlet(xlettype tp,int mult = 1,const char *desc = NULL); + + /*! \brief Add some inlets by a special code representing the types + \remark use XletCode function to get code value + */ + void AddOutlets(unsigned long code); + + //! \brief Add one or more outlet(s) + void AddOutlet(xlettype tp,int mult = 1,const char *desc = NULL); + + //! \brief Set the description of an indexed inlet + void DescInlet(int ix,const char *desc); + + //! \brief Set the description of an indexed outlet + void DescOutlet(int ix,const char *desc); + +//! @} FLEXT_C_INOUT + + +// method handling + + public: + + class AttrItem; + + class Item + { + public: + Item(AttrItem *a): attr(a),nxt(NULL) {} + virtual ~Item(); + + bool IsAttr() const { return attr != NULL; } + + AttrItem *attr; + Item *nxt; + }; + + typedef TablePtrMap<const t_symbol *,Item *,8> TablePtrMapDef; + + class ItemSet + :public TablePtrMapDef + { + public: + virtual ~ItemSet(); + virtual void clear(); + }; + + /*! This class holds hashed item entries + \note not thread-safe! + */ + class FLEXT_SHARE ItemCont + { + public: + ItemCont(); + ~ItemCont(); + + int Min() const { return -1; } + int Max() const { return size-2; } + + bool Contained(int i) const { return i+1 < size; } + + //! Add an entry + void Add(Item *it,const t_symbol *tag,int inlet = 0); + //! Remove an entry + bool Remove(Item *it,const t_symbol *tag,int inlet,bool free); + //! Find an entry list in the Item array + Item *FindList(const t_symbol *tag,int inlet = 0); + + //! Get list for an inlet + ItemSet &GetInlet(int inlet = 0) + { + FLEXT_ASSERT(inlet >= Min() && inlet <= Max()); + return *cont[inlet+1]; + } + + //! Get counter for total members (for index of new item) + int Members() const { return members; } + + protected: + + void Resize(int nsz); + + int members; + int memsize,size; + ItemSet **cont; + }; + + //! \brief This represents an item of the method list + class MethItem: + public Item + { + public: + MethItem(AttrItem *conn = NULL); + virtual ~MethItem(); + + void SetArgs(methfun fun,int argc,metharg *args); + + int index; + int argc; + metharg *args; + methfun fun; + }; + + //! \brief This represents an item of the attribute list + class AttrItem: + public Item + { + public: + AttrItem(const t_symbol *tag,metharg tp,methfun fun,int flags); + + enum { + afl_get = 0x01, afl_set = 0x02, + afl_getset = afl_get|afl_set, + afl_shown = 0x08 + }; + + bool IsGet() const { return (flags&afl_getset) == afl_get; } + bool IsSet() const { return (flags&afl_getset) == afl_set; } + bool IsShown() const { return (flags&afl_shown) != 0; } + bool BothExist() const { return counter != NULL; } + AttrItem *Counterpart() { return counter; } + + int index; + int flags; + metharg argtp; + methfun fun; + AttrItem *counter; + const t_symbol *tag; + }; + + //! Represent a data value of an attribute + class AttrData: + public flext_root + { + public: + AttrData(): flags(0) {} + + enum { afl_save = 0x01,afl_init = 0x02,afl_inited = 0x04 }; + + void SetSave(bool s) { if(s) flags |= afl_save; else flags &= ~afl_save; } + bool IsSaved() const { return (flags&afl_save) != 0; } + void SetInit(bool s) { if(s) flags |= afl_init; else flags &= ~afl_init; } + bool IsInit() const { return (flags&afl_init) != 0; } + void SetInitValue(int argc,const t_atom *argv) { init(argc,argv); flags |= afl_inited; } + void SetInitValue(const AtomList &l) { SetInitValue(l.Count(),l.Atoms()); } + bool IsInitValue() const { return (flags&afl_inited) != 0; } + const AtomList &GetInitValue() const { return init; } + + AtomList init; + int flags; + }; + + class AttrDataCont + :public TablePtrMap<const t_symbol *,AttrData *,8> + { + public: + virtual ~AttrDataCont(); + virtual void clear(); + }; + + // these outlet functions don't check for thread but send directly to the real-time system + void ToSysBang(int n) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_bang((t_outlet *)o); CRITOFF(); } } + void ToSysFloat(int n,float f) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_float((t_outlet *)o,f); CRITOFF(); } } + void ToSysInt(int n,int f) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_flint((t_outlet *)o,f); CRITOFF(); } } + void ToSysSymbol(int n,const t_symbol *s) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(s)); CRITOFF(); } } + void ToSysString(int n,const char *s) const { ToSysSymbol(n,MakeSymbol(s)); } + void ToSysList(int n,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_list((t_outlet *)o,const_cast<t_symbol *>(sym_list),argc,(t_atom *)argv); CRITOFF(); } } + void ToSysList(int n,const AtomList &list) const { ToSysList(n,list.Count(),list.Atoms()); } + void ToSysAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_anything((t_outlet *)o,const_cast<t_symbol *>(s),argc,(t_atom *)argv); CRITOFF(); } } + void ToSysAnything(int n,const AtomAnything &any) const { ToSysAnything(n,any.Header(),any.Count(),any.Atoms()); } + void ToSysAnything(int n,const t_symbol *s,const AtomList &list) const { ToSysAnything(n,s,list.Count(),list.Atoms()); } + + void ToSysBool(int n,bool f) const { ToSysInt(n,f?1:0); } + void ToSysAtom(int n,const t_atom &at) const; + void ToSysDouble(int n,double d) const { t_atom dbl[2]; ToSysList(n,2,SetDouble(dbl,d)); } + + static void ToSysMsg(MsgBundle *mb); + + // add class method handlers + static void AddMessageMethods(t_class *c,bool dsp,bool dspin); + +private: + class pxbnd_object; +public: + + //! \brief This represents an item of the symbol-bound method list + class BindItem: + public Item + { + public: + BindItem(bool (*f)(flext_base *,t_symbol *s,int,t_atom *,void *),pxbnd_object *px); + virtual ~BindItem(); + + void Unbind(const t_symbol *s); + + bool (*fun)(flext_base *,t_symbol *s,int,t_atom *,void *); + pxbnd_object *px; + }; + + ItemCont *ThMeths() { if(!methhead) methhead = new ItemCont; return methhead; } + static ItemCont *ClMeths(t_classid c); + + //! \brief This is the central function to add message handlers. It is used by all other AddMethod incarnations. + static void AddMethod(ItemCont *ma,int inlet,const t_symbol *tag,methfun fun,metharg tp,...); + + ItemCont *ThAttrs() { return attrhead; } + static ItemCont *ClAttrs(t_classid c); + + static void AddAttrib(ItemCont *aa,ItemCont *ma,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun); + void AddAttrib(const t_symbol *attr,metharg tp,methfun gfun,methfun sfun); + static void AddAttrib(t_classid c,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun); + +private: + + static inline flext_base *thisObject(flext_hdr *c) { return FLEXT_CAST<flext_base *>(c->data); } + + static void Setup(t_classid c); + + //! \brief This represents either an inlet or outlet during construction + class FLEXT_SHARE xlet { + public: + xlet(); + ~xlet(); + + xlettype tp; + char *desc; + + void Desc(const char *c); + }; + + static xlet inlist[]; + static xlet outlist[]; + + //! current message tag + static const t_symbol *curtag; + //! number of message and signal inlets/outlets + unsigned char incnt,outcnt,insigs,outsigs; + + outlet **outlets; + + union t_any { + float ft; + int it; + bool bt; + const t_symbol *st; +#if FLEXT_SYS == FLEXT_SYS_PD + t_gpointer *pt; +#endif + void *vt; + }; + + typedef bool (*methfun_V)(flext_base *c,int argc,t_atom *argv); + typedef bool (*methfun_A)(flext_base *c,const t_symbol *s,int argc,t_atom *argv); + typedef bool (*methfun_0)(flext_base *c); + typedef bool (*methfun_1)(flext_base *c,t_any &); + typedef bool (*methfun_2)(flext_base *c,t_any &,t_any &); + typedef bool (*methfun_3)(flext_base *c,t_any &,t_any &,t_any &); + typedef bool (*methfun_4)(flext_base *c,t_any &,t_any &,t_any &,t_any &); + typedef bool (*methfun_5)(flext_base *c,t_any &,t_any &,t_any &,t_any &,t_any &); + + mutable ItemCont *methhead; + mutable ItemCont *bindhead; + + bool FindMeth(int inlet,const t_symbol *s,int argc,const t_atom *argv); + bool FindMethAny(int inlet,const t_symbol *s,int argc,const t_atom *argv); + bool TryMethTag(Item *lst,const t_symbol *tag,int argc,const t_atom *argv); + bool TryMethSym(Item *lst,const t_symbol *s); + bool TryMethAny(Item *lst,const t_symbol *s,int argc,const t_atom *argv); + + mutable ItemCont *attrhead; + mutable AttrDataCont *attrdata; + + AttrItem *FindAttrib(const t_symbol *tag,bool get,bool msg = false) const; + + bool InitAttrib(int argc,const t_atom *argv); + + bool DumpAttrib(const t_symbol *tag,AttrItem *a) const; + bool GetAttrib(const t_symbol *tag,AttrItem *a,AtomList &l) const; + bool SetAttrib(const t_symbol *tag,AttrItem *a,int argc,const t_atom *argv); + bool SetAttrib(const t_symbol *tag,AttrItem *a,const AtomList &l) { return SetAttrib(tag,a,l.Count(),l.Atoms()); } + // get and set the attribute + bool BangAttrib(const t_symbol *tag,AttrItem *a); + // show/hide the attribute + bool ShowAttrib(AttrItem *a,bool show) const; + + static bool cb_ListMethods(flext_base *c,int argc,const t_atom *argv); + static bool cb_ListAttrib(flext_base *c) { Locker lock(c); return c->ListAttrib(); } + + // queue stuff + + //! Start message queue + static void StartQueue(); +#if FLEXT_QMODE == 2 + //! Queue worker function + static void QWorker(thr_params *); +#endif + //! Flush messages in the queue + static void QFlush(flext_base *th = NULL); + + static bool qustarted; + +#if FLEXT_SYS == FLEXT_SYS_PD + + static void SetGfx(t_classid c); + +#ifndef FLEXT_NOATTREDIT + // attribute editor + static bool cb_AttrDialog(flext_base *c,int argc,const t_atom *argv); + static void cb_GfxProperties(flext_hdr *c, t_glist *); +#endif + +#ifdef FLEXT_ATTRHIDE + static void cb_GfxVis(flext_hdr *c, t_glist *gl, int vis); + static void cb_GfxSave(flext_hdr *c, t_binbuf *b); + static void cb_GfxSelect(flext_hdr *x, struct _glist *glist, int state); + + void BinbufArgs(t_binbuf *b,t_binbuf *args,bool withname,bool transdoll); + void BinbufAttr(t_binbuf *b,bool transdoll); +#endif + + static void cb_bang(flext_hdr *c); + static void cb_float(flext_hdr *c,t_float f); + static void cb_symbol(flext_hdr *c,const t_symbol *s); +// static void cb_pointer(fltext_hdr *c,const t_gpointer *p); + static void cb_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv); + + // proxy object (for additional inlets) + static t_class *px_class; + + struct px_object // no virtual table! + { + t_object obj; // MUST reside at memory offset 0 + flext_base *base; + int index; + + void init(flext_base *b,int ix) { base = b; index = ix; } + static void px_bang(px_object *c); + static void px_float(px_object *c,t_float f); + static void px_symbol(px_object *c,const t_symbol *s); +// static void px_pointer(px_object *c,const t_gpointer *p); + static void px_anything(px_object *c,const t_symbol *s,int argc,t_atom *argv); + }; + + static void cb_px_ft1(flext_hdr *c,t_float f); + static void cb_px_ft2(flext_hdr *c,t_float f); + static void cb_px_ft3(flext_hdr *c,t_float f); + static void cb_px_ft4(flext_hdr *c,t_float f); + static void cb_px_ft5(flext_hdr *c,t_float f); + static void cb_px_ft6(flext_hdr *c,t_float f); + static void cb_px_ft7(flext_hdr *c,t_float f); + static void cb_px_ft8(flext_hdr *c,t_float f); + static void cb_px_ft9(flext_hdr *c,t_float f); + +#elif FLEXT_SYS == FLEXT_SYS_MAX + typedef object px_object; + static void cb_bang(flext_hdr *c); + static void cb_float(flext_hdr *c,double f); + static void cb_int(flext_hdr *c,long v); + static void cb_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv); + + static void cb_px_in1(flext_hdr *c,long v); + static void cb_px_in2(flext_hdr *c,long v); + static void cb_px_in3(flext_hdr *c,long v); + static void cb_px_in4(flext_hdr *c,long v); + static void cb_px_in5(flext_hdr *c,long v); + static void cb_px_in6(flext_hdr *c,long v); + static void cb_px_in7(flext_hdr *c,long v); + static void cb_px_in8(flext_hdr *c,long v); + static void cb_px_in9(flext_hdr *c,long v); + + static void cb_px_ft1(flext_hdr *c,double f); + static void cb_px_ft2(flext_hdr *c,double f); + static void cb_px_ft3(flext_hdr *c,double f); + static void cb_px_ft4(flext_hdr *c,double f); + static void cb_px_ft5(flext_hdr *c,double f); + static void cb_px_ft6(flext_hdr *c,double f); + static void cb_px_ft7(flext_hdr *c,double f); + static void cb_px_ft8(flext_hdr *c,double f); + static void cb_px_ft9(flext_hdr *c,double f); +#endif + + px_object **inlets; + + // --------- symbol-bound proxy + + static t_class *pxbnd_class; + + class pxbnd_object: + public flext_root + // no virtual table! + { + public: + t_object obj; // MUST reside at memory offset 0 + flext_base *base; + BindItem *item; + void *data; + + void init(flext_base *b,BindItem *it,void *d) { base = b; item = it; data = d; } + static void px_method(pxbnd_object *c,const t_symbol *s,int argc,t_atom *argv); + }; + + //! create proxy class for symbol binding + static void SetupBindProxy(); + + // --------- + + //! set up inlet proxies + static void SetProxies(t_class *c,bool dsp); + + //! initialize inlets (according to class or object constructor definitions) + bool InitInlets(); + + //! initialize outlets (according to class or object constructor definitions) + bool InitOutlets(); + + // callback functions + + static void cb_loadbang(flext_hdr *c); + +#if FLEXT_SYS == FLEXT_SYS_MAX + char **indesc,**outdesc; + + static void cb_assist(flext_hdr *c,void *b,long msg,long arg,char *s); + static void cb_click (flext_hdr *c, Point pt, short mods); + + static void cb_dsp(flext_hdr *c,t_signal **s,short *count); +#elif FLEXT_SYS == FLEXT_SYS_PD + static void cb_click(flext_hdr *z,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt); + + static void cb_dsp(flext_hdr *c,t_signal **s); +#endif +}; + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flcontainers.h b/externals/grill/trunk/flext/libbuild/include/flext/flcontainers.h new file mode 100755 index 0000000000000000000000000000000000000000..7fe3e16379b243a7751f269d6da49bf37710fe69 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flcontainers.h @@ -0,0 +1,171 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flcontainers.h + \brief Lock-free container classes +*/ + +#ifndef __FLCONTAINERS_H +#define __FLCONTAINERS_H + +#include "flprefix.h" + +#include "lockfree/stack.hpp" +#include "lockfree/fifo.hpp" + +#include "flpushns.h" + +class LifoCell: public lockfree::stack_node {}; + +class Lifo + : public lockfree::intrusive_stack<LifoCell> +{ +public: + inline void Push(LifoCell *cell) { this->push(cell); } + inline LifoCell *Pop() { return this->pop(); } + inline bool Avail() const { return !this->empty(); } +}; + +template <typename T> +class TypedLifo + : public Lifo +{ +public: + inline void Push(T *c) { Lifo::Push(static_cast<T *>(c)); } + inline T *Pop() { return static_cast<T *>(Lifo::Pop()); } +}; + +template <typename T> +class ValueLifoCell + : public LifoCell +{ +public: + ValueLifoCell(T v): value(v) {} + T value; +}; + +template <typename T> +class ValueLifo + : public TypedLifo<ValueLifoCell<T> > +{ +public: + inline void Push(T v) + { + TypedLifo<ValueLifoCell<T> >::Push(new ValueLifoCell<T>(v)); + } + + inline T Pop() + { + ValueLifoCell<T> *p = TypedLifo<ValueLifoCell<T> >::Pop(); + T v = p->value; + delete p; + return v; + } +}; + +template <typename T,int M = 2,int O = 1> +class PooledLifo + : public TypedLifo<T> +{ +public: + PooledLifo(): sz(0),resz(0) {} + + void Push(T *c) { TypedLifo<T>::Push(c); ++sz; } + T *Pop() { T *r = TypedLifo<T>::Pop(); if(r) --sz; return r; } + + T *New() + { + T *n = reuse.Pop(); + if(n) { + --resz; + return n; + } + else + return new T; + } + + inline void Free(T *p) + { + if(resz < sz*M+O) { reuse.Push(p); ++resz; } + else delete p; + } +private: + TypedLifo<T> reuse; + size_t sz,resz; +}; + + +class FifoCell: public lockfree::fifo_node {}; + +class Fifo + : public lockfree::intrusive_fifo<FifoCell> +{ +public: + inline void Put(FifoCell *cl) { this->enqueue(cl); } + inline FifoCell *Get() { return this->dequeue(); } + inline bool Avail() const { return !this->empty(); } +}; + + +template <typename T> +class TypedFifo + : public Fifo +{ +public: + inline void Put(T *c) { Fifo::Put(static_cast<T *>(c)); } + inline T *Get() { return static_cast<T *>(Fifo::Get()); } +}; + + +template <typename T> +class ValueFifoCell + : public FifoCell +{ +public: + ValueFifoCell(T v): value(v) {} + T value; +}; + +template <typename T> +class ValueFifo + : public TypedFifo<ValueFifoCell<T> > +{ +public: + inline void Put(T v) + { + TypedFifo<ValueFifoCell<T> >::Put(new ValueFifoCell<T>(v)); + } + + inline T Get() + { + ValueFifoCell<T> *p = TypedFifo<ValueFifoCell<T> >::Get(); + T v = p->value; + delete p; + return v; + } +}; + + +template <typename T,int M = 2,int O = 1> +class PooledFifo + : public TypedFifo<T> +{ +public: + ~PooledFifo() { T *n; while((n = reuse.Get()) != NULL) delete n; } + + inline T *New() { T *n = reuse.Get(); return n?n:new T; } + inline void Free(T *p) { if(resz < sz*M+O) reuse.Put(p); else delete p; } +private: + TypedFifo<T> reuse; + size_t sz,resz; +}; + +#include "flpopns.h" + +#endif + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs.h new file mode 100755 index 0000000000000000000000000000000000000000..36adcf842b774dc2687cef66993ac59432e34529 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs.h @@ -0,0 +1,68 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs.h + \brief This file includes all the #define header files +*/ + +#ifndef __FLEXT_DEFS_H +#define __FLEXT_DEFS_H + +/*! \defgroup FLEXT_DEFS Definitions for basic flext functionality + @{ +*/ + +/*! \brief Switch for compilation of derived virtual classes + \remark These need dynamic type casts (and RTTI, naturally) + \ingroup FLEXT_GLOBALS +*/ +#ifdef FLEXT_VIRT +#define FLEXT_CAST dynamic_cast +#else +#define FLEXT_CAST static_cast +#endif + +//! @} FLEXT_DEFS + +#include "fldefs_hdr.h" + +#include "fldefs_setup.h" + + +// ==================================================================================== + +/*! \defgroup FLEXT_D_METHOD Declarations for flext methods + @{ +*/ + +#include "fldefs_methcb.h" +#include "fldefs_meththr.h" +#include "fldefs_methadd.h" +#include "fldefs_methbind.h" +#include "fldefs_methcall.h" + +//! @} FLEXT_D_METHOD + + + +#ifdef FLEXT_ATTRIBUTES + +/*! \defgroup FLEXT_D_ATTRIB Attribute definition + \note These have to reside inside the class declaration + @{ +*/ + +#include "fldefs_attrcb.h" +#include "fldefs_attrvar.h" +#include "fldefs_attradd.h" + +//! @} FLEXT_D_ATTRIB + +#endif // FLEXT_ATTRIBUTES + +#endif // __FLEXT_DEFS_H diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attradd.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attradd.h new file mode 100755 index 0000000000000000000000000000000000000000..a6982bb29570e7d29b009fd3337d9c9517f1f242 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attradd.h @@ -0,0 +1,119 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_attradd.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_ATTRADD_H +#define __FLEXT_DEFS_ATTRADD_H + + +/*! \defgroup FLEXT_D_CADDATTR Announce object attributes at class scope + \ingroup FLEXT_D_ATTRIB + \note These can only be used at class construction time + @{ +*/ + +//! Add handler for a gettable attribute +#define FLEXT_CADDATTR_GET(CL,NAME,GFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL) + +//! Add handler for a settable attribute +#define FLEXT_CADDATTR_SET(CL,NAME,SFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),NULL,(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable attribute +#define FLEXT_CADDATTR_VAR(CL,NAME,GFUN,SFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable attribute +#define FLEXT_CADDATTR_VAR1(CL,NAME,FUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN))) + + +//! Add handler for a gettable enum attribute +#define FLEXT_CADDATTR_GET_E(CL,NAME,GFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL) + +//! Add handler for a settable enum attribute +#define FLEXT_CADDATTR_SET_E(CL,NAME,SFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable enum attribute +#define FLEXT_CADDATTR_VAR_E(CL,NAME,GFUN,SFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable enum attribute +#define FLEXT_CADDATTR_VAR1_E(CL,NAME,FUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN))) + +//! @} FLEXT_D_CADDATTR + + +/*! \defgroup FLEXT_D_ADDATTR Announce object attributes + \ingroup FLEXT_D_ATTRIB + \note These can only be used at object construction time + \note (in constructor or in Init() function before call to parent's Init()) + @{ +*/ + +//! Add handler for a gettable attribute +#define FLEXT_ADDATTR_GET(NAME,GFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL) + +//! Add handler for a settable attribute +#define FLEXT_ADDATTR_SET(NAME,SFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),NULL,(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable attribute +#define FLEXT_ADDATTR_VAR(NAME,GFUN,SFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable attribute +#define FLEXT_ADDATTR_VAR1(NAME,FUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN))) + + +//! Add handler for a gettable enum attribute +#define FLEXT_ADDATTR_GET_E(NAME,GFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL) + +//! Add handler for a settable enum attribute +#define FLEXT_ADDATTR_SET_E(NAME,SFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable enum attribute +#define FLEXT_ADDATTR_VAR_E(NAME,GFUN,SFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable enum attribute +#define FLEXT_ADDATTR_VAR1_E(NAME,FUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN))) + +//! @} FLEXT_D_ADDATTR + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attrcb.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attrcb.h new file mode 100755 index 0000000000000000000000000000000000000000..0584d16dc08043548c1898ecede381511e76faf2 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attrcb.h @@ -0,0 +1,156 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_attrcb.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_ATTRCB_H +#define __FLEXT_DEFS_ATTRCB_H + + + +/*! \brief Declare a attribute set function + \internal +*/ +#define FLEXT_CALLSET_(FUN,TP) \ +static bool FLEXT_SET_PRE(FUN)(flext_base *c,TP &arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; } + +/*! \brief Declare a attribute get function + \internal +*/ +#define FLEXT_CALLGET_(FUN,TP) \ +static bool FLEXT_GET_PRE(FUN)(flext_base *c,TP &arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; } + + + +/*! \defgroup FLEXT_DA_CALLSET Definition of attribute set handlers + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare a set function for a float attribute +#define FLEXT_CALLSET_F(SFUN) \ +\ +FLEXT_CALLSET_(SFUN,float) + +//! Declare a set function for an integer attribute +#define FLEXT_CALLSET_I(SFUN) \ +\ +FLEXT_CALLSET_(SFUN,int) + +//! Declare a set function for a boolean attribute +#define FLEXT_CALLSET_B(SFUN) \ +\ +FLEXT_CALLSET_(SFUN,bool) +/* +static bool FLEXT_SET_PRE(FUN)(flext_base *c,int &arg) \ +{ bool b = arg != 0; FLEXT_CAST<thisType *>(c)->FUN(b); return true; } +*/ + +//! Declare a set function for an enum attribute +#define FLEXT_CALLSET_E(SFUN,TP) \ +\ +FLEXT_CALLSET_(SFUN,TP) + +//! Declare a set function for a symbol attribute +#define FLEXT_CALLSET_S(FUN) \ +static bool FLEXT_SET_PRE(FUN)(flext_base *c,const t_symbol *&arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; } + +//! Declare a set function for a variable list attribute +#define FLEXT_CALLSET_V(FUN) \ +static bool FLEXT_SET_PRE(FUN)(flext_base *c,AtomList *&arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(*arg); return true; } + +//! @} FLEXT_DA_CALLSET + +/*! \defgroup FLEXT_DA_CALLGET Definition of attribute get handlers + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare a get function for a float attribute +#define FLEXT_CALLGET_F(GFUN) \ +\ +FLEXT_CALLGET_(GFUN,float) + +//! Declare a get function for an integer attribute +#define FLEXT_CALLGET_I(GFUN) \ +\ +FLEXT_CALLGET_(GFUN,int) + +//! Declare a get function for a boolean attribute +#define FLEXT_CALLGET_B(GFUN) \ +\ +FLEXT_CALLGET_(GFUN,bool) +/* +static bool FLEXT_GET_PRE(FUN)(flext_base *c,int &arg) \ +{ bool b; FLEXT_CAST<thisType *>(c)->FUN(b); arg = b?1:0; return true; } +*/ + +//! Declare a get function for an enum attribute +#define FLEXT_CALLGET_E(GFUN,TP) \ +\ +FLEXT_CALLGET_(GFUN,TP) + +//! Declare a get function for a symbol attribute +#define FLEXT_CALLGET_S(FUN) \ +static bool FLEXT_GET_PRE(FUN)(flext_base *c,const t_symbol *&arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; } + +//! Declare a get function for a variable list attribute +#define FLEXT_CALLGET_V(FUN) \ +static bool FLEXT_GET_PRE(FUN)(flext_base *c,AtomList *&arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(*arg); return true; } + +//! @} FLEXT_DA_CALLGET + + +/*! \defgroup FLEXT_DA_CALLVAR Definition of attribute transfer handlers (both get and set) + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare both get and set functions for a float attribute +#define FLEXT_CALLVAR_F(GFUN,SFUN) \ +\ +FLEXT_CALLGET_F(GFUN) FLEXT_CALLSET_F(SFUN) + +//! Declare both get and set functions for an integer attribute +#define FLEXT_CALLVAR_I(GFUN,SFUN) \ +\ +FLEXT_CALLGET_I(GFUN) FLEXT_CALLSET_I(SFUN) + +//! Declare both get and set functions for a symbol attribute +#define FLEXT_CALLVAR_S(GFUN,SFUN) \ +\ +FLEXT_CALLGET_S(GFUN) FLEXT_CALLSET_S(SFUN) + +//! Declare both get and set functions for a boolean attribute +#define FLEXT_CALLVAR_B(GFUN,SFUN) \ +\ +FLEXT_CALLGET_B(GFUN) FLEXT_CALLSET_B(SFUN) + +//! Declare both get and set functions for an enum attribute +#define FLEXT_CALLVAR_E(GFUN,SFUN,TP) \ +\ +FLEXT_CALLGET_E(GFUN,TP) FLEXT_CALLSET_E(SFUN,TP) + +//! Declare both get and set functions for a variable list attribute +#define FLEXT_CALLVAR_V(GFUN,SFUN) \ +\ +FLEXT_CALLGET_V(GFUN) FLEXT_CALLSET_V(SFUN) + +//! @} FLEXT_DA_CALLVAR + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attrvar.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attrvar.h new file mode 100755 index 0000000000000000000000000000000000000000..aa2fb412517254ec2fa15ec785f09bac508d9b30 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_attrvar.h @@ -0,0 +1,156 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_attrvar.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_ATTRVAR_H +#define __FLEXT_DEFS_ATTRVAR_H + + +/*! \brief Declare an implicit attribute set function + \internal +*/ +#define FLEXT_ATTRSET_(VAR,TP) \ +static bool FLEXT_SET_PRE(VAR)(flext_base *c,TP &arg) \ +{ FLEXT_CAST<thisType *>(c)->VAR = arg; return true; } + +/*! \brief Declare an implicit attribute get function + \internal +*/ +#define FLEXT_ATTRGET_(VAR,TP) \ +static bool FLEXT_GET_PRE(VAR)(flext_base *c,TP &arg) \ +{ arg = (TP)FLEXT_CAST<thisType *>(c)->VAR; return true; } + + + +/*! \defgroup FLEXT_DA_ATTRSET Definition of implicit attribute set handlers + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare an implicit set function for a float attribute +#define FLEXT_ATTRSET_F(VAR) \ +\ +FLEXT_ATTRSET_(VAR,float) + +//! Declare an implicit set function for an integer attribute +#define FLEXT_ATTRSET_I(VAR) \ +\ +FLEXT_ATTRSET_(VAR,int) + +//! Declare an implicit set function for a symbol attribute +#define FLEXT_ATTRSET_S(VAR) \ +\ +FLEXT_ATTRSET_(VAR,const t_symbol *) + +//! Declare an implicit set function for a boolean attribute +#define FLEXT_ATTRSET_B(VAR) \ +\ +FLEXT_ATTRSET_(VAR,bool) +/* +static bool FLEXT_SET_PRE(VAR)(flext_base *c,int &arg) \ +{ FLEXT_CAST<thisType *>(c)->VAR = arg != 0; return true; } +*/ + +//! Declare an implicit set function for an enum attribute +#define FLEXT_ATTRSET_E(VAR,TP) \ +\ +FLEXT_ATTRSET_(VAR,TP) + +//! Declare an implicit set function for a variable list attribute +#define FLEXT_ATTRSET_V(VAR) \ +static bool FLEXT_SET_PRE(VAR)(flext_base *c,AtomList *&arg) \ +{ FLEXT_CAST<thisType *>(c)->VAR = *arg; return true; } + +//! @} FLEXT_DA_ATTRSET + +/*! \defgroup FLEXT_DA_ATTRGET Definition of implicit attribute get handlers + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare an implicit get function for a float attribute +#define FLEXT_ATTRGET_F(VAR) \ +\ +FLEXT_ATTRGET_(VAR,float) + +//! Declare an implicit get function for an integer attribute +#define FLEXT_ATTRGET_I(VAR) \ +\ +FLEXT_ATTRGET_(VAR,int) + +//! Declare an implicit get function for a symbol attribute +#define FLEXT_ATTRGET_S(VAR) \ +\ +FLEXT_ATTRGET_(VAR,const t_symbol *) + +//! Declare an implicit get function for a boolean attribute +#define FLEXT_ATTRGET_B(VAR) \ +\ +FLEXT_ATTRGET_(VAR,bool) +/* +static bool FLEXT_GET_PRE(VAR)(flext_base *c,int &arg) \ +{ arg = FLEXT_CAST<thisType *>(c)->VAR?1:0; return true; } +*/ + +//! Declare an implicit get function for an enum attribute +#define FLEXT_ATTRGET_E(VAR,TP) \ +\ +FLEXT_ATTRGET_(VAR,TP) + +//! Declare an implicit get function for a variable list attribute +#define FLEXT_ATTRGET_V(VAR) \ +static bool FLEXT_GET_PRE(VAR)(flext_base *c,AtomList *&arg) \ +{ *arg = FLEXT_CAST<thisType *>(c)->VAR; return true; } + +//! @} FLEXT_DA_ATTRGET + + +/*! \defgroup FLEXT_DA_ATTRVAR Definition of implicit attribute transfer handlers (both get and set) + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare both implicit get and set functions for a float attribute +#define FLEXT_ATTRVAR_F(VAR) \ +\ +FLEXT_ATTRGET_F(VAR) FLEXT_ATTRSET_F(VAR) + +//! Declare both implicit get and set functions for an integer attribute +#define FLEXT_ATTRVAR_I(VAR) \ +\ +FLEXT_ATTRGET_I(VAR) FLEXT_ATTRSET_I(VAR) + +//! Declare both implicit get and set functions for a symbol attribute +#define FLEXT_ATTRVAR_S(VAR) \ +\ +FLEXT_ATTRGET_S(VAR) FLEXT_ATTRSET_S(VAR) + +//! Declare both implicit get and set functions for a boolean attribute +#define FLEXT_ATTRVAR_B(VAR) \ +\ +FLEXT_ATTRGET_B(VAR) FLEXT_ATTRSET_B(VAR) + +//! Declare both implicit get and set functions for an enum attribute +#define FLEXT_ATTRVAR_E(VAR,TP) \ +\ +FLEXT_ATTRGET_(VAR,TP) FLEXT_ATTRSET_(VAR,TP) + +//! Declare both implicit get and set functions for a variable list attribute +#define FLEXT_ATTRVAR_V(VAR) \ +\ +FLEXT_ATTRGET_V(VAR) FLEXT_ATTRSET_V(VAR) + + +//! @} FLEXT_DA_ATTRVAR + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_hdr.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_hdr.h new file mode 100755 index 0000000000000000000000000000000000000000..78bd8e659a686fb4dc0588325fd30de71855054b --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_hdr.h @@ -0,0 +1,59 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_hdr.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_HEADER_H +#define __FLEXT_DEFS_HEADER_H + + +/*! \defgroup FLEXT_D_HEADER Flext class header + \note One (and only one!) of these definitions is compulsory for the class declaration. + \note It has to be placed somewhere in the class definition (not necessarily in a public section). + + @{ +*/ + +/*! \brief Plain flext class header + \param NEW_CLASS name of the current C++ class + \param PARENT_CLASS name of the base C++ class (e.g. flext_base or flext_dsp) +*/ +#define FLEXT_HEADER(NEW_CLASS,PARENT_CLASS) \ +\ +FLEXT_REALHDR(NEW_CLASS, PARENT_CLASS) + +#define FLEXT_HEADER_T(NEW_CLASS,PARENT_CLASS) \ +\ +FLEXT_REALHDR_T(NEW_CLASS, PARENT_CLASS) + +/*! \brief Flext class header with setup function + \param NEW_CLASS name of the current C++ class + \param PARENT_CLASS name of the base C++ class (e.g. flext_base or flext_dsp) + \param SETUPFUN setup function, of type "void (*setupfn)(t_class *)" + + The setup function is called after class creation. It corresponds to the + original PD "[object]_setup" function, apart from the + fact that all necessary class initializations have already been taken care of by flext. + The setup function can e.g. be used for a message to the console upon first creation of an object. +*/ +#define FLEXT_HEADER_S(NEW_CLASS, PARENT_CLASS, SETUPFUN)\ +\ +FLEXT_REALHDR_S(NEW_CLASS, PARENT_CLASS, SETUPFUN) + +#define FLEXT_HEADER_TS(NEW_CLASS, PARENT_CLASS, SETUPFUN)\ +\ +FLEXT_REALHDR_TS(NEW_CLASS, PARENT_CLASS, SETUPFUN) + + +//! @} FLEXT_D_HEADER + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methadd.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methadd.h new file mode 100755 index 0000000000000000000000000000000000000000..0dff4dfb02ddc981a2adcf04c4f0a13d8a181177 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methadd.h @@ -0,0 +1,231 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_methadd.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHADD_H +#define __FLEXT_DEFS_METHADD_H + + +/*! \defgroup FLEXT_D_CADDMETHOD Add flext methods within class scope + \ingroup FLEXT_D_METHOD + \note These can only be used at class construction time + @{ +*/ + +/*! Add a method handler for bang + \note This is for compatibility - better use the method below +*/ +#define FLEXT_CADDBANG(CL,IX,M_FUN) \ +\ +AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN)) + +//! Add a handler for a method with either no, list or anything arguments +#define FLEXT_CADDMETHOD(CL,IX,M_FUN) \ +\ +AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN)) + +//! Add a a handler for a method with implicit arguments +#define FLEXT_CADDMETHOD_(CL,IX,M_TAG,M_FUN) \ +\ +AddMethod(CL,IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN)) + +//! Add a handler for a method with 1 enum type argument +#define FLEXT_CADDMETHOD_E(CL,IX,M_TAG,M_FUN) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null) + +//! Add a handler for a method with 1 argument +#define FLEXT_CADDMETHOD_1(CL,IX,M_TAG,M_FUN,TP1) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null) + +//! Add a handler for a method with 2 arguments +#define FLEXT_CADDMETHOD_2(CL,IX,M_TAG,M_FUN,TP1,TP2) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null) + +//! Add a handler for a method with 3 arguments +#define FLEXT_CADDMETHOD_3(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null) + +//! Add a handler for a method with 4 arguments +#define FLEXT_CADDMETHOD_4(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null) + +//! Add a handler for a method with 5 arguments +#define FLEXT_CADDMETHOD_5(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null) + + +// Shortcuts + +//! Add a handler for a method with a boolean argument +#define FLEXT_CADDMETHOD_B(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,bool) + +//! Add a handler for a method with 1 float argument +#define FLEXT_CADDMETHOD_F(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float) + +//! Add a handler for a method with 2 float arguments +#define FLEXT_CADDMETHOD_FF(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_2(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float,float) + +//! Add a handler for a method with 3 float arguments +#define FLEXT_CADDMETHOD_FFF(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_3(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float,float,float) + +//! Add a handler for a method with 1 integer argument +#define FLEXT_CADDMETHOD_I(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int) + +//! Add a handler for a method with 2 integer arguments +#define FLEXT_CADDMETHOD_II(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_2(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int,int) + +//! Add a handler for a method with 3 integer arguments +#define FLEXT_CADDMETHOD_III(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_3(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int,int,int) + +//! @} FLEXT_D_CADDMETHOD + + +/*! \defgroup FLEXT_D_ADDMETHOD Add flext methods + \ingroup FLEXT_D_METHOD + \note These can only be used at object construction time + \note (in constructor or in Init() function before call to parent's Init()) + @{ +*/ + +//! Set timer callback +#define FLEXT_ADDTIMER(TMR,M_FUN) \ +\ +TMR.SetCallback(*this,FLEXT_CALL_PRE(M_FUN)) + +//! Enable list element distribution over inlets (if no better handler found) +#define FLEXT_ADDDIST() \ +\ +SetDist(true) + +//! Add a method handler for bang +#define FLEXT_ADDBANG(IX,M_FUN) \ +\ +AddMethod(IX,"bang",FLEXT_CALL_PRE(M_FUN)) + +//! Add a handler for a method with either no, list or anything arguments +#define FLEXT_ADDMETHOD(IX,M_FUN) \ +\ +AddMethod(IX,FLEXT_CALL_PRE(M_FUN)) + +/*! \brief Add a handler for a method with a (variable argument) list + \deprecated This definition obscures that _ indicates the usage of a message tag - use FLEXT_ADDMETHOD instead + \note This is already covered by FLEXT_ADDMETHOD, but here for the sake of clarity +*/ +#define FLEXT_ADDMETHOD_V(IX,M_FUN) \ +\ +AddMethod(IX,FLEXT_CALL_PRE(M_FUN)) + +/*! \brief Add a handler for a method with an anything argument + \deprecated This definition obscures that _ indicates the usage of a message tag - use FLEXT_ADDMETHOD instead + \note This is already covered by FLEXT_ADDMETHOD, but here for the sake of clarity +*/ +#define FLEXT_ADDMETHOD_A(IX,M_FUN) \ +\ +AddMethod(IX,FLEXT_CALL_PRE(M_FUN)) + +//! Add a a handler for a tagged method with implicit arguments +#define FLEXT_ADDMETHOD_(IX,M_TAG,M_FUN) \ +\ +AddMethod(IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN)) + +//! Add a handler for a method with 1 enum type argument +#define FLEXT_ADDMETHOD_E(IX,M_TAG,M_FUN) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null) + +//! Add a handler for a method with 1 argument +#define FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,TP1) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null) + +//! Add a handler for a method with 2 arguments +#define FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,TP1,TP2) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null) + +//! Add a handler for a method with 3 arguments +#define FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,TP1,TP2,TP3) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null) + +//! Add a handler for a method with 4 arguments +#define FLEXT_ADDMETHOD_4(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null) + +//! Add a handler for a method with 5 arguments +#define FLEXT_ADDMETHOD_5(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null) + + +// Shortcuts + +//! Add a handler for a method with a boolean argument +#define FLEXT_ADDMETHOD_B(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,bool) + +//! Add a handler for a method with 1 float argument +#define FLEXT_ADDMETHOD_F(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,float) + +//! Add a handler for a method with 2 float arguments +#define FLEXT_ADDMETHOD_FF(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_2(IX,flext::MakeSymbol(M_TAG),M_FUN,float,float) + +//! Add a handler for a method with 3 float arguments +#define FLEXT_ADDMETHOD_FFF(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_3(IX,flext::MakeSymbol(M_TAG),M_FUN,float,float,float) + +//! Add a handler for a method with 1 integer argument +#define FLEXT_ADDMETHOD_I(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,int) + +//! Add a handler for a method with 2 integer arguments +#define FLEXT_ADDMETHOD_II(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_2(IX,flext::MakeSymbol(M_TAG),M_FUN,int,int) + +//! Add a handler for a method with 3 integer arguments +#define FLEXT_ADDMETHOD_III(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_3(IX,flext::MakeSymbol(M_TAG),M_FUN,int,int,int) + + +//! @} FLEXT_D_ADDMETHOD + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methbind.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methbind.h new file mode 100755 index 0000000000000000000000000000000000000000..8f8d48363b36b98b019633da6b6e8be24b7b8428 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methbind.h @@ -0,0 +1,46 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_methbind.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHBIND_H +#define __FLEXT_DEFS_METHBIND_H + + +/*! \defgroup FLEXT_D_BINDMETHOD Bind flext methods to symbols + @{ +*/ + +/*! \brief Bind a handler for a method with an anything argument to a symbol +*/ +#define FLEXT_BINDMETHOD(SYM,M_FUN,DATA) \ +\ +BindMethod(SYM,FLEXT_CALL_PRE(M_FUN),DATA) + +/*! \brief Unbind any handler for a method from a symbol + \note Memory associated to the DATA parameter of FLEXT_BINDMETHOD will *not* be freed here. +*/ +#define FLEXT_UNBINDMETHOD(SYM) \ +\ +UnbindMethod(SYM) + +/*! \brief Unbind any handler for a method from a symbol and return user data pointer by DATA + \note Memory associated to the DATA parameter of FLEXT_BINDMETHOD will *not* be freed here. +*/ +#define FLEXT_UNBINDMETHOD_X(SYM,DATA) \ +\ +UnbindMethod(SYM,&DATA) + + +//! @} FLEXT_D_BINDMETHOD + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methcall.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methcall.h new file mode 100755 index 0000000000000000000000000000000000000000..2f24fb9d35c653f61161b69d7ee36f2b621582a1 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methcall.h @@ -0,0 +1,76 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_methbind.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHCALL_H +#define __FLEXT_DEFS_METHCALL_H + + +/*! \defgroup FLEXT_D_CALLMETHOD Call flext methods manually + \ingroup FLEXT_D_METHOD + @{ +*/ + +//! Call a (already defined) method with no arguments +#define FLEXT_CALLMETHOD(M_FUN) \ +\ +FLEXT_CALL_PRE(M_FUN)(this) + +//! Call a (already defined) method with variable list arguments +#define FLEXT_CALLMETHOD_V(M_FUN,ARGC,ARGV) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARGC,(t_atom *)(ARGV)) + +//! Call a (already defined) method with anything arguments +#define FLEXT_CALLMETHOD_A(M_FUN,HDR,ARGC,ARGV) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,(t_symbol *)(HDR),ARGC,(t_atom *)(ARGV)) + +//! Call a (already defined) method with a data package (void *) +#define FLEXT_CALLMETHOD_X(M_FUN,DATA) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,DATA) + +//! Call a (already defined) method with 1 enum type argument +#define FLEXT_CALLMETHOD_E(M_FUN,ARG) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG) + +//! Call a (already defined) method with 1 argument +#define FLEXT_CALLMETHOD_1(M_FUN,ARG) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG) + +//! Call a (already defined) method with 2 arguments +#define FLEXT_CALLMETHOD_2(M_FUN,ARG1,ARG2) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2) + +//! Call a (already defined) method with 3 arguments +#define FLEXT_CALLMETHOD_3(M_FUN,ARG1,ARG2,ARG3) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3) + +//! Call a (already defined) method with 4 arguments +#define FLEXT_CALLMETHOD_4(M_FUN,ARG1,ARG2,ARG3,ARG4) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3,ARG4) + +//! Call a (already defined) method with 5 arguments +#define FLEXT_CALLMETHOD_5(M_FUN,ARG1,ARG2,ARG3,ARG4,ARG5) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3,ARG4,ARG5) + +//! @} FLEXT_D_CALLMETHOD + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methcb.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methcb.h new file mode 100755 index 0000000000000000000000000000000000000000..79aa7c1a5819b5418d32a8fc1cc5b5fb8028e39e --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_methcb.h @@ -0,0 +1,127 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_methcb.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHCB_H +#define __FLEXT_DEFS_METHCB_H + + +/*! \defgroup FLEXT_D_CALLBACK Declare callbacks for class methods + \ingroup FLEXT_D_METHOD + @{ +*/ + +//! Set up a method callback with no arguments +#define FLEXT_CALLBACK(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(); return true; } + +//! Set up a method callback for an anything argument +#define FLEXT_CALLBACK_A(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(s,argc,argv); return true; } + +//! Set up a method callback for a variable argument list +#define FLEXT_CALLBACK_V(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int argc,t_atom *argv) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(argc,argv); return true; } + +//! Set up a method callback for a data package (void *) argument +#define FLEXT_CALLBACK_X(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,void *data) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(data); return true; } + +//! Set up a method callback for an anything argument and a data package (e.g. for symbol-bound methods). +#define FLEXT_CALLBACK_AX(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv,void *data) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(s,argc,argv,data); return true; } + +//! Set up a timer callback +#define FLEXT_CALLBACK_T(M_FUN) \ +\ +FLEXT_CALLBACK_X(M_FUN) + +//! Set up a method callback for a boolean argument +#define FLEXT_CALLBACK_B(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int &arg1) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1 != 0); return true; } + +//! Set up a method callback for 1 argument +#define FLEXT_CALLBACK_1(M_FUN,TP1) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1); return true; } + +//! Set up a method callback for 2 arguments +#define FLEXT_CALLBACK_2(M_FUN,TP1,TP2) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2); return true; } + +//! Set up a method callback for 3 arguments +#define FLEXT_CALLBACK_3(M_FUN,TP1,TP2,TP3) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3); return true; } + +//! Set up a method callback for 4 arguments +#define FLEXT_CALLBACK_4(M_FUN,TP1,TP2,TP3,TP4) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3,arg4); return true; } + +//! Set up a method callback for 5 arguments +#define FLEXT_CALLBACK_5(M_FUN,TP1,TP2,TP3,TP4,TP5) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,TP5 &arg5) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3,arg4,arg5); return true; } + + +// Shortcuts + +//! Set up a method callback for 1 float argument +#define FLEXT_CALLBACK_F(M_FUN) \ +\ +FLEXT_CALLBACK_1(M_FUN,float) + +//! Set up a method callback for 2 float arguments +#define FLEXT_CALLBACK_FF(M_FUN) \ +\ +FLEXT_CALLBACK_2(M_FUN,float,float) + +//! Set up a method callback for 3 float arguments +#define FLEXT_CALLBACK_FFF(M_FUN) \ +\ +FLEXT_CALLBACK_3(M_FUN,float,float,float) + +//! Set up a method callback for 1 integer argument +#define FLEXT_CALLBACK_I(M_FUN) \ +\ +FLEXT_CALLBACK_1(M_FUN,int) + +//! Set up a method callback for 2 integer arguments +#define FLEXT_CALLBACK_II(M_FUN) \ +\ +FLEXT_CALLBACK_2(M_FUN,int,int) + +//! Set up a method callback for 3 integer arguments +#define FLEXT_CALLBACK_III(M_FUN) \ +\ +FLEXT_CALLBACK_3(M_FUN,int,int,int) + +//! Set up a method callback for 1 symbol argument +#define FLEXT_CALLBACK_S(M_FUN) \ +\ +FLEXT_CALLBACK_1(M_FUN,t_symptr) + + +//! \deprecated +#define FLEXT_CALLBACK_G FLEXT_CALLBACK_V + +//! @} FLEXT_D_CALLBACK + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_meththr.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_meththr.h new file mode 100755 index 0000000000000000000000000000000000000000..4d6a607679b97ee218c2aeea242a2090630366c4 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_meththr.h @@ -0,0 +1,271 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_meththr.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHTHR_H +#define __FLEXT_DEFS_METHTHR_H + + +#ifdef FLEXT_THREADS + + +/*! \defgroup FLEXT_D_THREAD Declare threaded method callbacks + @{ +*/ + +//! Set up a threaded method callback with no arguments +#define FLEXT_THREAD(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c) { \ + thr_params *p = new thr_params; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + delete p; \ + if(ok) { \ + th->M_FUN(); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for an anything argument +#define FLEXT_THREAD_A(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv) { \ + thr_params *p = new thr_params; p->set_any(s,argc,argv); \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + AtomAnything *args = p->var[0]._any; \ + delete p; \ + if(ok) { \ + th->M_FUN(args->Header(),args->Count(),args->Atoms()); \ + th->PopThread(); \ + } \ + delete args; \ +} + +//! Set up a threaded method callback for a variable argument list +#define FLEXT_THREAD_V(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int argc,t_atom *argv) { \ + thr_params *p = new thr_params; p->set_list(argc,argv); \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + AtomList *args = p->var[0]._list; \ + delete p; \ + if(ok) { \ + th->M_FUN(args->Count(),args->Atoms()); \ + th->PopThread(); \ + } \ + delete args; \ +} + +/*! \brief Set up a threaded method callback for an arbitrary data struct. + \note Data is pure... no destructor is called upon delete +*/ +#define FLEXT_THREAD_X(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,void *data) { \ + thr_params *p = new thr_params; p->var[0]._ext = data; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + void *data = p->var[0]._ext; \ + delete p; \ + if(ok) { \ + th->M_FUN(data); \ + th->PopThread(); \ + } \ + /* delete (char *)data; */ \ +} + +//! Set up a threaded method callback for a boolean argument +#define FLEXT_THREAD_B(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int &arg1) { \ + thr_params *p = new thr_params; p->var[0]._bool = arg1 != 0; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + bool b = p->var[0]._bool; \ + delete p; \ + if(ok) { \ + th->M_FUN(b); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 1 argument +#define FLEXT_THREAD_1(M_FUN,TP1) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1) { \ + thr_params *p = new thr_params(1); \ + p->var[0]._ ## TP1 = arg1; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 2 arguments +#define FLEXT_THREAD_2(M_FUN,TP1,TP2) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2) { \ + thr_params *p = new thr_params(2); \ + p->var[0]._ ## TP1 = arg1; \ + p->var[1]._ ## TP2 = arg2; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + const TP1 v2 = p->var[1]._ ## TP2; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1,v2); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 3 arguments +#define FLEXT_THREAD_3(M_FUN,TP1,TP2,TP3) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3) { \ + thr_params *p = new thr_params(3); \ + p->var[0]._ ## TP1 = arg1; \ + p->var[1]._ ## TP2 = arg2; \ + p->var[2]._ ## TP3 = arg3; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + const TP2 v2 = p->var[1]._ ## TP2; \ + const TP3 v3 = p->var[2]._ ## TP3; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1,v2,v3); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 4 arguments +#define FLEXT_THREAD_4(M_FUN,TP1,TP2,TP3,TP4) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4) { \ + thr_params *p = new thr_params(4); \ + p->var[0]._ ## TP1 = arg1; \ + p->var[1]._ ## TP2 = arg2; \ + p->var[2]._ ## TP3 = arg3; \ + p->var[3]._ ## TP4 = arg4; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + const TP2 v2 = p->var[1]._ ## TP2; \ + const TP3 v3 = p->var[2]._ ## TP3; \ + const TP4 v4 = p->var[3]._ ## TP4; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1,v2,v3,v4); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 5 arguments +#define FLEXT_THREAD_5(M_FUN,TP1,TP2,TP3,TP4,TP5) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,TP5 &arg5) { \ + thr_params *p = new thr_params(5); \ + p->var[0]._ ## TP1 = arg1; \ + p->var[1]._ ## TP2 = arg2; \ + p->var[2]._ ## TP3 = arg3; \ + p->var[3]._ ## TP4 = arg4; \ + p->var[4]._ ## TP5 = arg5; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + const TP2 v2 = p->var[1]._ ## TP2; \ + const TP3 v3 = p->var[2]._ ## TP3; \ + const TP4 v4 = p->var[3]._ ## TP4; \ + const TP5 v5 = p->var[4]._ ## TP5; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1,v2,v3,v4,v5); \ + th->PopThread(); \ + } \ +} + + +//! Shortcuts + +//! Set up a threaded method callback for 1 float argument +#define FLEXT_THREAD_F(M_FUN) \ +\ +FLEXT_THREAD_1(M_FUN,float) + +//! Set up a threaded method callback for 2 float arguments +#define FLEXT_THREAD_FF(M_FUN) \ +\ +FLEXT_THREAD_2(M_FUN,float,float) + +//! Set up a threaded method callback for 3 float arguments +#define FLEXT_THREAD_FFF(M_FUN) \ +\ +FLEXT_THREAD_3(M_FUN,float,float,float) + +//! Set up a threaded method callback for 1 integer argument +#define FLEXT_THREAD_I(M_FUN) \ +\ +FLEXT_THREAD_1(M_FUN,int) + +//! Set up a threaded method callback for 2 integer arguments +#define FLEXT_THREAD_II(M_FUN) \ +\ +FLEXT_THREAD_2(M_FUN,int,int) + +//! Set up a threaded method callback for 3 integer arguments +#define FLEXT_THREAD_III(M_FUN) \ +\ +FLEXT_THREAD_3(M_FUN,int,int,int) + +//! Set up a threaded method callback for 1 symbol argument +#define FLEXT_THREAD_S(M_FUN) \ +\ +FLEXT_THREAD_1(M_FUN,t_symptr) + +// deprecated +#define FLEXT_THREAD_G FLEXT_THREAD_V + +//! @} FLEXT_D_THREAD + + +#endif // FLEXT_THREADS + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldefs_setup.h b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_setup.h new file mode 100755 index 0000000000000000000000000000000000000000..45cc6ac7d8f127e0cd3812de345a78aefdb08426 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldefs_setup.h @@ -0,0 +1,335 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_setup.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_SETUP_H +#define __FLEXT_DEFS_SETUP_H + +// ==================================================================================== + +/*! \defgroup FLEXT_D_INSTANCE Class instantiation + \note For stand-alone externals (not part of a library) the name of your class + \note is of importance! It must be the same as the external (excluded an eventual ~ (tilde)) + + There are additional parameters that can be included in the NAME field of FLEXT_NEW etc.: + + - There may be additional names (aliases) appened, separated by spaces + - There may be a help path prepended, separated by a colon + - This help path doesn't work for Max/MSP. There you'll have to use a object mapping file (Max/MSP version >= 4.2) + + @{ +*/ + + +/*! \defgroup FLEXT_D_NEW Stand-alone class instantiation + Makes an actual instance of a stand-alone class. +*/ + +/*! \defgroup FLEXT_D_NEW_DSP Dsp class instantiation + Makes an actual instance of a dsp (aka "tilde") class (with signal processing). +*/ + +/*! \defgroup FLEXT_D_LIB Library class instantiation + Makes an actual instance of a class which is part of an object library (and not stand-alone). +*/ + +/*! \defgroup FLEXT_D_LIB_DSP Dsp library class instantiation + Makes an actual instance of a dsp (aka "tilde") class with signal processing + which is part of an object library (and not stand-alone). +*/ + +// NO ARGUMENTS +// ---------------------------------------- + +/*! \brief Implementation of a flext class with no arguments + \ingroup FLEXT_D_NEW + \param NAME the object's actual name(s) as a string (like "*", "trigger", "noise~", etc.) + \param NEW_CLASS the object's C++ class name +*/ +#define FLEXT_NEW(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,0,0,0) + +/*! \brief Implementation of a flext dsp class with no arguments + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,1,0,0) + +/*! \brief Implementation of a flext dsp class with no arguments and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,1,1,0) + +/*! \brief Implementation of a flext class (part of a library) with no arguments + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,0,0,1) + +/*! \brief Implementation of a flext dsp class (part of a library) with no arguments + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,1,0,1) + +/*! \brief Implementation of a flext dsp class (part of a library) with no arguments and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,1,1,1) + + +// VARIABLE ARGUMENT LIST +// ---------------------------------------- + +/*! \brief Implementation of a flext class with a variable argument list + \ingroup FLEXT_D_NEW +*/ +#define FLEXT_NEW_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS,0,0,0) + +/*! \brief Implementation of a flext dsp class with a variable argument list + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS,1,0,0) + +/*! \brief Implementation of a flext dsp class with a variable argument list and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS,1,1,0) + +/*! \brief Implementation of a flext class (part of a library) with a variable argument list + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS, 0,0,1) + +/*! \brief Implementation of a flext dsp class (part of a library) with a variable argument list + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS, 1,0,1) + +/*! \brief Implementation of a flext dsp class (part of a library) with a variable argument list and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS, 1,1,1) + + +// ONE ARGUMENT +// ---------------------------------------- + +/*! \brief Implementation of a flext class with one argument + \ingroup FLEXT_D_NEW +*/ +#define FLEXT_NEW_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 0,0,0, TYPE) + +/*! \brief Implementation of a flext dsp class with one argument + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 1,0,0, TYPE) + +/*! \brief Implementation of a flext dsp class with one argument and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 1,1,0, TYPE) + +/*! \brief Implementation of a flext class (part of a library) with one argument + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 0,0,1, TYPE) + +/*! \brief Implementation of a flext dsp class (part of a library) with one argument + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 1,0,1, TYPE) + +/*! \brief Implementation of a flext dsp class (part of a library) with one argument and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 1,1,1, TYPE) + + +// TWO ARGUMENTS +// ---------------------------------------- + +/*! \brief Implementation of a flext class with 2 arguments + \ingroup FLEXT_D_NEW +*/ +#define FLEXT_NEW_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 0,0,0, TYPE1, TYPE2) + +/*! \brief Implementation of a flext dsp class with 2 arguments + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 1,0,0, TYPE1, TYPE2) + +/*! \brief Implementation of a flext dsp class with 2 arguments and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 1,1,0, TYPE1, TYPE2) + +/*! \brief Implementation of a flext class (part of a library) with 2 arguments + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 0,0,1, TYPE1, TYPE2) + +/*! \brief Implementation of a flext dsp class (part of a library) with 2 arguments + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 1,0,1, TYPE1, TYPE2) + +/*! \brief Implementation of a flext dsp class (part of a library) with 2 arguments and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 1,1,1, TYPE1, TYPE2) + + +// THREE ARGUMENTS +// ---------------------------------------- + +/*! \brief Implementation of a flext class with 3 arguments + \ingroup FLEXT_D_NEW +*/ +#define FLEXT_NEW_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 0,0,0, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext dsp class with 3 arguments + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 1,0,0, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext dsp class with 3 arguments and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 1,1,0, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext class (part of a library) with 3 arguments + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 0,0,1, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext dsp class (part of a library) with 3 arguments + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 1,0,1, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext dsp class (part of a library) with 3 arguments and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 1,1,1, TYPE1, TYPE2, TYPE3) + + +// deprecated stuff + +/*! \defgroup FLEXT_D_DEPRECATED Deprecated definitions + \deprecated + @{ +*/ + +#define FLEXT_NEW_G FLEXT_NEW_V + +#define FLEXT_NEW_TILDE FLEXT_NEW_DSP +#define FLEXT_NEW_TILDE_G FLEXT_NEW_DSP_V +#define FLEXT_NEW_TILDE_1 FLEXT_NEW_DSP_1 +#define FLEXT_NEW_TILDE_2 FLEXT_NEW_DSP_2 +#define FLEXT_NEW_TILDE_3 FLEXT_NEW_DSP_3 + +#define FLEXT_LIB_G FLEXT_LIB_V + +#define FLEXT_LIB_TILDE FLEXT_LIB_DSP +#define FLEXT_LIB_TILDE_G FLEXT_LIB_DSP_V +#define FLEXT_LIB_TILDE_1 FLEXT_LIB_DSP_1 +#define FLEXT_LIB_TILDE_2 FLEXT_LIB_DSP_2 +#define FLEXT_LIB_TILDE_3 FLEXT_LIB_DSP_3 + +#define FLEXT_TILDE_SETUP FLEXT_DSP_SETUP + +//! @} FLEXT_D_DEPRECATED + + +/*! \defgroup FLEXT_D_LIBRARY Definitions for library objects + @{ +*/ + +/*! \brief Specify that to declare the library itself. + \note If you have a library this is compulsory (to register all the objects of the library) +*/ +#define FLEXT_LIB_SETUP(NAME,SETUPFUN) REAL_LIB_SETUP(NAME,SETUPFUN) + +/*! \brief Register an object in the library. + \note This is used in the library setup function +*/ +#define FLEXT_SETUP(cl) REAL_SETUP(cl,0) + +/*! \brief Register a DSP object in the library. + \note This is used in the library setup function +*/ +#define FLEXT_DSP_SETUP(cl) REAL_SETUP(cl,1) + +//! @} FLEXT_D_LIBRARY + + +//! @} FLEXT_D_INSTANCE + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldsp.cpp b/externals/grill/trunk/flext/libbuild/include/flext/fldsp.cpp new file mode 100755 index 0000000000000000000000000000000000000000..7fecfe83707ce91fc348a95655dbf37036b2b4b8 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldsp.cpp @@ -0,0 +1,132 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldsp.cpp + \brief Implementation of the flext dsp base class. +*/ + +#ifndef __FLEXT_DSP_CPP +#define __FLEXT_DSP_CPP + +#include "flext.h" +#include "flinternal.h" +#include <cstring> + +#include "flpushns.h" + +// === flext_dsp ============================================== + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::Setup(t_classid id) +{ +#if FLEXT_SYS == FLEXT_SYS_PD +// add_method1(c,cb_enable,"enable",A_FLOAT); + AddMethod(id,0,MakeSymbol("enable"),&cb_enable); +#endif +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_dsp))::FLEXT_CLASSDEF(flext_dsp)() + : srate(sys_getsr()),blksz(sys_getblksize()) + , vecs(NULL) +#if FLEXT_SYS != FLEXT_SYS_MAX + , dspon(true) +#endif +{} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::Exit() +{ + flext_base::Exit(); + + if(vecs) delete[] vecs; +} + + +FLEXT_TEMPIMPL(t_int *FLEXT_CLASSDEF(flext_dsp))::dspmeth(t_int *w) +{ + flext_dsp *obj = (flext_dsp *)(size_t)w[1]; + +#if FLEXT_SYS == FLEXT_SYS_MAX + if(!obj->thisHdr()->z_disabled) +#else + if(LIKELY(obj->dspon)) +#endif + { + flext_base::indsp = true; + obj->CbSignal(); + flext_base::indsp = false; + } + return w+2; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::SetupDsp(t_signal **sp) +{ + int i; + int in = CntInSig(); + int out = CntOutSig(); +#if FLEXT_SYS == FLEXT_SYS_PD + // min. 1 input channel! (CLASS_MAININLET in pd...) + if(!in) in = 1; +#endif + + // store current dsp parameters + srate = sys_getsr(); // \TODO need not be stored in each object.... + // overlap = sp[0]->s_sr/srate; // currently not used/exposed + blksz = sp[0]->s_n; // is this guaranteed to be the same as sys_getblksize() ? + + // store in and out signal vectors + + if((in+out) && !vecs) + vecs = new t_signalvec[in+out]; + + for(i = 0; i < in; ++i) + vecs[i] = sp[i]->s_vec; + for(i = 0; i < out; ++i) + vecs[in+i] = sp[in+i]->s_vec; + + // with the following call derived classes can do their eventual DSP setup + if(CbDsp()) { + // set the DSP function + dsp_add((t_dspmethod)dspmeth,1,this); + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::m_dsp(int /*n*/,t_signalvec const * /*insigs*/,t_signalvec const * /*outsigs*/) {} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_dsp))::CbDsp() +{ + // invoke legacy method + m_dsp(Blocksize(),InSig(),OutSig()); + return true; +} + +// this function will be overridden anyway - the probably useless default is clearing all outputs +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::m_signal(int n,t_sample *const * /*insigs*/,t_sample *const *outs) +{ + for(int i = 0; i < CntOutSig(); ++i) ZeroSamples(outs[i],n); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::CbSignal() +{ + // invoke legacy method + m_signal(Blocksize(),InSig(),OutSig()); +} + + +#if FLEXT_SYS == FLEXT_SYS_PD +//void flext_dsp::cb_enable(flext_hdr *c,t_float on) { thisObject(c)->dspon = on != 0; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_dsp))::cb_enable(flext_base *b,float &on) +{ + static_cast<flext_dsp *>(b)->dspon = on != 0; + return true; +} +#endif + +#include "flpopns.h" + +#endif // __FLEXT_DSP_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fldsp.h b/externals/grill/trunk/flext/libbuild/include/flext/fldsp.h new file mode 100755 index 0000000000000000000000000000000000000000..12fa826a931d52e57c01d145ffd913ab2e56ea3f --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fldsp.h @@ -0,0 +1,186 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldsp.h + \brief Declares the flext dsp class + +*/ + +#ifndef __FLDSP_H +#define __FLDSP_H + +// include the header file declaring the base classes +#include "flext.h" + +#include "flpushns.h" + +// === flext_dsp ================================================== + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_dsp); +typedef FLEXT_SHARE FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_dsp)) flext_dsp; + + +/*! \brief Flext dsp enabled base object +*/ +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext_dsp): + public flext_base +{ + FLEXT_HEADER_S(FLEXT_CLASSDEF(flext_dsp),flext_base,Setup) + + friend class FLEXT_SHARE FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)); + +public: + +/*! \defgroup FLEXT_DSP Flext dsp class + + @{ +*/ + +/*! \defgroup FLEXT_C_DSP Basic dsp functionality + + @{ +*/ + + //! returns current sample rate + float Samplerate() const { return srate; } + + //! returns current block (aka vector) size + int Blocksize() const { return blksz; } + + //! returns array of input vectors (CntInSig() vectors) + t_sample *const *InSig() const { return vecs; } + + //! returns input vector + t_sample *InSig(int i) const { return InSig()[i]; } + + //! returns array of output vectors (CntOutSig() vectors) + // \todo cache that returned pointer + t_sample *const *OutSig() const + { + int i = CntInSig(); + // 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 + t_sample *OutSig(int i) const { return OutSig()[i]; } + + //! typedef describing a signal vector + typedef t_sample *t_signalvec; + +//! @} + +// --- inheritable virtual methods -------------------------------- + +/*! \defgroup FLEXT_C_DSP_VIRTUAL Flext virtual dsp functions + + @{ +*/ + /*! \brief Called on every dsp init. + \note Don't expect any valid data in the signal vectors! + flext_dsp::CbDsp should not be called by the derived class + + \return true (default)... use DSP, false, don't use DSP + */ + virtual bool CbDsp(); + + /*! \brief Called with every signal vector - here you do the dsp calculation + flext_dsp::CbSignal fills all output vectors with silence + */ + virtual void CbSignal(); + + + /*! \brief Deprecated method for CbSignal + \deprecated + \param n: frames (aka samples) in one signal vector + \param insigs: array of input vectors (get number with function CntInSig()) + \param outsigs: array of output vectors (get number with function CntOutSig()) + */ + virtual void m_dsp(int n,t_signalvec const *insigs,t_signalvec const *outsigs); + + /*! \brief Deprecated method for CbSignal + \deprecated + \param n: frames (aka samples) in one signal vector + \param insigs: array of input vectors (get number with function CntInSig()) + \param outsigs: array of output vectors (get number with function CntOutSig()) + */ + virtual void m_signal(int n,t_sample *const *insigs,t_sample *const *outsigs); + +//! @} + + +/*! \defgroup FLEXT_C_DSP_INOUT Flext dsp in-/outlet functions + \note These must be called in the class' constructor + + @{ +*/ +// --- inlet/outlet stuff ----------------------------------------- + + /*! \brief Add signal inlet(s) + \param m Number of inlets to add + */ + void AddInSignal(int m = 1) { AddInlet(xlet_sig,m); } + + /*! \brief Add signal inlet (with description) + \param desc Description of inlet + */ + void AddInSignal(const char *desc) { AddInlet(xlet_sig,1,desc); } + + /*! \brief Add signal outlet(s) + \param m Number of inlets to add + */ + void AddOutSignal(int m = 1) { AddOutlet(xlet_sig,m); } + + /*! \brief Add signal outlet (with description) + \param desc Description of outlet + */ + void AddOutSignal(const char *desc) { AddOutlet(xlet_sig,1,desc); } + +//! @} + +//! @} + +protected: + + FLEXT_CLASSDEF(flext_dsp)(); + + virtual void Exit(); + +private: + + // not static, could be different in different patchers.. + float srate; + int blksz; + t_signalvec *vecs; + + // setup function + static void Setup(t_classid c); + +#if FLEXT_SYS == FLEXT_SYS_PD + static bool cb_enable(flext_base *c,float &on); + bool dspon; +#endif + + static inline flext_dsp *thisObject(flext_hdr *c) { return FLEXT_CAST<flext_dsp *>(c->data); } + + void SetupDsp(t_signal **sp); + + // dsp stuff + static t_int *dspmeth(t_int *w); +}; + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flext.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flext.cpp new file mode 100755 index 0000000000000000000000000000000000000000..dceac360f3c1d328b6bc99d8a4a7a04722055e4f --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flext.cpp @@ -0,0 +1,281 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flext.cpp + \brief Implementation of the flext base class. +*/ + +#ifndef __FLEXT_CPP +#define __FLEXT_CPP + +#include "flext.h" +#include "flinternal.h" +#include "fldsp.h" +#include <cstring> + +#include "flpushns.h" + +// === flext_base ============================================ + +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext_base))::curtag = NULL; + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::FLEXT_CLASSDEF(flext_base)() + : incnt(0),outcnt(0) + , insigs(0),outsigs(0) +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + ,outlets(NULL),inlets(NULL) +#endif +#if FLEXT_SYS == FLEXT_SYS_MAX + ,indesc(NULL),outdesc(NULL) +#endif +{ + FLEXT_LOG1("%s - flext logging is on",thisName()); + + methhead = NULL; + bindhead = NULL; + + if(HasAttributes()) { + // initialize when attribute processing is enabled + attrhead = new ItemCont; + attrdata = new AttrDataCont; + } + else { + attrhead = NULL; + attrdata = NULL; + } +} + +/*! This virtual function is called after the object has been created, that is, + after the constructor has been processed. + It creates the inlets and outlets and the message and attribute lists. + \note You can override it in your own class, but be sure to call it, + \note otherwise no inlets/outlets will be created + \note All inlet, outlets, method and attribute declarations must be made before a call to Init! + \remark Creation of inlets/outlets can't be done upon declaration, as Max/MSP needs creation + \remark in reverse. +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Init() +{ + bool ok = flext_obj::Init(); + + if(ok) ok = InitInlets() && InitOutlets(); + + if(ok) { +#if FLEXT_SYS == FLEXT_SYS_MAX + // according to the Max/MSP SDK this should be prior to any inlet creation, BUT + // that doesn't seem to be true... multiple signal ins and additional inlets don't seem to work then + if(NeedDSP()) dsp_setup(thisHdr(),CntInSig()); // signal inlets +#endif + + if(HasAttributes() && m_holdaargc && m_holdaargv) { + // initialize creation attributes + ok = InitAttrib(m_holdaargc,m_holdaargv); + } + } + + return ok; +} + + +/*! This virtual function is called before the destructor. + We do this because here we can still call virtual methods. +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::Exit() +{ +#if FLEXT_SYS == FLEXT_SYS_MAX + // according to David Z. one should do that first... + if(NeedDSP()) dsp_free(thisHdr()); +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_NOATTREDIT) + // attribute editor window may still be open -> close it + gfxstub_deleteforkey(thisHdr()); +#endif + +#ifdef FLEXT_THREADS + StopThreads(); +#endif + + // send remaining pending messages for this object + QFlush(this); + + // delete message lists + if(bindhead) delete bindhead; // ATTENTION: the object must free all memory associated to bindings itself + if(methhead) delete methhead; + if(attrhead) delete attrhead; + if(attrdata) delete attrdata; + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + if(outlets) delete[] outlets; + + if(inlets) { + FLEXT_ASSERT(incnt > 1); + for(int ix = 1; ix < incnt; ++ix) + if(inlets[ix-1]) { + // release proxy object +#if FLEXT_SYS == FLEXT_SYS_PD + pd_free(&inlets[ix-1]->obj.ob_pd); +#elif FLEXT_SYS == FLEXT_SYS_MAX + freeobject((object *)inlets[ix-1]); +#endif + } + delete[] inlets; + } +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX + if(indesc) { + for(int i = 0; i < incnt; ++i) if(indesc[i]) delete[] indesc[i]; + delete[] indesc; + } + if(outdesc) { + for(int i = 0; i < outcnt; ++i) if(outdesc[i]) delete[] outdesc[i]; + delete[] outdesc; + } +#endif + + flext_obj::Exit(); +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddMessageMethods(t_class *c,bool dsp,bool dspin) +{ + add_loadbang(c,cb_loadbang); + +#if FLEXT_SYS == FLEXT_SYS_PD + class_addmethod(c,(t_method)cb_click,gensym(const_cast<char *>("click")),A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_NULL); +#elif FLEXT_SYS == FLEXT_SYS_MAX + add_assist(c,cb_assist); + add_dblclick(c,cb_click); +#endif + + SetProxies(c,dsp); + StartQueue(); + + if(dsp) { +#if FLEXT_SYS == FLEXT_SYS_MAX + add_dsp(c,cb_dsp); + dsp_initclass(); +#elif FLEXT_SYS == FLEXT_SYS_PD + if(dspin) + CLASS_MAINSIGNALIN(c,flext_hdr,defsig); // float messages going into the left inlet are converted to signal + add_dsp(c,cb_dsp); +#else +#error Platform not supported! +#endif + } +} + + +/*! Set up proxy classes and basic methods at class creation time + This ensures that they are processed before the registered flext messages +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::Setup(t_classid id) +{ + t_class *c = getClass(id); + +#if FLEXT_SYS == FLEXT_SYS_MAX + if(!IsLib(id)) +#endif + AddMessageMethods(c,IsDSP(id),HasDSPIn(id)); + + if(HasAttributes(id)) { + AddMethod(id,0,"getattributes",cb_ListAttrib); + AddMethod(id,0,"getmethods",cb_ListMethods); + +#if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_NOATTREDIT) + AddMethod(id,0,"attributedialog",cb_AttrDialog); +#endif + } + +#if FLEXT_SYS == FLEXT_SYS_PD + SetGfx(id); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_loadbang(flext_hdr *c) +{ + Locker lock(c); + thisObject(c)->CbLoadbang(); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::m_loadbang() {} +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::CbLoadbang() { m_loadbang(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::CbClick() {} + +#if FLEXT_SYS == FLEXT_SYS_PD +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_click(flext_hdr *c,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt) +{ + if(shift) { + Locker lock(c); + thisObject(c)->CbClick(); + } +} +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_click(flext_hdr *c, Point pt, short mods) +{ + Locker lock(c); + thisObject(c)->CbClick(); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_assist(flext_hdr *c,void * /*b*/,long msg,long arg,char *s) +{ + Locker lock(c); + flext_base *th = thisObject(c); + + switch(msg) { + case 1: //ASSIST_INLET: + if(arg < th->incnt && th->indesc[arg]) strcpy(s,th->indesc[arg]); + break; + case 2: //ASSIST_OUTLET: + if(arg < th->outcnt) { + if(th->outdesc[arg]) strcpy(s,th->outdesc[arg]); + } + else + if(arg == th->outcnt && th->HasAttributes()) strcpy(s,"Attributes"); + break; + } +} +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_dsp(flext_hdr *c,t_signal **sp,short *count) +#else +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_dsp(flext_hdr *c,t_signal **sp) +#endif +{ + Locker lock(c); + flext_base *bobj = thisObject(c); + +#if FLEXT_SYS == FLEXT_SYS_MAX + // we must extra-check here if it is really a DSP object + // obviously, for objects that are part of a library, one dsp_initclass enables DSP for all + if(!bobj->IsDSP()) return; +#endif + + flext_dsp *obj; +#ifdef FLEXT_DEBUG + obj = dynamic_cast<flext_dsp *>(bobj); +#else + obj = static_cast<flext_dsp *>(bobj); +#endif + + FLEXT_ASSERT(obj); + obj->SetupDsp(sp); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::CbIdle() { return 0; } + +#include "flpopns.h" + +#endif // __FLEXT_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flext.h b/externals/grill/trunk/flext/libbuild/include/flext/flext.h new file mode 100755 index 0000000000000000000000000000000000000000..5c735ff8e3c81db24eb198c7fbc2845593b62360 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flext.h @@ -0,0 +1,93 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flext.h + \brief This is the main flext include file. + + The basic definitions are set here and the necessary header files are included +*/ + +#ifndef __FLEXT_H +#define __FLEXT_H + + +/*! \defgroup FLEXT_GLOBAL Flext global definitions + @{ +*/ + +//! \brief flext version number +#define FLEXT_VERSION 600 + +//! \brief flext version string +#define FLEXT_VERSTR "0.6.0 alpha" + +//! @} + +// determine System/OS/CPU +#include "flprefix.h" + +// include headers necessary for multi-threading +#ifdef FLEXT_THREADS + #if FLEXT_THREADS == FLEXT_THR_POSIX + extern "C" { + #include <pthread.h> + #include <sched.h> + } + #elif FLEXT_THREADS == FLEXT_THR_MP + #include <multiprocessing.h> + #elif FLEXT_THREADS == FLEXT_THR_WIN32 + #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 + #include <windows.h> + #include <process.h> + #else + #error "Win32 threading model only supported for Win2000/XP or newer" + #endif + #else + #error "Thread model not supported" + #endif +#endif + + +// include all the flext interface definitions +#include "fldefs.h" + +// include the basic flext object classes +#include "flclass.h" + +// include the flext dsp class +#include "fldsp.h" + +#ifdef FLEXT_INLINE +// include all source code files +# include "flatom.cpp" +# include "flatom_part.cpp" +# include "flatom_pr.cpp" +# include "flattr.cpp" +# include "flattr_ed.cpp" +# include "flbase.cpp" +# include "flbind.cpp" +# include "flbuf.cpp" +# include "fldsp.cpp" +# include "flext.cpp" +# include "flitem.cpp" +# include "fllib.cpp" +# include "flmap.cpp" +# include "flmeth.cpp" +# include "flmsg.cpp" +# include "flout.cpp" +# include "flproxy.cpp" +# include "flqueue.cpp" +# include "flsimd.cpp" +# include "flsupport.cpp" +# include "flthr.cpp" +# include "fltimer.cpp" +# include "flutil.cpp" +# include "flxlet.cpp" +#endif + +#endif // FLEXT_H diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flfeatures.h b/externals/grill/trunk/flext/libbuild/include/flext/flfeatures.h new file mode 100755 index 0000000000000000000000000000000000000000..0a904f2956887a991f1fe2b6e413b1f0c5e6c0b0 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flfeatures.h @@ -0,0 +1,32 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flfeatures.h + \brief Detect version-specific features. +*/ + +#ifndef __FLFEATURES_H +#define __FLFEATURES_H + +// check if PD API supports buffer dirty time +#if defined(PD_DEVEL_VERSION) && defined(PD_MAJOR_VERSION) && defined(PD_MINOR_VERSION) +#if PD_MINOR_VERSION >= 36 && PD_MINOR_VERSION <= 38 +// array locks have been removed in devel_0_39 + #define _FLEXT_HAVE_PD_GARRAYLOCKS +#endif +#if PD_MINOR_VERSION >= 36 + #define _FLEXT_HAVE_PD_GARRAYUPDATETIME +#endif +#endif + +#if defined(MAC_VERSION) || defined(WIN_VERSION) + // not for OS9 + #define _FLEXT_HAVE_MAX_INUSEFLAG +#endif + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flinternal.h b/externals/grill/trunk/flext/libbuild/include/flext/flinternal.h new file mode 100755 index 0000000000000000000000000000000000000000..f9c508ab4a9fabc37af7a82d021fa5000a0dca99 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flinternal.h @@ -0,0 +1,117 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flinternal.h + \brief Definitions for internal flext usage + \internal + + Here, a few shortcuts for common Max/MSP or PD library calls and type definitions + are declared +*/ + +#ifndef __FLEXT_INTERNALS_H +#define __FLEXT_INTERNALS_H + +#include "flstdc.h" + + +#if FLEXT_SYS == FLEXT_SYS_PD + +#define object_new(clss) pd_new(clss) +#define object_free(obj) pd_free(&(obj)->ob_pd) + + + +#define add_dsp(clss,meth) class_addmethod(clss, (t_method)meth,gensym(const_cast<char *>("dsp")),A_NULL) +#define add_bang(clss,meth) class_addbang(clss, (t_method)meth) +#define add_float(clss,meth) class_addfloat(clss, (t_method)meth) +#define add_floatn(clss,meth,n) class_addmethod(clss, (t_method)meth,gensym(const_cast<char *>("ft" #n)),A_FLOAT,A_NULL) +#define add_flint(clss,meth) class_addfloat(clss, (t_method)meth) +#define add_flintn(clss,meth,n) class_addmethod(clss, (t_method)meth,gensym(const_cast<char *>("ft" #n)),A_FLOAT,A_NULL) +#define add_method(clss,meth,text) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), A_NULL) +#define add_methodG(clss,meth,text) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), A_GIMME,A_NULL) +#define add_method1(clss,meth,text,a1) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,A_NULL) +#define add_method2(clss,meth,text,a1,a2) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,a2,A_NULL) +#define add_method3(clss,meth,text,a1,a2,a3) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,a2,a3,A_NULL) +#define add_method4(clss,meth,text,a1,a2,a3,a4) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,a2,a3,a4,A_NULL) +#define add_method5(clss,meth,text,a1,a2,a3,a5) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,a2,a3,a4,a5,A_NULL) +#define add_loadbang(clss,meth) class_addmethod(clss,(t_method)meth, gensym(const_cast<char *>("loadbang")), A_NULL) +#define add_anything(clss,meth) class_addanything(clss,meth) + + +#define newout_signal(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_signal)) +#define newout_float(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_float)) +#define newout_flint(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_float)) +#define newout_list(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_list)) +#define newout_symbol(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_symbol)) +#define newout_anything(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_anything)) + +#define outlet_flint(o,v) outlet_float(o,(float)(v)) + +typedef t_perfroutine t_dspmethod; + +#define qelem_new clock_new +#define qelem_free clock_free +#define qelem_set clock_delay +#define qelem_front clock_delay +#define qelem_unset clock_unset + +#define CRITON() +#define CRITOFF() + + +#elif FLEXT_SYS == FLEXT_SYS_MAX + +typedef void t_outlet; + + +//#define object_new(clss) newobject(clss) +#define object_free(obj) freeobject((object *)(obj)) + +#define add_dsp(clss,meth) addmess((method)meth,const_cast<char *>("dsp"),A_CANT,A_NOTHING) +#define add_bang(clss,meth) addbang((method)meth) +#define add_float(clss,meth) addfloat((method)meth) +#define add_floatn(clss,meth,n) addftx((method)meth,n) +#define add_flint(clss,meth) addint((method)meth) +#define add_flintn(clss,meth,n) addinx((method)meth,n) +#define add_method(clss,meth,text) addmess((method)meth, text, A_NOTHING) +#define add_methodG(clss,meth,text) addmess((method)meth, text, A_GIMME,A_NOTHING) +#define add_method1(clss,meth,text,a1) addmess((method)meth, text, a1,A_NOTHING) +#define add_method2(clss,meth,text,a1,a2) addmess((method)meth, text, a1,a2,A_NOTHING) +#define add_method3(clss,meth,text,a1,a2,a3) addmess((method)meth, text, a1,a2,a3,A_NOTHING) +#define add_method4(clss,meth,text,a1,a2,a3,a4) addmess((method)meth, text, a1,a2,a3,a4,A_NOTHING) +#define add_method5(clss,meth,text,a1,a2,a3,a5) addmess((method)meth, text, a1,a2,a3,a4,a5,A_NOTHING) +#define add_anything(clss,meth) addmess((method)meth, const_cast<char *>("anything"), A_GIMME,A_NOTHING) + +#define add_assist(clss,meth) addmess((method)meth, const_cast<char *>("assist"), A_CANT, A_NULL) +#define add_loadbang(clss,meth) addmess((method)meth, const_cast<char *>("loadbang"), A_CANT, A_NULL) +#define add_dblclick(clss,meth) addmess((method)meth, const_cast<char *>("dblclick"), A_CANT, A_NULL) + +#define newout_signal(clss) outlet_new(clss,"signal") +#define newout_float(clss) outlet_new(clss,"float") +#define newout_flint(clss) outlet_new(clss,"int") +#define newout_list(clss) outlet_new(clss,"list") +#define newout_symbol(clss) outlet_new(clss,"symbol") +#define newout_anything(clss) outlet_new(clss,0) + +#define outlet_flint(o,v) outlet_int(o,(int)(v)) +#define outlet_symbol(o,s) outlet_anything(o,s,0,NULL) + +typedef t_perfroutine t_dspmethod; + +#define CRITON() short state = lockout_set(1) +#define CRITOFF() lockout_set(state) + + +#elif FLEXT_SYS == FLEXT_SYS_JMAX + + +#endif + + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flitem.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flitem.cpp new file mode 100755 index 0000000000000000000000000000000000000000..b148ec849bf588981551e041143e0a8f7933d2f5 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flitem.cpp @@ -0,0 +1,136 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flitem.cpp + \brief Processing of method and attribute lists. +*/ + +#ifndef __FLEXT_ITEM_CPP +#define __FLEXT_ITEM_CPP + +#include "flext.h" +#include <cstring> + +#include "flpushns.h" + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::ItemSet::~ItemSet() { clear(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ItemSet::clear() +{ + for(FLEXT_TEMP_TYPENAME TablePtrMapDef::iterator it(*this); it; ++it) delete it.data(); + TablePtrMap<const t_symbol *,Item *,8>::clear(); +} + + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::Item::~Item() +{ + if(nxt) delete nxt; +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::ItemCont::ItemCont(): + members(0),memsize(0),size(0),cont(NULL) +{} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::ItemCont::~ItemCont() +{ + if(cont) { + for(int i = 0; i < size; ++i) delete cont[i]; + delete[] cont; + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ItemCont::Resize(int nsz) +{ + if(nsz > memsize) { + int nmemsz = nsz+10; // increment maximum allocation size + ItemSet **ncont = new ItemSet *[nmemsz]; // make new array + if(cont) { + memcpy(ncont,cont,size*sizeof(*cont)); // copy existing entries + delete[] cont; + } + cont = ncont; // set current array + memsize = nmemsz; // set new allocation size + } + + // make new items + while(size < nsz) cont[size++] = new ItemSet; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ItemCont::Add(Item *item,const t_symbol *tag,int inlet) +{ + FLEXT_ASSERT(tag); + + if(!Contained(inlet)) Resize(inlet+2); + ItemSet &set = GetInlet(inlet); + Item *lst = set.find(tag); + if(!lst) { + Item *old = set.insert(tag,lst = item); + FLEXT_ASSERT(!old); + } + else + for(;;) + if(!lst->nxt) { lst->nxt = item; break; } + else lst = lst->nxt; + members++; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::ItemCont::Remove(Item *item,const t_symbol *tag,int inlet,bool free) +{ + FLEXT_ASSERT(tag); + + if(Contained(inlet)) { + ItemSet &set = GetInlet(inlet); + Item *lit = set.find(tag); + for(Item *prv = NULL; lit; prv = lit,lit = lit->nxt) { + if(lit == item) { + if(prv) prv->nxt = lit->nxt; + else if(lit->nxt) { + Item *old = set.insert(tag,lit->nxt); + FLEXT_ASSERT(!old); + } + else { + Item *l = set.remove(tag); + FLEXT_ASSERT(l == lit); + } + + lit->nxt = NULL; + if(free) delete lit; + return true; + } + } + } + return false; +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::Item *FLEXT_CLASSDEF(flext_base))::ItemCont::FindList(const t_symbol *tag,int inlet) +{ + FLEXT_ASSERT(tag); + return Contained(inlet)?GetInlet(inlet).find(tag):NULL; +} + +// --- class item lists (methods and attributes) ---------------- + +/* +typedef TablePtrMap<FLEXT_CLASSDEF(flext_base)::t_classid,FLEXT_CLASSDEF(flext_base)::ItemCont *,8> ClassMap; + +static ClassMap classarr[2]; + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::ItemCont *FLEXT_CLASSDEF(flext_base))::GetClassArr(t_classid c,int ix) +{ + ClassMap &map = classarr[ix]; + ItemCont *cont = map.find(c); + if(!cont) map.insert(c,cont = new ItemCont); + return cont; +} +*/ + +#include "flpopns.h" + +#endif // __FLEXT_ITEM_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fllib.cpp b/externals/grill/trunk/flext/libbuild/include/flext/fllib.cpp new file mode 100755 index 0000000000000000000000000000000000000000..331a8a4cfa8df5e75d8cd4a83a3edf71066c1a39 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fllib.cpp @@ -0,0 +1,629 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fllib.cpp + \brief Code for handling of object (and library) creation functions. +*/ + +#ifndef __FLEXT_LIB_CPP +#define __FLEXT_LIB_CPP + +#include "flext.h" +#include "flinternal.h" + +#include <cstdarg> +#include <cstring> +#include <cctype> +#include <map> + +#include "flpushns.h" + +#define ALIASDEL ',' + +#define ALIASSLASHES ":/\\" +#if FLEXT_OS == FLEXT_OS_MAC + #define ALIASSLASH ':' +#elif FLEXT_OS == FLEXT_OS_WIN + #if FLEXT_SYS == FLEXT_SYS_PD + #define ALIASSLASH '/' + #elif FLEXT_SYS == FLEXT_SYS_MAX + #define ALIASSLASH '/' + #else + #error "Undefined" + #endif +#else + // default to "/" + #define ALIASSLASH '/' +#endif + +//! Extract space-delimited words from a string +FLEXT_TEMPLATE +const char *extract(const char *name,int ix = 0) +{ + static char tmp[1024]; + const char *n = name; + + const char *del = strchr(name,ALIASDEL); + + if(del) { +#if 0 + char *t = tmp; + while(n < del && (isspace(*n) || strchr(ALIASSLASHES,*n))) ++n; + while(n < del && !isspace(*n)) { + char c = *(n++); + *(t++) = strchr(ALIASSLASHES,c)?ALIASSLASH:c; + } + while(*t == ALIASSLASH && t > tmp) --t; + *t = 0; +#endif + if(ix < 0) { + // eat white space in front of help definition + ++del; + while(*del && isspace(*del)) ++del; + return del; + } + + strncpy(tmp,name,del-name); + tmp[del-name] = 0; + n = tmp; + } + else if(ix < 0) + return NULL; // no explicit help name + + while(*n && isspace(*n)) ++n; + + for(int i = 0; n && *n; ++i) { + if(i == ix) { + char *t = tmp; + + for(; *n && !isspace(*n); ++t,++n) *t = *n; + *t = 0; + return *tmp?tmp:NULL; + } + else { + while(*n && !isspace(*n)) ++n; + while(*n && isspace(*n)) ++n; + } + } + + return NULL; +} + + +//! Check if object's name ends with a tilde +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::chktilde(const char *objname) +{ +// int stplen = strlen(setupfun); + bool tilde = true; //!strncmp(setupfun,"_tilde",6); + + if((objname[strlen(objname)-1] == '~'?1:0)^(tilde?1:0)) { + if(tilde) + error("flext: %s (no trailing ~) is defined as a tilde object",objname); + else + error("flext::check_tilde: %s is no tilde object",objname); + return true; + } + else + return false; +} + +// this class stands for one library of objects +// there can be more if flext is a shared library +class flext_library +{ +public: + flext_library(const t_symbol *nm) + : name(nm) +#if FLEXT_SYS == FLEXT_SYS_MAX + , clss(NULL),dsp(false) +#endif + {} + + const t_symbol *name; +#if FLEXT_SYS == FLEXT_SYS_MAX + t_class *clss; + bool dsp; +#endif +}; + +// this class stands for one registered object +// it holds the class, type flags, constructor and destructor of the object and the creation arg types +// it will never be destroyed +FLEXT_TEMPLATE +class flext_class: + public flext_root +{ +public: + flext_class(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)); + + t_class *const &clss; + + flext_obj *(*newfun)(int,t_atom *); + void (*freefun)(flext_hdr *c); + + int argc; + int *argv; + + flext_library *lib; + bool dsp:1,noi:1,attr:1,dist:1; + + flext_base::ItemCont meths,attrs; +}; + +FLEXT_TEMPIMPL(flext_class)::flext_class(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)): + clss(cl), + newfun(newf),freefun(freef), + argc(0),argv(NULL) + , dist(false) +{} + +FLEXT_TEMPIMPL(LibMap *FLEXT_CLASSDEF(flext_obj))::libnames = NULL; + +//! Store or retrieve registered classes +FLEXT_TEMPIMPL(FLEXT_TEMPINST(flext_class) *FLEXT_CLASSDEF(flext_obj))::FindName(const t_symbol *s,FLEXT_TEMPINST(flext_class) *o) +{ + if(!libnames) libnames = new LibMap; + LibMap::iterator it = libnames->find(s); + if(it != libnames->end()) + return it->second; + else if(o) { + (*libnames)[s] = o; + return o; + } + else + return NULL; +} + + +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_obj))::getClass(t_classid cl) { return cl->clss; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::HasAttributes(t_classid cl) { return cl->attr; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::IsDSP(t_classid cl) { return cl->dsp; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::HasDSPIn(t_classid cl) { return !cl->noi; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::IsLib(t_classid cl) { return cl->lib != NULL; } + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::HasAttributes() const { return clss->attr; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::IsDSP() const { return clss->dsp; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::HasDSPIn() const { return !clss->noi; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::IsLib() const { return clss->lib != NULL; } + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::NeedDSP() const { return clss->dsp || (clss->lib && clss->lib->dsp); } +#endif + + +FLEXT_TEMPIMPL(flext_library *FLEXT_CLASSDEF(flext_obj))::curlib = NULL; + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::lib_init(const char *name,void setupfun()) +{ + // make new library instance + curlib = new flext_library(MakeSymbol(name)); + + flext::Setup(); + + // first register all classes + try { + setupfun(); + } + catch(std::exception &x) { + error("%s - %s",name,x.what()); + return; + } + catch(char *txt) { + error("%s - %s",name,txt); + return; + } + catch(...) { + error("%s - Unknown exception at library setup",name); + return; + } + +#if FLEXT_SYS == FLEXT_SYS_MAX + // then see if we got DSP classes + + // for Max/MSP, the library is represented by a special object (class) registered at startup + // all objects in the library are clones of that library object - they share the same class + ::setup( + (t_messlist **)&curlib->clss, + (t_newmethod)obj_new,(t_method)obj_free, + sizeof(flext_hdr),NULL,A_GIMME,A_NULL); + + // for all classes in library add methods + flext_base::AddMessageMethods(curlib->clss,curlib->dsp,true); +#endif + + curlib = NULL; +} + +#if FLEXT_SYS == FLEXT_SYS_PD +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_obj))::buf_class = NULL; +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::obj_add(bool lib,bool dsp,bool noi,bool attr,const char *idname,const char *names,void setupfun(t_classid),FLEXT_CLASSDEF(flext_obj) *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...) +{ + Locker lock; + +#if FLEXT_SYS == FLEXT_SYS_PD + // register buffer helper class (if not present already) + if(!buf_class) { + buf_class = ::class_new(gensym(const_cast<char *>(" flext buffer helper ")),NULL,NULL,sizeof(t_object),CLASS_PD|CLASS_NOINLET,A_NULL); + add_dsp(buf_class,cb_buffer_dsp); + // make an instance + ::pd_new(buf_class); + } +#endif + + // get first possible object name + const t_symbol *nsym = MakeSymbol(FLEXT_TEMPINST(extract)(names)); + +#ifdef FLEXT_DEBUG + if(dsp) chktilde(GetString(nsym)); +#endif + + if(lib) { + FLEXT_ASSERT(curlib); +#if FLEXT_SYS == FLEXT_SYS_MAX + curlib->dsp |= dsp; +#endif + } + else { + FLEXT_ASSERT(!curlib); +// process_attributes = attr; + } + + // set dynamic class pointer + t_class **cl = +#if FLEXT_SYS == FLEXT_SYS_MAX + lib?&curlib->clss: +#endif + new t_class *; + +#if FLEXT_SYS == FLEXT_SYS_PD + // register object class + *cl = ::class_new( + (t_symbol *)nsym, + (t_newmethod)obj_new,(t_method)obj_free, + sizeof(flext_hdr),CLASS_DEFAULT,A_GIMME,A_NULL); +#elif FLEXT_SYS == FLEXT_SYS_MAX + if(!lib) { + ::setup( + (t_messlist **)cl, + (t_newmethod)obj_new,(t_method)obj_free, + sizeof(flext_hdr),NULL,A_GIMME,A_NULL); + // attention: in Max/MSP the *cl variable is not initialized after that call. + // just the address is stored, the initialization then occurs with the first object instance! + } +#else +#error Platform not implemented +#endif + + // make new dynamic object + FLEXT_TEMPINST(flext_class) *lo = new FLEXT_TEMPINST(flext_class)(*cl,newfun,freefun); + lo->lib = curlib; + lo->dsp = dsp; + lo->noi = noi; + lo->attr = attr; + +// post("ADDCLASS %s,%s = %p -> LIBOBJ %p -> %p (lib=%i,dsp=%i)",idname,names,*cl,lo,lo->clss,lib?1:0,dsp?1:0); + + // parse the argument type list and store it with the object + if(argtp1 == FLEXTTPN_VAR) + lo->argc = -1; + else { + int argtp,i; + va_list marker; + + // parse a first time and count only + va_start(marker,argtp1); + for(argtp = argtp1; argtp != FLEXTTPN_NULL; ++lo->argc) argtp = (int)va_arg(marker,int); + va_end(marker); + + lo->argv = new int[lo->argc]; + + // now parse and store + va_start(marker,argtp1); + for(argtp = argtp1,i = 0; i < lo->argc; ++i) { + lo->argv[i] = argtp; + argtp = (int)va_arg(marker,int); + } + va_end(marker); + } + + // get unique class id + t_classid clid = lo; + + // make help reference + const char *helptxt = FLEXT_TEMPINST(extract)(names,-1); + if(helptxt) { + const char *sl = strchr(helptxt,'/'); + if(sl && !sl[1]) + // helptxt is only the path (path with trailing /) + flext_obj::DefineHelp(clid,idname,helptxt,dsp); + else + // helptxt is path and patch name + flext_obj::DefineHelp(clid,helptxt,NULL,dsp); + } + + for(int ix = 0; ; ++ix) { + // in this loop register all the possible aliases of the object + + const char *c = ix?FLEXT_TEMPINST(extract)(names,ix):GetString(nsym); + if(!c || !*c) break; + + // add to name list + const t_symbol *lsym = MakeSymbol(c); + FindName(lsym,lo); + +#if FLEXT_SYS == FLEXT_SYS_PD + if(ix > 0) + // in PD the first name is already registered with class creation + ::class_addcreator((t_newmethod)obj_new,(t_symbol *)lsym,A_GIMME,A_NULL); +#elif FLEXT_SYS == FLEXT_SYS_MAX + if(ix > 0 || lib) + // in Max/MSP the first alias gets its name from the name of the object file, + // unless it is a library (then the name can be different) + ::alias(const_cast<char *>(c)); +#else +#error +#endif + } + + try { + // call class setup function + setupfun(clid); + } + catch(std::exception &x) { + error("%s: %s",idname,x.what()); + } + catch(char *txt) { + error("%s: %s",idname,txt); + } + catch(...) { + error("%s - Unknown exception while initializing class",idname); + } +} + + +#define NEWARGS 256 // must be larger than FLEXT_NEWARGS = 5 + +typedef FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_obj)) *(*libfun)(int,t_atom *); + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(flext_hdr *FLEXT_CLASSDEF(flext_obj))::obj_new(const t_symbol *s,short _argc_,t_atom *argv) +#else +FLEXT_TEMPIMPL(flext_hdr *FLEXT_CLASSDEF(flext_obj))::obj_new(const t_symbol *s,int _argc_,t_atom *argv) +#endif +{ + Locker lock; + + flext_hdr *obj = NULL; + FLEXT_TEMPINST(flext_class) *lo = FindName(s); + + if(lo) { +// post("NEWOBJ %s = %p -> %p",GetString(s),lo,lo->clss); + + bool ok = true; + t_atom args[NEWARGS]; + + int argc = _argc_; + if(lo->attr) { + argc = flext_base::CheckAttrib(argc,argv); + } + + if(lo->argc >= 0) { +#ifdef FLEXT_DEBUG + if(lo->argc > FLEXT_MAXNEWARGS) { ERRINTERNAL(); ok = false; } +#endif + + int misnum = 0; + if(argc > lo->argc) { ok = false; misnum = 1; } + + for(int i = 0; ok && i < lo->argc; ++i) { + switch(lo->argv[i]) { +#if FLEXT_SYS != FLEXT_SYS_PD + case FLEXTTPN_INT: + case FLEXTTPN_DEFINT: + if(i >= argc) + if(lo->argv[i] == FLEXTTPN_DEFINT) SetInt(args[i],0); + else { misnum = -1,ok = false; break; } + else if(IsInt(argv[i])) args[i] = argv[i]; + else if(IsFloat(argv[i])) SetInt(args[i],(int)GetFloat(argv[i])); + else ok = false; + break; +#endif + case FLEXTTPN_FLOAT: + case FLEXTTPN_DEFFLOAT: + if(i >= argc) + if(lo->argv[i] == FLEXTTPN_DEFFLOAT) SetFloat(args[i],0); + else { misnum = -1,ok = false; break; } + else if(IsInt(argv[i])) SetFloat(args[i],(float)GetInt(argv[i])); + else if(IsFloat(argv[i])) args[i] = argv[i]; + else ok = false; + break; + case FLEXTTPN_SYM: + case FLEXTTPN_DEFSYM: + // \todo shall we analyze the patcher args????... should already be done! + if(i >= argc) + if(lo->argv[i] == FLEXTTPN_DEFSYM) SetSymbol(args[i],sym__); + else { misnum = -1,ok = false; break; } + else if(IsSymbol(argv[i])) +// SetSymbol(args[i],GetParamSym(GetSymbol(argv[i]),NULL)); + args[i] = argv[i]; + else ok = false; + break; + } + } + + if(!ok) { + if(misnum) + error("%s: %s creation arguments",GetString(s),misnum < 0?"Not enough":"Too many"); + else + error("%s: Creation arguments do not match",GetString(s)); + } + } + + + if(ok) { + flext_obj::initing = true; + + try { +#if FLEXT_SYS == FLEXT_SYS_PD + obj = (flext_hdr *)::pd_new(lo->clss); +#elif FLEXT_SYS == FLEXT_SYS_MAX + obj = (flext_hdr *)::newobject(lo->clss); +#else +#error +#endif + flext_obj::m_holder = obj; + flext_obj::m_holdclass = lo; + flext_obj::m_holdname = s; + flext_obj::init_ok = true; + + // get actual flext object (newfun calls "new flext_obj()") + if(lo->argc >= 0) + obj->data = lo->newfun(lo->argc,args); + else + obj->data = lo->newfun(argc,argv); + + flext_obj::m_holder = NULL; + flext_obj::m_holdclass = NULL; + flext_obj::m_holdname = NULL; + + ok = obj->data && + // check constructor exit flag + flext_obj::init_ok; + + if(ok) { + if(lo->attr) { + // DON'T convert eventual patcher args here... this is done by the actual attribute stuff + // so that the initial $- or #- be preserved! + + // store creation args for attribute initialization (inside flext_base::Init()) + flext_obj::m_holdaargc = _argc_-argc; + flext_obj::m_holdaargv = argv+argc; + } + else { + flext_obj::m_holdaargc = 0; + flext_obj::m_holdaargv = NULL; + } + + // call virtual init function + // here, inlets, outlets, methods and attributes can be set up + ok = obj->data->Init(); + + flext_obj::initing = false; + + // call another virtual init function + if(ok) ok = obj->data->Finalize(); + + flext_obj::m_holdaargc = 0; + flext_obj::m_holdaargv = NULL; + } + + } //try + catch(std::exception &x) { + error("%s - Exception while creating object: %s",GetString(s),x.what()); + ok = false; + } + catch(char *txt) { + error("%s - Exception while creating object: %s",GetString(s),txt); + ok = false; + } + catch(...) { + error("%s - Unknown exception while creating object",GetString(s)); + ok = false; + } + + flext_obj::initing = false; + + if(ok) { +#if FLEXT_SYS == FLEXT_SYS_MAX + // create object-specific thread lock + critical_new(&obj->data->lock); +#endif + } + else { + // there was some init error, free object + lo->freefun(obj); + obj = NULL; + } + } + } +#ifdef FLEXT_DEBUG + else +#if FLEXT_SYS == FLEXT_SYS_MAX + // in Max/MSP an object with the name of the library exists, even if not explicitly declared! +// if(!lo->lib || s != lo->lib->name) +#endif + error("Class %s not found in library!",s->s_name); +#endif + + return obj; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::obj_free(flext_hdr *h) +{ + Locker lock; + + flext_hdr *hdr = (flext_hdr *)h; + const t_symbol *name = hdr->data->thisNameSym(); + FLEXT_TEMPINST(flext_class) *lcl = FindName(name); + + if(lcl) { + flext_obj::exiting = true; + + try { + // call virtual exit function + hdr->data->Exit(); + +#if FLEXT_SYS == FLEXT_SYS_MAX + // free object-specific thread lock + critical_free(hdr->data->lock); +#endif + + // now call object destructor and deallocate + lcl->freefun(hdr); + } + catch(std::exception &x) { + error("%s - Exception while destroying object: %s",GetString(name),x.what()); + } + catch(char *txt) { + error("%s - Exception while destroying object: %s",GetString(name),txt); + } + catch(...) { + error("%s - Unknown exception while destroying object",GetString(name)); + } + + flext_obj::exiting = false; + } +#ifdef FLEXT_DEBUG + else +#if FLEXT_SYS == FLEXT_SYS_MAX + // in Max/MSP an object with the name of the library exists, even if not explicitly declared! +// if(!lo->lib || s != lo->lib->name) +#endif + error("Class %s not found in library!",name); +#endif +} + + +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_obj))::thisClass() const +{ + FLEXT_ASSERT(x_obj); + return thisClassId()->clss; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::SetDist(t_classid c,bool d) { c->dist = d; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::DoDist() const { return thisClassId()->dist; } + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::ItemCont *FLEXT_CLASSDEF(flext_base))::ClMeths(t_classid c) { return &c->meths; } +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::ItemCont *FLEXT_CLASSDEF(flext_base))::ClAttrs(t_classid c) { return &c->attrs; } + +#include "flpopns.h" + +#endif // __FLEXT_LIB_CPP + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flmap.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flmap.cpp new file mode 100755 index 0000000000000000000000000000000000000000..87a46daf582b67e73b01d3cc17257574a580e0b4 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flmap.cpp @@ -0,0 +1,255 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmap.cpp + \brief flext container classes. +*/ + +#ifndef __FLEXT_MAP_CPP +#define __FLEXT_MAP_CPP + +#include "flext.h" +#include "flmap.h" + +#include "flpushns.h" + +FLEXT_TEMPIMPL(TableAnyMap)::~TableAnyMap() { clear(); } + +FLEXT_TEMPIMPL(void TableAnyMap)::clear() +{ + if(left) { _delmap(left); left = NULL; } + if(right) { _delmap(right); right = NULL; } + n = 0; +} + +FLEXT_TEMPIMPL(void *TableAnyMap)::_set(int tsize,size_t k,void *t) +{ + FLEXT_ASSERT(n); + + if(n < tsize) { + // fall through + } + else if(k < data[0].key) + return _toleft(tsize,k,t); + else if(k > data[tsize-1].key) + return _toright(tsize,k,t); + + int ix = _tryix(k); + if(ix >= n) { + FLEXT_ASSERT(ix == n); + // after last entry + data[n++](k,t); + return NULL; + } + + size_t dk = data[ix].key; + if(k == dk) { + // update data in existing slot (same key) + void *a = data[ix].value; + data[ix] = t; + return a; + } + else { + // insert new slot by shifting the higher ones + FLEXT_ASSERT(k < dk); + void *a; + if(n == tsize) + a = _toright(tsize,data[tsize-1]); + else { + ++n; + a = NULL; + } + + Data *tg = data+ix; + for(Data *d = data+n-1; d > tg; d--) d[0] = d[-1]; + (*tg)(k,t); + return a; + } +} + +FLEXT_TEMPIMPL(void *TableAnyMap)::_find(int tsize,size_t k) const +{ + FLEXT_ASSERT(n); + if(n < tsize) { + // fall through + } + else if(k < data[0].key) + return left?left->_find(tsize,k):NULL; + else if(k > data[n-1].key) + return right?right->_find(tsize,k):NULL; + + const int ix = _tryix(k); + return ix < n && data[ix].key == k?data[ix].value:NULL; +} + +#ifdef FLEXT_DEBUG +FLEXT_TEMPIMPL(void TableAnyMap)::_check(int tsize) +{ + FLEXT_ASSERT(n); + + size_t k = data[0].key; + for(int i = 1; i < n; ++i) { + size_t k2 = data[i].key; + FLEXT_ASSERT(k < k2); + k = k2; + } + + if(left || right) FLEXT_ASSERT(n == tsize); + + if(left) { + FLEXT_ASSERT(flext::MemCheck(left)); + left->_check(tsize); + } + if(right) { + FLEXT_ASSERT(flext::MemCheck(right)); + right->_check(tsize); + } +} +#endif + +FLEXT_TEMPIMPL(void *TableAnyMap)::_remove(int tsize,size_t k) +{ + FLEXT_ASSERT(n); + if(n < tsize) { + // fall through + } + else if(k < data[0].key) { + void *r = left?left->_remove(tsize,k):NULL; + if(r) _eraseempty(left); + return r; + } + else if(k > data[n-1].key) { + void *r = right?right->_remove(tsize,k):NULL; + if(r) _eraseempty(right); + return r; + } + + const int ix = _tryix(k); + if(ix >= n || data[ix].key != k) + return NULL; + else { + // found key in this map + void *ret = data[ix].value; + + Data dt; + bool fnd,ins = false; + if(n >= tsize) { + // if this table is full get fill-in elements from branches + if(left) { + // try to get biggest element from left branch + left->_getbig(dt); + _eraseempty(left); + fnd = true,ins = true; + } + else if(right) { + // try to get smallest element from right branch + right->_getsmall(dt); + _eraseempty(right); + fnd = true; + } + else + fnd = false; + } + else fnd = false; + + if(ins) { + // insert smaller element from left + for(int i = ix; i; --i) data[i] = data[i-1]; + data[0] = dt; + } + else { + // shift elements + for(int i = ix+1; i < n; ++i) data[i-1] = data[i]; + // insert bigger element from right or reduce table size + if(fnd) + data[n-1] = dt; + else + --n; + } + + return ret; + } +} + +FLEXT_TEMPIMPL(void TableAnyMap)::_getbig(Data &dt) +{ + FLEXT_ASSERT(n); + + if(right) { + right->_getbig(dt); + _eraseempty(right); + } + else { + dt = data[n-1]; + if(left) { + for(int i = n-1; i; --i) data[i] = data[i-1]; + left->_getbig(data[0]); + _eraseempty(left); + } + else + --n; + } +} + +FLEXT_TEMPIMPL(void TableAnyMap)::_getsmall(Data &dt) +{ + FLEXT_ASSERT(n); + + if(left) { + left->_getsmall(dt); + _eraseempty(left); + } + else { + dt = data[0]; + for(int i = 1; i < n; ++i) data[i-1] = data[i]; + if(right) { + right->_getsmall(data[n-1]); + _eraseempty(right); + } + else + --n; + } +} + +FLEXT_TEMPIMPL(void TableAnyMap)::iterator::forward() +{ + FLEXT_ASSERT(map || ix >= map->n); + + if(++ix >= map->n) { + TableAnyMap *nmap; + + // we reached the end of the slots + if(map->right) { + // climb up one + map = map->right; + leftmost(); + ix = 0; + } + else { + // fall back + for(;;) { + nmap = map->parent; + if(!nmap) break; // no parent + if(nmap->left == map) { + // ok, we are in front of the slots now + ix = 0; + map = nmap; + break; + } + else { + FLEXT_ASSERT(nmap->right == map); + ix = (map = nmap)->n; + } + } + } + } +} + +#include "flpopns.h" + +#endif // __FLEXT_MAP_CPP diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flmap.h b/externals/grill/trunk/flext/libbuild/include/flext/flmap.h new file mode 100755 index 0000000000000000000000000000000000000000..55f7df57e39de5941a39f516a19b17b8b0769007 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flmap.h @@ -0,0 +1,258 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmap.h + \brief special map class (faster and less memory-consuming than std::map) +*/ + +#ifndef __FLMAP_H +#define __FLMAP_H + +#include "flprefix.h" + +/*! \defgroup FLEXT_SUPPORT Flext support classes + @{ +*/ + +#include "flpushns.h" + +FLEXT_TEMPLATE +class FLEXT_SHARE TableAnyMap +{ +public: + + virtual TableAnyMap *_newmap(TableAnyMap *parent) = 0; + virtual void _delmap(TableAnyMap *map) = 0; + + struct Data { + void operator()(size_t k,void *v) { key = k,value = v; } + void operator =(void *v) { value = v; } + + size_t key; + void *value; + }; + +protected: + // constructor and destructor are protected so that they can't be directly instantiated + + TableAnyMap(TableAnyMap *p,Data *dt) + : data(dt) + , parent(p),left(0),right(0) + , n(0) + {} + + virtual ~TableAnyMap(); + +public: + +#if 0 // set 1 for asserting the map structure (very cpu-intensive!) + void check(int tsize) { if(n) _check(tsize); } +#else +// void check(int tsize) {} +#endif + + void *insert(int tsize,size_t k,void *t) + { + void *r; + if(LIKELY(n)) + r = _set(tsize,k,t); + else { + data[n++](k,t); + r = 0; + } +// check(tsize); + return r; + } + + void *find(int tsize,size_t k) const { return LIKELY(n)?_find(tsize,k):0; } + + void *remove(int tsize,size_t k) + { + void *r = LIKELY(n)?_remove(tsize,k):0; +// check(tsize); + return r; + } + + virtual void clear(); + + class FLEXT_SHARE iterator + { + public: + iterator(): map(0) {} + iterator(const TableAnyMap &m): map(&m),ix(0) { leftmost(); } + iterator(const iterator &it): map(it.map),ix(it.ix) {} + + iterator &operator =(const iterator &it) { map = it.map,ix = it.ix; return *this; } + + operator bool() const { return map && ix < map->n; } + + // no checking here! + void *data() const { return map->data[ix].value; } + size_t key() const { return map->data[ix].key; } + + iterator &operator ++() { forward(); return *this; } + + protected: + void leftmost() + { + // search smallest branch (go left as far as possible) + const TableAnyMap *nmap; + while((nmap = map->left) != 0) map = nmap; + } + + void forward(); + + // pointers to map and index within + const TableAnyMap *map; + int ix; + }; + + void _init(size_t k,void *t) { data[0](k,t); n = 1; } + + void *_toleft(int tsize,size_t k,void *t) + { + if(left) + return left->_set(tsize,k,t); + else { + (left = _newmap(this))->_init(k,t); + return 0; + } + } + + void *_toright(int tsize,size_t k,void *t) + { + if(right) + return right->_set(tsize,k,t); + else { + (right = _newmap(this))->_init(k,t); + return 0; + } + } + + void *_toleft(int tsize,Data &v) { return _toleft(tsize,v.key,v.value); } + void *_toright(int tsize,Data &v) { return _toright(tsize,v.key,v.value); } + + void *_set(int tsize,size_t k,void *t); + void *_find(int tsize,size_t k) const; + void *_remove(int tsize,size_t k); + +#ifdef FLEXT_DEBUG + void _check(int tsize); +#endif + + Data *data; + TableAnyMap *parent,*left,*right; + int n; + + //! return index of data item with key <= k + //! \note index can point past the last item! + unsigned int _tryix(size_t k) const + { + unsigned int ix = 0,b = n; + while(ix != b) { + const unsigned int c = (ix+b)>>1; + const size_t dk = data[c].key; + if(k == dk) + return c; + else if(k < dk) + b = c; + else if(ix < c) + ix = c; + else + return b; + } + return ix; + } + + void _eraseempty(TableAnyMap *&b) + { + if(!b->n) { + // remove empty branch + _delmap(b); b = 0; + } + } + + void _getsmall(Data &dt); + void _getbig(Data &dt); + +private: + // hide, so that it can't be used..... + explicit TableAnyMap(const TableAnyMap &): data(NULL) {} + TableAnyMap &operator =(const TableAnyMap &) { return *this; } +}; + +template <typename K,typename T,int N = 8> +class TablePtrMap + : +#if (defined(_MSC_VER) && _MSC_VER < 1300) || defined(__BORLANDC__) || defined(__MWERKS__) + public // necessary for VC6 +#endif + FLEXT_TEMPINST(TableAnyMap) +{ +public: + TablePtrMap(): TableAnyMap(0,slots),count(0) {} + virtual ~TablePtrMap() { clear(); } + + virtual void clear() { TableAnyMap::clear(); count = 0; } + + inline int size() const { return count; } + + inline T insert(K k,T t) + { + void *d = TableAnyMap::insert(N,*(size_t *)&k,(void *)t); + if(!d) ++count; + return (T)d; + } + + inline T find(K k) const { return (T)TableAnyMap::find(N,*(size_t *)&k); } + + inline T remove(K k) + { + void *d = TableAnyMap::remove(N,*(size_t *)&k); + if(LIKELY(d)) --count; + return (T)d; + } + + + class iterator + : TableAnyMap::iterator + { + public: + iterator() {} + iterator(const TablePtrMap &m): TableAnyMap::iterator(m) {} + iterator(const iterator &it): TableAnyMap::iterator(it) {} + + // this ugly syntax (cast to parent class) is needed for MSVC6 + + inline iterator &operator =(const iterator &it) { ((TableAnyMap::iterator &)*this) = it; return *this; } + + inline operator bool() const { return (bool)((TableAnyMap::iterator &)*this); } + inline T data() const { return (T)(((TableAnyMap::iterator &)*this).data()); } + inline K key() const { return (K)(((TableAnyMap::iterator &)*this).key()); } + + inline iterator &operator ++() { ++((TableAnyMap::iterator &)*this); return *this; } + }; + +protected: + TablePtrMap(TableAnyMap *p): TableAnyMap(p,slots),count(0) {} + + virtual TableAnyMap *_newmap(TableAnyMap *parent) { return new TablePtrMap(parent); } + virtual void _delmap(TableAnyMap *map) { delete (TablePtrMap *)map; } + + int count; + Data slots[N]; + +private: + explicit TablePtrMap(const TableAnyMap &p) {} +}; + +#include "flpopns.h" + +//! @} // FLEXT_SUPPORT + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flmeth.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flmeth.cpp new file mode 100755 index 0000000000000000000000000000000000000000..554f4066af1d50768f0b74e5324f6bfc46a857fb --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flmeth.cpp @@ -0,0 +1,139 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmeth.cpp + \brief Method processing of flext base class. +*/ + +#ifndef __FLEXT_METH_CPP +#define __FLEXT_METH_CPP + +#include "flext.h" +#include "flinternal.h" +#include <cstring> +#include <cstdarg> + +#include "flpushns.h" + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::MethItem::MethItem(AttrItem *conn): + Item(conn),index(0), + argc(0),args(NULL) + ,fun(NULL) +{} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::MethItem::~MethItem() +{ + if(args) delete[] args; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MethItem::SetArgs(methfun _fun,int _argc,metharg *_args) +{ + fun = _fun; + if(args) delete[] args; + argc = _argc,args = _args; +} + +/*! \brief Add a method to the queue +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddMethod(ItemCont *ma,int inlet,const t_symbol *tag,methfun fun,metharg tp,...) +{ +#ifdef FLEXT_LOG_MSGS + post("addmethod %i:%s",inlet,GetString(tag)); +#endif + + va_list marker; + + // at first just count the arg type list (in argc) + int argc = 0; + va_start(marker,tp); + metharg *args = NULL,arg = tp; + for(; arg != a_null; ++argc) arg = (metharg)va_arg(marker,int); //metharg); + va_end(marker); + + if(argc > 0) { + if(argc > FLEXT_MAXMETHARGS) { + error("flext - method %s: only %i arguments are type-checkable: use variable argument list for more",tag?GetString(tag):"?",FLEXT_MAXMETHARGS); + argc = FLEXT_MAXMETHARGS; + } + + args = new metharg[argc]; + + va_start(marker,tp); + metharg a = tp; + for(int ix = 0; ix < argc; ++ix) { +#ifdef FLEXT_DEBUG + if(a == a_list && ix > 0) { + ERRINTERNAL(); + } +#endif +#if FLEXT_SYS == FLEXT_SYS_PD && defined(FLEXT_COMPATIBLE) + if(a == a_pointer) { + post("Pointer arguments are not allowed in compatibility mode"); + } +#endif + args[ix] = a; + a = (metharg)va_arg(marker,int); //metharg); + } + va_end(marker); + } + + MethItem *mi = new MethItem; + mi->index = ma->Members(); + mi->SetArgs(fun,argc,args); + ma->Add(mi,tag,inlet); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ListMethods(AtomList &la,int inlet) const +{ + typedef TablePtrMap<int,const t_symbol *,32> MethList; + MethList list[2]; + ItemCont *clmethhead = ClMeths(thisClassId()); + + int i; + for(i = 0; i <= 1; ++i) { + ItemCont *a = i?methhead:clmethhead; + if(a && a->Contained(inlet)) { + ItemSet &ai = a->GetInlet(inlet); + for(FLEXT_TEMP_TYPENAME ItemSet::iterator as(ai); as; ++as) { + for(Item *al = as.data(); al; al = al->nxt) { + MethItem *aa = (MethItem *)al; + // check it's not related to an attribute + if(!aa->IsAttr()) { + list[i].insert(aa->index,as.key()); + break; + } + } + } + } + } + + la((int)list[0].size()+(int)list[1].size()); + int ix = 0; + for(i = 0; i <= 1; ++i) + for(MethList::iterator it(list[i]); it; ++it) + SetSymbol(la[ix++],it.data()); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::cb_ListMethods(flext_base *c,int argc,const t_atom *argv) +{ + Locker lock(c); + if(c->HasAttributes() && (argc == 0 || (argc == 1 && CanbeInt(argv[0])))) { + // defined in flsupport.cpp + int inlet = argc?GetAInt(argv[0]):0; + AtomListStatic<32> la; + c->ListMethods(la,inlet); + c->ToOutAnything(c->GetOutAttr(),sym_methods,la.Count(),la.Atoms()); + return true; + } + else + return false; +} + +#include "flpopns.h" + +#endif // __FLEXT_METH_CPP diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flmsg.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flmsg.cpp new file mode 100755 index 0000000000000000000000000000000000000000..2900c115833095c69ab5b8fb720c1769912871a6 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flmsg.cpp @@ -0,0 +1,308 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmsg.cpp + \brief Message processing of flext base class. +*/ + +#ifndef __FLEXT_MSG_CPP +#define __FLEXT_MSG_CPP + +#include "flext.h" + +#include "flpushns.h" + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::TryMethTag(Item *lst,const t_symbol *tag,int argc,const t_atom *argv) +{ + for(; lst; lst = lst->nxt) { + MethItem *m = (MethItem *)lst; + +// FLEXT_LOG3("found method tag %s: inlet=%i, argc=%i",GetString(tag),m->inlet,argc); + + if(m->attr) { + // attributes are treated differently + + if(m->attr->IsGet()) + return DumpAttrib(tag,m->attr); + else + return SetAttrib(tag,m->attr,argc,argv); + } + else { + if(m->argc == 1) { + if(m->args[0] == a_list) { + // try list + if(((methfun_V)m->fun)(this,argc,const_cast<t_atom *>(argv))) return true; + } + else if(m->args[0] == a_any) { + // try anything + if(((methfun_A)m->fun)(this,tag,argc,const_cast<t_atom *>(argv))) return true; + } + } + + // try matching number of args + if(m->argc == argc) { + int ix; + t_any aargs[FLEXT_MAXMETHARGS]; + bool ok = true; + for(ix = 0; ix < argc && ok; ++ix) { + switch(m->args[ix]) { + case a_float: { + if(IsFloat(argv[ix])) aargs[ix].ft = GetFloat(argv[ix]); + else if(IsInt(argv[ix])) aargs[ix].ft = (float)GetInt(argv[ix]); + else ok = false; + + if(ok) FLEXT_LOG2("int arg %i = %f",ix,aargs[ix].ft); + break; + } + case a_int: { + if(IsFloat(argv[ix])) aargs[ix].it = (int)GetFloat(argv[ix]); + else if(IsInt(argv[ix])) aargs[ix].it = GetInt(argv[ix]); + else ok = false; + + if(ok) FLEXT_LOG2("float arg %i = %i",ix,aargs[ix].it); + break; + } + case a_symbol: { + if(IsSymbol(argv[ix])) aargs[ix].st = GetSymbol(argv[ix]); + else ok = false; + + if(ok) FLEXT_LOG2("symbol arg %i = %s",ix,GetString(aargs[ix].st)); + break; + } +#if FLEXT_SYS == FLEXT_SYS_PD + case a_pointer: { + if(IsPointer(argv[ix])) aargs[ix].pt = (t_gpointer *)GetPointer(argv[ix]); + else ok = false; + break; + } +#endif + default: + error("Argument type illegal"); + ok = false; + } + } + + if(ok && ix == argc) { + switch(argc) { + case 0: return ((methfun_0)m->fun)(this); + case 1: return ((methfun_1)m->fun)(this,aargs[0]); + case 2: return ((methfun_2)m->fun)(this,aargs[0],aargs[1]); + case 3: return ((methfun_3)m->fun)(this,aargs[0],aargs[1],aargs[2]); + case 4: return ((methfun_4)m->fun)(this,aargs[0],aargs[1],aargs[2],aargs[3]); + case 5: return ((methfun_5)m->fun)(this,aargs[0],aargs[1],aargs[2],aargs[3],aargs[4]); + default: + FLEXT_ASSERT(false); + } + } + } + } + } + return false; +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::TryMethAny(Item *lst,const t_symbol *s,int argc,const t_atom *argv) +{ + for(; lst; lst = lst->nxt) { + MethItem *m = (MethItem *)lst; + + if(!m->IsAttr() && m->argc == 1 && m->args[0] == a_any) { +// FLEXT_LOG4("found any method for %s: inlet=%i, symbol=%s, argc=%i",GetString(m->tag),m->inlet,GetString(s),argc); + + if(((methfun_A)m->fun)(this,s,argc,const_cast<t_atom *>(argv))) return true; + } + } + return false; +} + +/*! \brief Find a method item for a specific tag and arguments + \remark All attributes are also stored in the method list and retrieved by a member of the method item +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::FindMeth(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + Item *lst; + ItemCont *clmethhead = ClMeths(thisClassId()); + + // search for exactly matching tag + if(UNLIKELY(methhead) && (lst = methhead->FindList(s,inlet)) != NULL && TryMethTag(lst,s,argc,argv)) return true; + if((lst = clmethhead->FindList(s,inlet)) != NULL && TryMethTag(lst,s,argc,argv)) return true; + + // if nothing found try any inlet + if(UNLIKELY(methhead) && (lst = methhead->FindList(s,-1)) != NULL && TryMethTag(lst,s,argc,argv)) return true; + if((lst = clmethhead->FindList(s,-1)) != NULL && TryMethTag(lst,s,argc,argv)) return true; + + return false; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::FindMethAny(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + Item *lst; + ItemCont *clmethhead = ClMeths(thisClassId()); + + if(UNLIKELY(methhead) && (lst = methhead->FindList(sym_anything,inlet)) != NULL && TryMethAny(lst,s,argc,argv)) return true; + if((lst = clmethhead->FindList(sym_anything,inlet)) != NULL && TryMethAny(lst,s,argc,argv)) return true; + + // if nothing found try any inlet + if(UNLIKELY(methhead) && (lst = methhead->FindList(sym_anything,-1)) != NULL && TryMethAny(lst,s,argc,argv)) return true; + if((lst = clmethhead->FindList(sym_anything,-1)) != NULL && TryMethAny(lst,s,argc,argv)) return true; + + return false; +} + +/*! \brief All the message processing + The messages of all the inlets go here and are promoted to the registered callback functions +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::CbMethodHandler(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + static bool trap = false; + bool ret; + + curtag = s; + +#ifdef FLEXT_LOG_MSGS + post("methodmain inlet:%i args:%i symbol:%s",inlet,argc,s?GetString(s):""); +#endif + + try { + ret = FindMeth(inlet,s,argc,argv); +#ifdef FLEXT_LOG_MSGS + if(ret) post("found %s message in %s,%i",GetString(s),__FILE__,__LINE__); +#endif + if(ret) goto end; + + if(argc == 1) { + if(s == sym_list) { + // for 1-element lists try the single atom (this is the format output by [route]) + if(IsFloat(argv[0])) + ret = FindMeth(inlet,sym_float,1,argv); + else if(IsInt(argv[0])) + ret = FindMeth(inlet,sym_int,1,argv); + else if(IsSymbol(argv[0])) + ret = FindMeth(inlet,sym_symbol,1,argv); + #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) + else if(IsPointer(argv[0])) + ret = FindMeth(inlet,sym_pointer,1,argv); + #endif + if(ret) goto end; + } + else { + if(s == sym_float) { + #if FLEXT_SYS == FLEXT_SYS_MAX + t_atom at; + // If float message is not explicitly handled: try int handler instead + SetInt(at,(int)GetFloat(argv[0])); + ret = FindMeth(inlet,sym_int,1,&at); + if(ret) goto end; + #endif + // If not explicitly handled: try list handler instead + ret = FindMeth(inlet,sym_list,1,argv); + if(ret) goto end; + } + #if FLEXT_SYS == FLEXT_SYS_MAX + else if(s == sym_int) { + t_atom at; + // If int message is not explicitly handled: try float handler instead + SetFloat(at,(float)GetInt(argv[0])); + ret = FindMeth(inlet,sym_float,1,&at); + if(ret) goto end; + // If not explicitly handled: try list handler instead + ret = FindMeth(inlet,sym_list,1,argv); + if(ret) goto end; + } + #endif + else if(s == sym_symbol) { + ret = FindMeth(inlet,sym_list,1,argv); + if(ret) goto end; + } + #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) + else if(s == sym_pointer) { + ret = FindMeth(inlet,sym_list,1,argv); + if(ret) goto end; + } + #endif + } + } + else if(argc == 0) { + // If symbol message (pure anything without args) is not explicitly handled: try list handler instead + if(s == sym_bang) + // bang is equal to an empty list + ret = FindMeth(inlet,sym_list,0,NULL); + else { + t_atom at; + SetSymbol(at,s); + ret = FindMeth(inlet,sym_list,1,&at); + } +#ifdef FLEXT_LOG_MSGS + if(ret) post("found %s message in %s,%i",GetString(sym_list),__FILE__,__LINE__); +#endif + if(ret) goto end; + } + + // if distmsgs is switched on then distribute list elements over inlets (Max/MSP behavior) + if(DoDist() && inlet == 0 && s == sym_list && insigs <= 1 && !trap) { + int i = incnt; + if(i > argc) i = argc; + for(--i; i >= 0; --i) { // right to left distribution + const t_symbol *sym = NULL; + if(IsFloat(argv[i])) sym = sym_float; + else if(IsInt(argv[i])) sym = sym_int; + else if(IsSymbol(argv[i])) sym = sym_symbol; + #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) + else if(IsPointer(argv[i])) sym = sym_pointer; // can pointer atoms occur here? + #endif + + if(sym) { + trap = true; + CbMethodHandler(i,sym,1,argv+i); + trap = false; + } + } + + goto end; + } + + ret = FindMethAny(inlet,s,argc,argv); + + if(!ret) ret = CbMethodResort(inlet,s,argc,argv); + } + catch(std::exception &x) { + error("%s - %s: %s",thisName(),GetString(s),x.what()); + ret = false; + } + catch(const char *txt) { + error("%s - %s: %s",thisName(),GetString(s),txt); + ret = false; + } + catch(...) { + error("%s - %s : Unknown exception while processing method",thisName(),GetString(s)); + ret = false; + } + +end: + curtag = NULL; + + return ret; // true if appropriate handler was found and called +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + post("%s: message unhandled - inlet:%i args:%i symbol:%s",thisName(),inlet,argc,s?GetString(s):""); + return false; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::CbMethodResort(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + // call deprecated version + return m_method_(inlet,s,argc,argv); +} + +#include "flpopns.h" + +#endif // __FLEXT_MSG_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flout.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flout.cpp new file mode 100755 index 0000000000000000000000000000000000000000..ad5caa26f3771d0ff18b2d95e0f7d6ecf77a84bb --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flout.cpp @@ -0,0 +1,374 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flout.cpp + \brief Implementation of the flext outlet functionality. +*/ + +#ifndef __FLEXT_OUT_CPP +#define __FLEXT_OUT_CPP + +#include "flext.h" +#include "flinternal.h" +#include <cstring> + +#include "flpushns.h" + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToSysAtom(int n,const t_atom &at) const +{ + outlet *o = GetOut(n); + if(LIKELY(o)) { + CRITON(); + if(IsSymbol(at)) + outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(GetSymbol(at))); + else if(IsFloat(at)) + outlet_float((t_outlet *)o,GetFloat(at)); +#if FLEXT_SYS == FLEXT_SYS_MAX + else if(IsInt(at)) + outlet_flint((t_outlet *)o,GetInt(at)); +#endif +#if FLEXT_SYS == FLEXT_SYS_PD + else if(IsPointer(at)) + outlet_pointer((t_outlet *)o,GetPointer(at)); +#endif + else + error("Atom type not supported"); + CRITOFF(); + } +} +#else +#error Not implemented +#endif + +#if defined(FLEXT_THREADS) + #if FLEXT_QMODE == 2 + #define CHKTHR() (LIKELY((!IsThreadRegistered() || IsThread(flext::thrmsgid)) && !InDSP())) + #else + #define CHKTHR() (LIKELY(!IsThreadRegistered() && !InDSP())) + #endif +#else + #define CHKTHR() (LIKELY(!InDSP())) +#endif + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutBang(int n) const +{ + if(CHKTHR()) ToSysBang(n); else ToQueueBang(n); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutFloat(int n,float f) const +{ + if(CHKTHR()) ToSysFloat(n,f); else ToQueueFloat(n,f); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutInt(int n,int f) const +{ + if(CHKTHR()) ToSysInt(n,f); else ToQueueInt(n,f); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutSymbol(int n,const t_symbol *s) const +{ + if(CHKTHR()) ToSysSymbol(n,s); else ToQueueSymbol(n,s); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutAtom(int n,const t_atom &at) const +{ + if(CHKTHR()) ToSysAtom(n,at); else ToQueueAtom(n,at); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutList(int n,int argc,const t_atom *argv) const +{ + if(CHKTHR()) ToSysList(n,argc,argv); else ToQueueList(n,argc,argv); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(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); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ToOutMsg(MsgBundle *mb) +{ + if(CHKTHR()) ToSysMsg(mb); else ToQueueMsg(mb); +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Forward(const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) +{ + return CHKTHR()?SysForward(recv,s,argc,argv):QueueForward(recv,s,argc,argv); +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::InitInlets() +{ + bool ok = true; + + // incnt has number of inlets (any type) + // insigs should be 0 + + FLEXT_ASSERT(!insigs && !inlets); + + // ---------------------------------- + // create inlets + // ---------------------------------- + +#if FLEXT_SYS == FLEXT_SYS_MAX + // copy inlet descriptions + indesc = new char *[incnt]; + for(int i = 0; i < incnt; ++i) { + xlet &x = inlist[i]; + indesc[i] = x.desc; + x.desc = NULL; + } +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + inlets = incnt > 1?new px_object *[incnt-1]:NULL; +#endif + + // type info is now in list array +#if FLEXT_SYS == FLEXT_SYS_PD + { + int cnt = 0; + if(incnt >= 1) { + xlet &xi = inlist[0]; // points to first inlet + if(xi.tp == xlet_sig) ++insigs; + // else leftmost inlet is already there... + ++cnt; + +#if PD_MINOR_VERSION >= 37 && defined(PD_DEVEL_VERSION) + // set tooltip +// this is on a per-class basis... we cannot really use it here +// if(xi.desc && *xi.desc) class_settip(thisClass(),gensym(xi.desc)); +#endif + } + + for(int ix = 1; ix < incnt; ++ix,++cnt) { + xlet &xi = inlist[ix]; // points to first inlet + t_inlet *in = NULL; + switch(xi.tp) { + case xlet_float: + case xlet_int: { + if(ix > 9) { + // proxy inlet needed + (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages + in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, (t_symbol *)sym_float, (t_symbol *)sym_float); + } + else { + inlets[ix-1] = NULL; + static char sym[] = " ft ?"; + sym[4] = '0'+ix; + in = inlet_new(&x_obj->obj, &x_obj->obj.ob_pd, (t_symbol *)sym_float, gensym(sym)); + } + break; + } + case xlet_sym: + (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages + in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, (t_symbol *)sym_symbol, (t_symbol *)sym_symbol); + break; + case xlet_list: + (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages + in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, (t_symbol *)sym_list, (t_symbol *)sym_list); + break; + case xlet_any: + (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages + in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, 0, 0); + break; + case xlet_sig: + inlets[ix-1] = NULL; +#ifdef FLEXT_COMPATIBLE + if(inlist[ix-1].tp != xlet_sig) { + post("%s: All signal inlets must be left-aligned in compatibility mode",thisName()); + ok = false; + } + else +#endif + { + // pd is not able to handle signals and messages into the same inlet... + in = inlet_new(&x_obj->obj, &x_obj->obj.ob_pd, (t_symbol *)sym_signal, (t_symbol *)sym_signal); + ++insigs; + } + break; + default: + inlets[ix-1] = NULL; + error("%s: Wrong type for inlet #%i: %i",thisName(),ix,(int)inlist[ix].tp); + ok = false; + } + +#if PD_MINOR_VERSION >= 37 && defined(PD_DEVEL_VERSION) + // set tooltip + if(in && xi.desc && *xi.desc) inlet_settip(in,gensym(xi.desc)); +#endif + } + + incnt = cnt; + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + { + int ix,cnt; + // count leftmost signal inlets + while(insigs < incnt && inlist[insigs].tp == xlet_sig) ++insigs; + + for(cnt = 0,ix = incnt-1; ix >= insigs; --ix,++cnt) { + xlet &xi = inlist[ix]; + if(!ix) { + if(xi.tp != xlet_any) { + error("%s: Leftmost inlet must be of type signal or anything",thisName()); + ok = false; + } + } + else { + FLEXT_ASSERT(inlets); + switch(xi.tp) { + case xlet_sig: + inlets[ix-1] = NULL; + error("%s: All signal inlets must be left-aligned",thisName()); + ok = false; + break; + case xlet_float: { + if(ix < 10) { + inlets[ix-1] = NULL; + floatin(x_obj,ix); + break; + } + else + goto makeproxy; + } + case xlet_int: { + if(ix < 10) { + inlets[ix-1] = NULL; + intin(x_obj,ix); + break; + } + else + goto makeproxy; + } + makeproxy: + case xlet_any: // non-leftmost + case xlet_sym: + case xlet_list: + inlets[ix-1] = (px_object *)proxy_new(x_obj,ix,&((flext_hdr *)x_obj)->curinlet); + break; + default: + inlets[ix-1] = NULL; + error("%s: Wrong type for inlet #%i: %i",thisName(),ix,(int)xi.tp); + ok = false; + } + } + } + + if(inlets) + while(ix >= 0) inlets[ix--] = NULL; + } +#else +#error +#endif + + return ok; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::InitOutlets() +{ + bool ok = true; + int procattr = HasAttributes()?1:0; + + // outcnt has number of inlets (any type) + // outsigs should be 0 + + FLEXT_ASSERT(outsigs == 0); + + // ---------------------------------- + // create outlets + // ---------------------------------- + +#if FLEXT_SYS == FLEXT_SYS_MAX + // for Max/MSP the rightmost outlet has to be created first + outlet *attrtmp = NULL; + if(procattr) + attrtmp = (outlet *)newout_anything(thisHdr()); +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX + // copy outlet descriptions + outdesc = new char *[outcnt]; + for(int i = 0; i < outcnt; ++i) { + xlet &xi = outlist[i]; + outdesc[i] = xi.desc; + xi.desc = NULL; + } +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + if(outcnt+procattr) + outlets = new outlet *[outcnt+procattr]; + else + outlets = NULL; + + // type info is now in list array +#if FLEXT_SYS == FLEXT_SYS_PD + for(int ix = 0; ix < outcnt; ++ix) +#elif FLEXT_SYS == FLEXT_SYS_MAX + for(int ix = outcnt-1; ix >= 0; --ix) +#else +#error +#endif + { + switch(outlist[ix].tp) { + case xlet_float: + outlets[ix] = (outlet *)newout_float(&x_obj->obj); + break; + case xlet_int: + outlets[ix] = (outlet *)newout_flint(&x_obj->obj); + break; + case xlet_sig: + outlets[ix] = (outlet *)newout_signal(&x_obj->obj); + ++outsigs; + break; + case xlet_sym: + outlets[ix] = (outlet *)newout_symbol(&x_obj->obj); + break; + case xlet_list: + outlets[ix] = (outlet *)newout_list(&x_obj->obj); + break; + case xlet_any: + outlets[ix] = (outlet *)newout_anything(&x_obj->obj); + break; + default: + ; +#ifdef FLEXT_DEBUG + ERRINTERNAL(); +#endif + ok = false; + } + } +#else +#error +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + if(procattr) { + // attribute dump outlet is the last one + outlets[outcnt] = +#if FLEXT_SYS == FLEXT_SYS_PD + // attribute dump outlet is the last one + (outlet *)newout_anything(&x_obj->obj); +#elif FLEXT_SYS == FLEXT_SYS_MAX + attrtmp; +#endif + + } +#endif + + return ok; +} + +#include "flpopns.h" + +#endif // __FLEXT_OUT_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flpopns.h b/externals/grill/trunk/flext/libbuild/include/flext/flpopns.h new file mode 100755 index 0000000000000000000000000000000000000000..d5dfa5a9b4f773290a9a367935b15c38f2e055c1 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flpopns.h @@ -0,0 +1,33 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +#ifdef FLEXT_USE_NAMESPACE + +#ifndef _FLEXT_IN_NAMESPACE + #error flext namespace pop is unbalanced +#endif + +#define __FLEXT_IN_NAMESPACE (_FLEXT_IN_NAMESPACE-1) +#undef _FLEXT_IN_NAMESPACE +#define _FLEXT_IN_NAMESPACE __FLEXT_IN_NAMESPACE +#undef __FLEXT_IN_NAMESPACE + +#if _FLEXT_IN_NAMESPACE == 0 + + #if 1 //defined(FLEXT_SHARED) + } // namespace + using namespace flext_ns; + #elif defined(__GNUC__) + } // anonymous namespace (don't export symbols) + #endif + + #undef _FLEXT_IN_NAMESPACE + +#endif + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flprefix.h b/externals/grill/trunk/flext/libbuild/include/flext/flprefix.h new file mode 100755 index 0000000000000000000000000000000000000000..edcb1d8a75d20b4da03de992e008c6cc3c0364e8 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flprefix.h @@ -0,0 +1,462 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flprefix.h + \brief Try to find out the platform. +*/ + +#ifndef __FLEXT_PREFIX_H +#define __FLEXT_PREFIX_H + +// --- definitions for FLEXT_SYS --------------------- +#define FLEXT_SYS_UNKNOWN 0 + +#ifndef FLEXT_SYS_MAX + #define FLEXT_SYS_MAX 1 +#else + // already defined + #undef FLEXT_SYS_MAX + #define FLEXT_SYS_MAX 1 + #define FLEXT_SYS FLEXT_SYS_MAX +#endif + +#ifndef FLEXT_SYS_PD + #define FLEXT_SYS_PD 2 +#else + // already defined + #undef FLEXT_SYS_PD + #define FLEXT_SYS_PD 2 + #define FLEXT_SYS FLEXT_SYS_PD +#endif + +#ifndef FLEXT_SYS_JMAX + #define FLEXT_SYS_JMAX 3 +#else + // already defined + #undef FLEXT_SYS_JMAX + #define FLEXT_SYS_JMAX 3 + #define FLEXT_SYS FLEXT_SYS_JMAX +#endif + +// --- definitions for FLEXT_OS ---------------------- +#define FLEXT_OS_UNKNOWN 0 +#define FLEXT_OS_WIN 1 +#define FLEXT_OS_MAC 2 +#define FLEXT_OS_LINUX 3 +#define FLEXT_OS_IRIX 4 + +// --- definitions for FLEXT_OS_API --------------------- +#define FLEXT_OSAPI_UNKNOWN 0 + +#define FLEXT_OSAPI_UNIX_POSIX 1 + +#define FLEXT_OSAPI_MAC_CLASSIC 2 +#define FLEXT_OSAPI_MAC_CARBON 3 +#define FLEXT_OSAPI_MAC_MACH 4 + +#define FLEXT_OSAPI_WIN_NATIVE 5 // WIN32 Platform +#define FLEXT_OSAPI_WIN_POSIX 6 // POSIX API (e.g. cygwin) + +// --- definitions for FLEXT_CPU --------------------- +#define FLEXT_CPU_UNKNOWN 0 +#define FLEXT_CPU_IA32 1 +#define FLEXT_CPU_PPC 2 +#define FLEXT_CPU_MIPS 3 +#define FLEXT_CPU_ALPHA 4 + +#define FLEXT_CPU_IA64 5 // Itanium +#define FLEXT_CPU_X86_64 6 // AMD-K8, EMT64 +#define FLEXT_CPU_PPC64 7 // G5 in 64 bit mode + +// compatibility +#define FLEXT_CPU_INTEL FLEXT_CPU_IA32 + +// --- definitions for FLEXT_THREADS ----------------- +#define FLEXT_THR_POSIX 1 // pthreads +#define FLEXT_THR_WIN32 2 // Win32 native +#define FLEXT_THR_MP 3 // MacOS MPThreads + +// --------------------------------------------------- +// support old definitions + +#ifndef FLEXT_SYS + #if defined(MAXMSP) + #define FLEXT_SYS FLEXT_SYS_MAX + // #undef MAXMSP + #elif defined(PD) + #define FLEXT_SYS FLEXT_SYS_PD + // #undef PD + // #undef NT + #endif +#endif + +#if defined(_DEBUG) && !defined(FLEXT_DEBUG) + #define FLEXT_DEBUG +#endif + +// --------------------------------------------------- + +// Definition of supported real-time systems +#if FLEXT_SYS == FLEXT_SYS_MAX || FLEXT_SYS == FLEXT_SYS_PD +#else + #error "System must be defined by either FLEXT_SYS_MAX or FLEXT_SYS_PD" +#endif + +// Definition of OS/CPU +#if defined(_MSC_VER) || (defined(__ICC) && (FLEXT_OS == FLEXT_OS_WIN || defined(_WIN32))) + // Microsoft C++ + // and Intel C++ (as guessed) + + #ifndef FLEXT_CPU + #if defined(_M_AMD64) + #define FLEXT_CPU FLEXT_CPU_X86_64 + #elif defined(_M_IA64) + #define FLEXT_CPU FLEXT_CPU_IA64 + #elif defined(_M_IX86) + #define FLEXT_CPU FLEXT_CPU_IA32 + #elif defined(_M_PPC) + #define FLEXT_CPU FLEXT_CPU_PPC + #elif defined(_M_MRX000) + #define FLEXT_CPU FLEXT_CPU_MIPS + #elif defined(_M_ALPHA) + #define FLEXT_CPU FLEXT_CPU_ALPHA + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(_WIN32) || defined(_WIN64) + #define FLEXT_OS FLEXT_OS_WIN + #define FLEXT_OSAPI FLEXT_OSAPI_WIN_NATIVE + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + #endif + + +#elif defined(__BORLANDC__) + // Borland C++ + + #ifndef FLEXT_CPU + #define FLEXT_CPU FLEXT_CPU_INTEL + #endif + #ifndef FLEXT_OS + #define FLEXT_OS FLEXT_OS_WIN + #define FLEXT_OSAPI FLEXT_OSAPI_WIN_NATIVE + #else + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + + +#elif defined(__MWERKS__) + // Metrowerks CodeWarrior + + #ifdef __MACH__ + // quick fix for OSX Mach-O + #ifdef __POWERPC__ + #ifdef __LP64__ + #define TARGET_CPU_PPC64 1 + #else + #define TARGET_CPU_PPC 1 + #endif + #else + #ifdef __LP64__ + #define TARGET_CPU_X86_64 1 + #else + #define TARGET_CPU_IA32 1 + #endif + #endif + #define TARGET_OS_MAC 1 + #define TARGET_API_MAC_OSX 1 + #else + #ifndef __CONDITIONALMACROS__ + #include <ConditionalMacros.h> + #endif + #endif + + #ifndef FLEXT_CPU + #if TARGET_CPU_X86_64 + #define FLEXT_CPU FLEXT_CPU_X86_64 + #elif TARGET_CPU_X86 + #define FLEXT_CPU FLEXT_CPU_IA32 + #elif TARGET_CPU_PPC64 + #define FLEXT_CPU FLEXT_CPU_PPC64 + #elif TARGET_CPU_PPC + #define FLEXT_CPU FLEXT_CPU_PPC + #elif TARGET_CPU_MIPS + #define FLEXT_CPU FLEXT_CPU_MIPS + #elif TARGET_CPU_ALPHA + #define FLEXT_CPU FLEXT_CPU_ALPHA + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if TARGET_OS_MAC + #define FLEXT_OS FLEXT_OS_MAC + #elif TARGET_OS_WIN32 + // assume Windows + #define FLEXT_OS FLEXT_OS_WIN + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OSAPI + #if TARGET_API_MAC_MACH + // this is for Mach-O + // this has the precedence (MACH also supports Carbon, of course) + #define FLEXT_OSAPI FLEXT_OSAPI_MAC_MACH + #elif TARGET_API_MAC_CARBON + // this is for CFM + #define FLEXT_OSAPI FLEXT_OSAPI_MAC_CARBON + #else + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + #endif + + // This is important for method and attribute callbacks + #pragma enumsalwaysint on + // This is important for everything + #pragma bool on + +#elif defined(__GNUG__) || (defined(__ICC) && (FLEXT_OS == FLEXT_OS_LINUX || defined(linux) || defined(__linux__))) + + // GNU C++ + // and Intel (as suggested by Tim Blechmann) + + #ifndef FLEXT_CPU + #if defined(__x86_64__) + #define FLEXT_CPU FLEXT_CPU_X86_64 + #elif defined(_X86_) || defined(__i386__) || defined(__i586__) || defined(__i686__) + #define FLEXT_CPU FLEXT_CPU_IA32 + #elif defined(__ppc64__) + #define FLEXT_CPU FLEXT_CPU_PPC64 + #elif defined(__ppc__) + #define FLEXT_CPU FLEXT_CPU_PPC + #elif defined(__MIPS__) + #define FLEXT_CPU FLEXT_CPU_MIPS + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(linux) || defined(__linux__) + #define FLEXT_OS FLEXT_OS_LINUX + #elif defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__MINGW32__) + #define FLEXT_OS FLEXT_OS_WIN + #elif defined(__APPLE__) && defined(__MACH__) + #define FLEXT_OS FLEXT_OS_MAC + // how about IRIX?? + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OSAPI + #if FLEXT_OS == FLEXT_OS_MAC + #define FLEXT_OSAPI FLEXT_OSAPI_MAC_MACH + #elif FLEXT_OS == FLEXT_OS_WIN + #if defined(__MINGW32__) + #define FLEXT_OSAPI FLEXT_OSAPI_WIN_NATIVE + #else + #define FLEXT_OSAPI FLEXT_OSAPI_WIN_POSIX + #endif + #elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX + #define FLEXT_OSAPI FLEXT_OSAPI_UNIX_POSIX + #else + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + #endif + +#elif defined(__MRC__) && defined(MPW_CPLUS) + // Apple MPW MrCpp + + #if __MRC__ < 0x500 + #error Apple MPW MrCpp v.5.0.0 or later compiler required + #endif + + #ifndef FLEXT_CPU + #if defined(__POWERPC__) + #define FLEXT_CPU FLEXT_CPU_PPC + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(macintosh) + #define FLEXT_OS FLEXT_OS_MAC + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OSAPI + #if FLEXT_OS == FLEXT_OS_MAC + #define FLEXT_OSAPI FLEXT_OSAPI_MAC_CLASSIC + #else + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + #endif +#endif + + + +#if FLEXT_OS == FLEXT_OS_WIN +// #pragma message("Compiling for Windows") + + #if FLEXT_SYS == FLEXT_SYS_MAX +// #define WIN_VERSION 1 + #elif FLEXT_SYS == FLEXT_SYS_PD +// #define PD +// #define NT + #endif +#elif FLEXT_OS == FLEXT_OS_LINUX +// #pragma message("Compiling for Linux") + + #if FLEXT_SYS == FLEXT_SYS_PD +// #define PD + #else + #error "Flext SYS/OS combination unknown" + #endif +#elif FLEXT_OS == FLEXT_OS_IRIX +// #pragma message("Compiling for Irix") + + #if FLEXT_SYS == FLEXT_SYS_PD +// #define PD + #else + #error "Flext SYS/OS combination unknown" + #endif +#elif FLEXT_OS == FLEXT_OS_MAC +// #pragma message("Compiling for MacOS") + + #if FLEXT_SYS == FLEXT_SYS_PD +// #define PD + #endif +#else + #error "Operating system could not be determined" +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX +// #pragma message("Compiling for Max/MSP") +#elif FLEXT_SYS == FLEXT_SYS_PD +// #pragma message("Compiling for PD") +#endif + +// ----- set threading model ----- +// shared builds are always threaded +#ifdef FLEXT_SHARED + #undef FLEXT_THREADS + #define FLEXT_THREADS +#endif + +#ifdef FLEXT_THREADS + #undef FLEXT_THREADS + #if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_MAC && FLEXT_OSAPI != FLEXT_OSAPI_MAC_MACH + // Max for CFM doesn't like posix threads + #define FLEXT_THREADS FLEXT_THR_MP + #elif FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN + // for wmax use native Windows threads + #define FLEXT_THREADS FLEXT_THR_WIN32 + #else + #define FLEXT_THREADS FLEXT_THR_POSIX + #endif +#endif + +// ----- macros for class names ----- +/* + With linux (flat linker namespace) and more than one flext-based external loaded all calls to static + exported functions refer to the first instance loaded! + Therefore different class names are used so that the correct type of flext function is called. +*/ +#ifdef __DOXYGEN__ + #define FLEXT_CLASSDEF(CL) CL +#elif defined(FLEXT_DEBUG) + #if defined(FLEXT_SHARED) + #define FLEXT_CLASSDEF(CL) CL##_shared_d + #elif defined(FLEXT_THREADS) + #define FLEXT_CLASSDEF(CL) CL##_multi_d + #else + #define FLEXT_CLASSDEF(CL) CL##_single_d + #endif +#else + #if defined(FLEXT_SHARED) + #define FLEXT_CLASSDEF(CL) CL##_shared + #elif defined(FLEXT_THREADS) + #define FLEXT_CLASSDEF(CL) CL##_multi + #else + #define FLEXT_CLASSDEF(CL) CL##_single + #endif +#endif + + +/* Set the right calling convention (and exporting) for the OS */ + +#if defined(_MSC_VER) + #ifdef FLEXT_SHARED + // for compiling a shared flext library FLEXT_EXPORTS must be defined + #ifdef FLEXT_EXPORTS + #define FLEXT_SHARE __declspec(dllexport) + #else + #define FLEXT_SHARE __declspec(dllimport) + #endif + #else + #define FLEXT_SHARE + #endif + #define FLEXT_EXT __declspec(dllexport) +#else // other OS's + #define FLEXT_SHARE + #define FLEXT_EXT +#endif + + +// std namespace +#ifdef __MWERKS__ +# define STD std +#else +# define STD +#endif + +// branching hints +#if __GNUC__ >= 3 +# ifndef LIKELY +# define LIKELY(expression) (__builtin_expect(!!(expression), 1)) +# endif +# ifndef UNLIKELY +# define UNLIKELY(expression) (__builtin_expect(!!(expression), 0)) +# endif +#else +# ifndef LIKELY +# define LIKELY(expression) (expression) +# endif +# ifndef UNLIKELY +# define UNLIKELY(expression) (expression) +# endif +#endif + +// macro definitions for inline flext usage +#ifdef FLEXT_INLINE +# define FLEXT_TEMPLATE template<typename flext_T> +# define FLEXT_TEMPIMPL(fun) template<typename flext_T> fun<flext_T> +# define FLEXT_TEMPINST(fun) fun<void> +# define FLEXT_TEMPSUB(fun) typename fun<flext_T> +# define FLEXT_TEMP_TYPENAME typename +#else +# define FLEXT_TEMPLATE +# define FLEXT_TEMPIMPL(fun) fun +# define FLEXT_TEMPINST(fun) fun +# define FLEXT_TEMPSUB(fun) fun +# define FLEXT_TEMP_TYPENAME +#endif + +#endif // __FLEXT_PREFIX_H diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flproxy.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flproxy.cpp new file mode 100755 index 0000000000000000000000000000000000000000..71b78a8e25ed744dc1b8c67e83297f602844f6b1 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flproxy.cpp @@ -0,0 +1,245 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flproxy.cpp + \brief Proxy classes for the flext base class. +*/ + +#ifndef __FLEXT_PROXY_CPP +#define __FLEXT_PROXY_CPP + +#include "flext.h" +#include "flinternal.h" + +#include "flpushns.h" + +// === proxy class for flext_base ============================ + +#if FLEXT_SYS == FLEXT_SYS_PD + +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_base))::px_class = NULL; + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_bang(px_object *obj) +{ + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,sym_bang,0,NULL); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_float(px_object *obj,t_float f) +{ + t_atom a; SetFloat(a,f); + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,sym_float,1,&a); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_symbol(px_object *obj,const t_symbol *s) +{ + t_atom a; SetSymbol(a,s); + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,sym_symbol,1,&a); +} + +/* +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_pointer(px_object *obj,const t_gpointer *p) +{ + t_atom a; SetPointer(a,p); + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,sym_pointer,1,&a); +} +*/ + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_anything(px_object *obj,const t_symbol *s,int argc,t_atom *argv) +{ + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,s,argc,argv); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_bang(flext_hdr *c) +{ + Locker lock(c); + thisObject(c)->CbMethodHandler(0,sym_bang,0,NULL); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_float(flext_hdr *c,t_float f) +{ + t_atom a; SetFloat(a,f); + Locker lock(c); + thisObject(c)->CbMethodHandler(0,sym_float,1,&a); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_symbol(flext_hdr *c,const t_symbol *s) +{ + t_atom a; SetSymbol(a,s); + Locker lock(c); + thisObject(c)->CbMethodHandler(0,sym_symbol,1,&a); +} + +/* +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_pointer(flext_hdr *c,const t_gpointer *p) +{ + t_atom a; SetPointer(a,p); + Locker lock(c); + thisObject(c)->CbMethodHandler(0,sym_pointer,1,&a); +} +*/ + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv) +{ + Locker lock(c); + if(UNLIKELY(!s)) { + // apparently, this happens only in one case... object is a DSP object, but has no main DSP inlet... + + // interpret tag from args + if(!argc) + s = sym_bang; + else if(argc == 1) { + if(IsFloat(*argv)) + s = sym_float; + else if(IsSymbol(*argv)) + s = sym_symbol; + else if(IsPointer(*argv)) + s = sym_pointer; + else + FLEXT_ASSERT(false); + } + else + s = sym_list; + } + + thisObject(c)->CbMethodHandler(0,s,argc,argv); +} + +#define DEF_PROXYMSG(IX) \ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_ft ## IX(flext_hdr *c,t_float v) { t_atom atom; SetFloat(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); } + +#define ADD_PROXYMSG(c,IX) \ +add_method1(c,cb_px_ft ## IX," ft " #IX,A_FLOAT) + +//AddMethod(c,0,flext::MakeSymbol("ft" #IX),cb_px_ft ## IX) + + +#elif FLEXT_SYS == FLEXT_SYS_MAX + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv) +{ + Locker lock(c); + int const ci = proxy_getinlet((t_object *)&c->obj); +// post("%s %i, cb_anything(%i)",__FILE__,__LINE__,ci); + thisObject(c)->CbMethodHandler(ci,s,argc,argv); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_int(flext_hdr *c,long v) +{ + t_atom atom; SetInt(atom,v); + Locker lock(c); + int const ci = proxy_getinlet((t_object *)&c->obj); + thisObject(c)->CbMethodHandler(ci,sym_int,1,&atom); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_float(flext_hdr *c,double v) +{ + t_atom atom; SetFloat(atom,v); + Locker lock(c); + int const ci = proxy_getinlet((t_object *)&c->obj); + thisObject(c)->CbMethodHandler(ci,sym_float,1,&atom); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_bang(flext_hdr *c) +{ + Locker lock(c); + int const ci = proxy_getinlet((t_object *)&c->obj); + thisObject(c)->CbMethodHandler(ci,sym_bang,0,NULL); +} + + +#define DEF_PROXYMSG(IX) \ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); } + +/* +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); } +*/ + +#define ADD_PROXYMSG(c,IX) \ +addinx((method)(cb_px_in ## IX),IX); \ +addftx((method)(cb_px_ft ## IX),IX) + +/* +add_method1(c,cb_px_in ## IX,"in" #IX,A_INT); \ +add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT) + +AddMethod(c,0,flext::MakeSymbol("in" #IX),cb_px_in ## IX); \ +AddMethod(c,0,flext::MakeSymbol("ft" #IX),cb_px_ft ## IX) +*/ + +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + +DEF_PROXYMSG(1) +DEF_PROXYMSG(2) +DEF_PROXYMSG(3) +DEF_PROXYMSG(4) +DEF_PROXYMSG(5) +DEF_PROXYMSG(6) +DEF_PROXYMSG(7) +DEF_PROXYMSG(8) +DEF_PROXYMSG(9) + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::SetProxies(t_class *c,bool dsp) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + // for leftmost inlet + class_addbang(c,cb_bang); + if(!dsp) class_addfloat(c,cb_float); + class_addsymbol(c,cb_symbol); +// class_addpointer(c,cb_pointer); + class_addlist(c,cb_anything); + class_addanything(c,cb_anything); + + // proxy for extra inlets + if(UNLIKELY(!px_class)) { + // only once + px_class = class_new(gensym(const_cast<char *>(" flext_base proxy ")),NULL,NULL,sizeof(px_object),CLASS_PD|CLASS_NOINLET, A_NULL); + class_addbang(px_class,px_object::px_bang); // for other inlets + class_addfloat(px_class,px_object::px_float); // for other inlets + class_addsymbol(px_class,px_object::px_symbol); // for other inlets +// class_addpointer(px_class,px_object::px_pointer); // for other inlets + class_addlist(px_class,px_object::px_anything); // for other inlets + class_addanything(px_class,px_object::px_anything); // for other inlets + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + addbang((method)cb_bang); + addint((method)cb_int); + addfloat((method)cb_float); + addmess((method)cb_anything,const_cast<char *>("list"),A_GIMME,A_NOTHING); // must be explicitly given, otherwise list elements are distributed over inlets + addmess((method)cb_anything,const_cast<char *>("anything"),A_GIMME,A_NOTHING); +#else +#error Not implemented! +#endif + + // setup non-leftmost ints and floats + ADD_PROXYMSG(c,1); + ADD_PROXYMSG(c,2); + ADD_PROXYMSG(c,3); + ADD_PROXYMSG(c,4); + ADD_PROXYMSG(c,5); + ADD_PROXYMSG(c,6); + ADD_PROXYMSG(c,7); + ADD_PROXYMSG(c,8); + ADD_PROXYMSG(c,9); +} +#endif + +#include "flpopns.h" + +#endif // __FLEXT_PROXY_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flpushns.h b/externals/grill/trunk/flext/libbuild/include/flext/flpushns.h new file mode 100755 index 0000000000000000000000000000000000000000..9f7ad812e8f9b15807d66784a284f34be111c16d --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flpushns.h @@ -0,0 +1,30 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +#ifdef FLEXT_USE_NAMESPACE + +#ifndef _FLEXT_IN_NAMESPACE + #define _FLEXT_IN_NAMESPACE 0 +#endif + +#if _FLEXT_IN_NAMESPACE == 0 + + #if 1 //defined(FLEXT_SHARED) + namespace flext_ns { + #elif defined(__GNUC__) + namespace { // anonymous namespace (don't export symbols) + #endif + +#endif + +#define __FLEXT_IN_NAMESPACE (_FLEXT_IN_NAMESPACE+1) +#undef _FLEXT_IN_NAMESPACE +#define _FLEXT_IN_NAMESPACE __FLEXT_IN_NAMESPACE +#undef __FLEXT_IN_NAMESPACE + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flqueue.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flqueue.cpp new file mode 100755 index 0000000000000000000000000000000000000000..831bce55f1be25835d44bb6fa80c0b0af440bb5f --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flqueue.cpp @@ -0,0 +1,704 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flqueue.cpp + \brief Implementation of the flext message queuing functionality. + + \todo Let's see if queuing can be implemented for Max/MSP with defer_low + + if FLEXT_PDLOCK is defined, the new PD thread lock functions are used +*/ + +#ifndef __FLEXT_QUEUE_CPP +#define __FLEXT_QUEUE_CPP + +#include "flext.h" +#include "flinternal.h" +#include "flcontainers.h" +#include <cstring> // for memcpy + +#include "flpushns.h" + +#ifdef FLEXT_THREADS +//! Thread id of message queue thread +FLEXT_TEMPIMPL(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext))::thrid_t FLEXT_CLASSDEF(flext))::thrmsgid; +#endif + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::qustarted = false; + +#ifdef FLEXT_SHARED +/* + For the shared version it _should_ be possible to have only one queue for all externals. + Yet I don't know how to do this cross-platform +*/ +#define PERMANENTIDLE +#endif + +FLEXT_TEMPLATE void Trigger(); + +FLEXT_TEMPLATE +class QueueFifo + : public PooledFifo<flext::MsgBundle> +{ +public: + ~QueueFifo(); +}; + +FLEXT_TEMPLATE +class Queue: + public flext, + public FLEXT_TEMPINST(QueueFifo) +{ +public: + inline bool Empty() const { return !Avail(); } + + void Push(MsgBundle *m); // defined after MsgBundle (gcc 3.3. won't take it otherwise...) +}; + +FLEXT_TEMPLATE +struct QVars { +#if FLEXT_QMODE == 2 + static flext::ThrCond *qthrcond; +#elif FLEXT_QMODE == 0 + static t_clock *qclk; +#endif + static FLEXT_TEMPINST(Queue) *queue; +}; + +#if FLEXT_QMODE == 2 +FLEXT_TEMPIMPL(flext::ThrCond *QVars)::qthrcond = NULL; +#elif FLEXT_QMODE == 0 +FLEXT_TEMPIMPL(t_clock *QVars)::qclk = NULL; +#endif +FLEXT_TEMPIMPL(FLEXT_TEMPINST(Queue) *QVars)::queue = NULL; + + + +#define STATSIZE 8 + +FLEXT_TEMPIMPL(class FLEXT_CLASSDEF(flext))::MsgBundle: + public flext, + public FifoCell +{ +public: + static MsgBundle *New() + { + MsgBundle *m = FLEXT_TEMPINST(QVars)::queue->New(); + m->msg.Init(); + return m; + } + + static void Free(MsgBundle *m) + { + for(Msg *mi = m->msg.nxt; mi; ) { + Msg *mn = mi->nxt; + mi->Free(); + delete mi; + mi = mn; + } + m->msg.Free(); + FLEXT_TEMPINST(QVars)::queue->Free(m); + } + + bool BelongsTo(flext_base *t) const + { + return !msg.nxt && msg.BelongsTo(t); + } + + void Idle(flext_base *t) + { + Get()->Idle(t); + } + + void Idle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv) + { + Get()->Idle(idlefun,argc,argv); + } + + inline MsgBundle &Add(flext_base *t,int o,const t_symbol *s,int ac,const t_atom *av) + { + Get()->Set(t,o,s,ac,av); + return *this; + } + + inline MsgBundle &Add(const t_symbol *r,const t_symbol *s,int ac,const t_atom *av) + { + Get()->Set(r,s,ac,av); + return *this; + } + + inline MsgBundle &Add(flext_base *th,int o) // bang + { + return Add(th,o,sym_bang,0,NULL); + } + + inline MsgBundle &Add(flext_base *th,int o,float dt) + { + t_atom at; + SetFloat(at,dt); + return Add(th,o,sym_float,1,&at); + } + + inline MsgBundle &Add(flext_base *th,int o,int dt) + { + t_atom at; + SetInt(at,dt); + const t_symbol *sym; +#if FLEXT_SYS == FLEXT_SYS_PD + sym = sym_float; +#elif FLEXT_SYS == FLEXT_SYS_MAX + sym = sym_int; +#else +#error Not implemented! +#endif + return Add(th,o,sym,1,&at); + } + + inline MsgBundle &Add(flext_base *th,int o,const t_symbol *dt) + { + t_atom at; + SetSymbol(at,dt); + return Add(th,o,sym_symbol,1,&at); + } + + inline MsgBundle &Add(flext_base *th,int o,const t_atom &a) + { + const t_symbol *sym; + if(IsSymbol(a)) + sym = sym_symbol; + else if(IsFloat(a)) + sym = sym_float; +#if FLEXT_SYS == FLEXT_SYS_MAX + else if(IsInt(a)) + sym = sym_int; +#endif +#if FLEXT_SYS == FLEXT_SYS_PD + else if(IsPointer(a)) + sym = sym_pointer; +#endif + else { + error("atom type not supported"); + return *this; + } + return Add(th,o,sym,1,&a); + } + + inline MsgBundle &Add(flext_base *th,int o,int argc,const t_atom *argv) + { + return Add(th,o,sym_list,argc,argv); + } + + // \note PD sys lock must already be held by caller + inline bool Send() const + { + if(!msg.Ok()) return false; // Empty! + + const Msg *m = &msg; + do { + if(m->Send()) { + // we should re-enqeue the message... it can't be a real bundle then, only a solo message + FLEXT_ASSERT(!m->nxt); + return true; + } + m = m->nxt; + } while(m); + return false; + } + +private: + + class Msg { + public: + inline bool Ok() const { return th || recv; } + + void Init() + { + th = NULL; + recv = NULL; + nxt = NULL; + argc = 0; + } + + void Free() + { + if(argc > STATSIZE) { + FLEXT_ASSERT(argv); + delete[] argv; + } + } + + //! Attention: works only for solo messages, not real bundles!! + bool BelongsTo(flext_base *t) const + { + FLEXT_ASSERT(!nxt); + return th == t; + } + + void Set(flext_base *t,int o,const t_symbol *s,int ac,const t_atom *av) + { + FLEXT_ASSERT(t); + th = t; + out = o; + SetMsg(s,ac,av); + } + + void Set(const t_symbol *r,const t_symbol *s,int ac,const t_atom *av) + { + FLEXT_ASSERT(r); + th = NULL; + recv = r; + SetMsg(s,ac,av); + } + + void Idle(flext_base *t) + { + FLEXT_ASSERT(t); + th = t; + SetMsg(NULL,0,NULL); + } + + void Idle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv) + { + FLEXT_ASSERT(idlefun); + th = NULL; + fun = idlefun; + SetMsg(NULL,argc,argv); + } + + bool Send() const + { + if(LIKELY(sym)) { + // messages + if(th) { + if(UNLIKELY(out < 0)) + // message to self + th->CbMethodHandler(-1-out,sym,argc,argc > STATSIZE?argv:argl); + else + // message to outlet + th->ToSysAnything(out,sym,argc,argc > STATSIZE?argv:argl); + } + else + flext::SysForward(recv,sym,argc,argc > STATSIZE?argv:argl); + return false; + } + else { + // idle processing + if(th) + // call virtual method + return th->CbIdle(); + else + // call static function + return (*fun)(argc,argc > STATSIZE?argv:argl); + } + } + + Msg *nxt; + + protected: + flext_base *th; + union { + int out; + const t_symbol *recv; + bool (*fun)(int argc,const t_atom *argv); + }; + const t_symbol *sym; + int argc; + union { + t_atom *argv; + t_atom argl[STATSIZE]; + }; + + void SetMsg(const t_symbol *s,int cnt,const t_atom *lst) + { + sym = s; + argc = cnt; + if(UNLIKELY(cnt > STATSIZE)) { + argv = new t_atom[cnt]; + flext::CopyAtoms(cnt,argv,lst); + } + else + flext::CopyAtoms(cnt,argl,lst); + } + + } msg; + + Msg *Get() + { + Msg *m = &msg; + if(LIKELY(m->Ok())) { + for(; m->nxt; m = m->nxt) {} + m = m->nxt = new Msg; + m->Init(); + } + return m; + } +}; + +FLEXT_TEMPIMPL(QueueFifo)::~QueueFifo() +{ + flext::MsgBundle *n; + while((n = Get()) != NULL) delete n; +} + +FLEXT_TEMPIMPL(void Queue)::Push(MsgBundle *m) +{ + if(LIKELY(m)) { + Put(m); + FLEXT_TEMPINST(Trigger)(); + } +} + +#define CHUNK 10 + +#if FLEXT_QMODE == 1 +FLEXT_TEMPLATE bool QWork(bool syslock,flext_base *flushobj = NULL) +{ + // 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. + flext::MsgBundle *q; + if((q = queue.Get()) == NULL) + return false; + else if(q->Send()) { + if(!flushobj || !q->BelongsTo(flushobj)) + queue.Push(q); // remember messages to be processed again + else + flext::MsgBundle::Free(q); + return true; + } + else { + flext::MsgBundle::Free(q); + return false; + } +} +#else +FLEXT_TEMPLATE bool QWork(bool syslock,flext_base *flushobj = NULL) +{ + FLEXT_TEMPINST(Queue) newmsgs; + flext::MsgBundle *q; + +#if 0 + static int counter = 0; + fprintf(stderr,"QWORK %i\n",counter++); +#endif + + for(;;) { + // 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. + if(!FLEXT_TEMPINST(QVars)::queue->Avail()) break; + + #if FLEXT_QMODE == 2 + if(syslock) flext::Lock(); + #endif + + while((q = FLEXT_TEMPINST(QVars)::queue->Get()) != NULL) { + if(q->Send()) + newmsgs.Push(q); // remember messages to be processed again + else + flext::MsgBundle::Free(q); + } + + #if FLEXT_QMODE == 2 + if(syslock) flext::Unlock(); + #endif + + } + + // enqueue messages that have to be processed again + while((q = newmsgs.Get()) != NULL) + if(!flushobj || !q->BelongsTo(flushobj)) + FLEXT_TEMPINST(QVars)::queue->Push(q); + else + flext::MsgBundle::Free(q); + + return FLEXT_TEMPINST(QVars)::queue->Avail(); +} +#endif + +#if FLEXT_QMODE == 0 +#if FLEXT_SYS == FLEXT_SYS_JMAX +FLEXT_TEMPLATE void QTick(fts_object_t *c,int winlet, fts_symbol_t s, int ac, const fts_atom_t *at) +{ +#else +FLEXT_TEMPLATE void QTick(flext_base *c) +{ +#endif + FLEXT_TEMPINST(QWork)(false); +} + +#elif FLEXT_QMODE == 1 +# ifndef PERMANENTIDLE + static bool qtickactive = false; +# endif +FLEXT_TEMPLATE t_int QTick(t_int *) +{ +#ifndef PERMANENTIDLE + qtickactive = false; +#endif + + if(QWork(false)) + return 1; + else { +# ifdef PERMANENTIDLE + // will be run in the next idle cycle + return 2; +# else + // won't be run again + // for non-shared externals assume that there's rarely a message waiting + // so it's better to delete the callback meanwhile + return 0; +# endif + } +} +#endif + +/* +It would be sufficient to only flush messages belonging to object th +But then the order of sent messages is not as intended +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::QFlush(flext_base *th) +{ + FLEXT_ASSERT(!IsThreadRegistered()); + while(!FLEXT_TEMPINST(QVars)::queue->Empty()) FLEXT_TEMPINST(QWork)(false,th); +} + +FLEXT_TEMPLATE void Trigger() +{ +#if FLEXT_SYS == FLEXT_SYS_PD +# if FLEXT_QMODE == 2 + // wake up worker thread + FLEXT_TEMPINST(QVars)::qthrcond->Signal(); +# elif FLEXT_QMODE == 1 && !defined(PERMANENTIDLE) + if(!qtickactive) { + sys_callback(FLEXT_TEMPINST(QTick),NULL,0); + qtickactive = true; + } +# elif FLEXT_QMODE == 0 +# ifdef FLEXT_THREADS + bool sys = flext::IsThread(flext::GetSysThreadId()); +# else + bool sys = true; +# endif + if(!sys) flext::Lock(); + clock_delay(FLEXT_TEMPINST(QVars)::qclk,0); + if(!sys) flext::Unlock(); +# endif +#elif FLEXT_SYS == FLEXT_SYS_MAX +# if FLEXT_QMODE == 0 +// qelem_front(FLEXT_TEMPINST(QVars)::qclk); + clock_delay(FLEXT_TEMPINST(QVars)::qclk,0); +# endif +#else +# error Not implemented +#endif +} + +#if FLEXT_QMODE == 2 +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::QWorker(thr_params *) +{ + thrmsgid = GetThreadId(); + qustarted = true; + for(;;) { + // we need a timed wait so that idle processing can take place + FLEXT_TEMPINST(QVars)::qthrcond->TimedWait(0.001); + FLEXT_TEMPINST(QWork)(true); + } +} +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::StartQueue() +{ +#if FLEXT_QMODE == 2 + FLEXT_TEMPINST(QVars)::qthrcond = new FLEXT_CLASSDEF(flext)::ThrCond; +#endif + FLEXT_TEMPINST(QVars)::queue = new FLEXT_TEMPINST(Queue); + + if(qustarted) return; +#if FLEXT_QMODE == 1 +# ifdef PERMANENTIDLE + sys_callback(FLEXT_TEMPINST(QTick),NULL,0); + qustarted = true; +# endif +#elif FLEXT_QMODE == 2 + LaunchThread(QWorker,NULL); + // very unelegant... but waiting should be ok, since happens only on loading + while(!qustarted) Sleep(0.001); +#elif FLEXT_QMODE == 0 && (FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX) +// qclk = (t_qelem *)(qelem_new(NULL,(t_method)FLEXT_TEMPINST(QTick))); + FLEXT_TEMPINST(QVars)::qclk = (t_clock *)(clock_new(NULL,(t_method)FLEXT_TEMPINST(QTick))); + qustarted = true; +#else +# error Not implemented! +#endif +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext))::MsgBundle *FLEXT_CLASSDEF(flext))::MsgNew() +{ + return MsgBundle::New(); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::MsgFree(MsgBundle *m) +{ + MsgBundle::Free(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ToSysMsg(MsgBundle *m) +{ + m->Send(); + FLEXT_TEMPINST(QVars)::queue->Free(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ToQueueMsg(MsgBundle *m) +{ + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueBang(int o) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueFloat(int o,float f) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,f); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueInt(int o,int f) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,f); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueSymbol(int o,const t_symbol *s) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,s); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueAtom(int o,const t_atom &at) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,at); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueList(int o,int argc,const t_atom *argv) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,argc,argv); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueAnything(int o,const t_symbol *s,int argc,const t_atom *argv) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,s,argc,argv); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddBang(MsgBundle *m,int n) const +{ + m->Add(const_cast<flext_base *>(this),n); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddFloat(MsgBundle *m,int n,float f) const +{ + m->Add(const_cast<flext_base *>(this),n,f); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddInt(MsgBundle *m,int n,int f) const +{ + m->Add(const_cast<flext_base *>(this),n,f); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddSymbol(MsgBundle *m,int n,const t_symbol *s) const +{ + m->Add(const_cast<flext_base *>(this),n,s); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddAtom(MsgBundle *m,int n,const t_atom &at) const +{ + m->Add(const_cast<flext_base *>(this),n,at); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddList(MsgBundle *m,int n,int argc,const t_atom *argv) const +{ + m->Add(const_cast<flext_base *>(this),n,argc,argv); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddAnything(MsgBundle *m,int n,const t_symbol *s,int argc,const t_atom *argv) const +{ + m->Add(const_cast<flext_base *>(this),n,s,argc,argv); +} + + + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::SysForward(const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) +{ + void *cl = recv->s_thing; + if(UNLIKELY(!cl)) return false; + +#if FLEXT_SYS == FLEXT_SYS_PD + pd_typedmess((t_class **)cl,(t_symbol *)s,argc,(t_atom *)argv); +#elif FLEXT_SYS == FLEXT_SYS_MAX + typedmess(recv->s_thing,(t_symbol *)s,argc,(t_atom *)argv); +#else +# error Not implemented +#endif + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::QueueForward(const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) +{ + MsgBundle *m = MsgBundle::New(); + m->Add(recv,s,argc,argv); + // send over queue + FLEXT_TEMPINST(QVars)::queue->Push(m); + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::MsgForward(MsgBundle *m,const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) +{ + m->Add(recv,s,argc,argv); + return true; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddIdle() +{ + MsgBundle *m = MsgBundle::New(); + m->Idle(const_cast<flext_base *>(this)); + // send over queue + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddIdle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv) +{ + MsgBundle *m = MsgBundle::New(); + m->Idle(idlefun,argc,argv); + // send over queue + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +#include "flpopns.h" + +#endif // __FLEXT_QUEUE_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flsimd.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flsimd.cpp new file mode 100755 index 0000000000000000000000000000000000000000..69d8c39c32ca5ff7803ffe3659b3e45ad8ffcf43 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flsimd.cpp @@ -0,0 +1,2013 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flsimd.cpp + \brief flext SIMD support functions + + If FLEXT_USE_SIMD is defined at compilation, SIMD instructions are used wherever feasible. + If used with MSVC++ 6 the "Processor Pack" must be installed. + + If FLEXT_USE_IPP is defined the Intel Performance Package is used. +*/ + +#ifndef __FLEXT_SIMD_CPP +#define __FLEXT_SIMD_CPP + +#include "flext.h" +#include <cstring> + +#if FLEXT_OS == FLEXT_OS_WIN +#include <windows.h> +#endif + +#ifdef FLEXT_USE_IPP +#include <ipps.h> +#endif + +#ifdef FLEXT_USE_SIMD + #ifdef _MSC_VER + // include MSVC SIMD header files + #include <mmintrin.h> // MMX + #include <xmmintrin.h> // SSE + #include <emmintrin.h> // SSE2 + #include <mm3dnow.h> // 3DNow! + #elif defined(__APPLE__) && defined(__VEC__) + #ifdef __MWERKS__ + #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH + #include <sys/sysctl.h> + #include <vDSP.h> + #else + #include <Gestalt.h> + #endif + + #pragma altivec_model on + + #include <altivec.h> + #include <vectorOps.h> + #elif defined(__GNUC__) + #include <sys/sysctl.h> + #include <vecLib/vecLib.h> + #endif + #endif + +#endif // FLEXT_USE_SIMD + +#include "flpushns.h" + +FLEXT_TEMPLATE unsigned long setsimdcaps(); + +/*! \brief Holds SIMD capability flags + \internal +*/ +FLEXT_TEMPIMPL(unsigned long FLEXT_CLASSDEF(flext))::simdcaps = FLEXT_TEMPINST(setsimdcaps)(); + +FLEXT_TEMPIMPL(unsigned long FLEXT_CLASSDEF(flext))::GetSIMDCapabilities() { return simdcaps; } + + +#ifdef FLEXT_USE_SIMD + +#if FLEXT_CPU == FLEXT_CPU_IA32 || FLEXT_CPU == FLEXT_CPU_X86_64 + +#define _CPU_FEATURE_MMX 0x0001 +#define _CPU_FEATURE_SSE 0x0002 +#define _CPU_FEATURE_SSE2 0x0004 +#define _CPU_FEATURE_3DNOW 0x0008 + +typedef struct _processor_info { + int family; // family of the processor + // e.g. 6 = Pentium-Pro architecture + int model; // model of processor + // e.g. 1 = Pentium-Pro for family = 6 + int stepping; // processor revision number + int feature; // processor feature + // (same as return value from _cpuid) + int os_support; // does OS Support the feature? + int checks; // mask of checked bits in feature + // and os_support fields +} _p_info; + +// These are the bit flags that get set on calling cpuid +// with register eax set to 1 +#define _MMX_FEATURE_BIT 0x00800000 +#define _SSE_FEATURE_BIT 0x02000000 +#define _SSE2_FEATURE_BIT 0x04000000 + +// This bit is set when cpuid is called with +// register set to 80000001h (only applicable to AMD) +#define _3DNOW_FEATURE_BIT 0x80000000 + +#ifdef _MSC_VER +inline int IsCPUID() +{ + __try { + _asm { + xor eax, eax + cpuid + } + } + __except (EXCEPTION_EXECUTE_HANDLER) { + return 0; + } + return 1; +} + +inline int _os_support(int feature) +{ + __try { + switch (feature) { + case _CPU_FEATURE_SSE: + __asm { + xorps xmm0, xmm0 // executing SSE instruction + } + break; + case _CPU_FEATURE_SSE2: + __asm { + xorpd xmm0, xmm0 // executing SSE2 instruction + } + break; + case _CPU_FEATURE_3DNOW: + __asm { + pfrcp mm0, mm0 // executing 3DNow! instruction + emms + } + break; + case _CPU_FEATURE_MMX: + __asm { + pxor mm0, mm0 // executing MMX instruction + emms + } + break; + } + } + __except (EXCEPTION_EXECUTE_HANDLER) { + if (_exception_code() == STATUS_ILLEGAL_INSTRUCTION) { + return 0; + } + return 0; + } + return 1; +} + +inline int _cpuid (_p_info *pinfo) +{ + DWORD dwStandard = 0; + DWORD dwFeature = 0; + DWORD dwMax = 0; + DWORD dwExt = 0; + int feature = 0; + int os_support = 0; + union { + struct { + DWORD dw0; + DWORD dw1; + DWORD dw2; + } s; + } Ident; + + if (!IsCPUID()) { + return 0; + } + + _asm { + push ebx + push ecx + push edx + + // get the vendor string + xor eax, eax + cpuid + mov dwMax, eax + mov Ident.s.dw0, ebx + mov Ident.s.dw1, edx + mov Ident.s.dw2, ecx + + // get the Standard bits + mov eax, 1 + cpuid + mov dwStandard, eax + mov dwFeature, edx + + // get AMD-specials + mov eax, 80000000h + cpuid + cmp eax, 80000000h + jc notamd + mov eax, 80000001h + cpuid + mov dwExt, edx + +notamd: + pop ecx + pop ebx + pop edx + } + + if (dwFeature & _MMX_FEATURE_BIT) { + feature |= _CPU_FEATURE_MMX; + if (_os_support(_CPU_FEATURE_MMX)) + os_support |= _CPU_FEATURE_MMX; + } + if (dwExt & _3DNOW_FEATURE_BIT) { + feature |= _CPU_FEATURE_3DNOW; + if (_os_support(_CPU_FEATURE_3DNOW)) + os_support |= _CPU_FEATURE_3DNOW; + } + if (dwFeature & _SSE_FEATURE_BIT) { + feature |= _CPU_FEATURE_SSE; + if (_os_support(_CPU_FEATURE_SSE)) + os_support |= _CPU_FEATURE_SSE; + } + if (dwFeature & _SSE2_FEATURE_BIT) { + feature |= _CPU_FEATURE_SSE2; + if (_os_support(_CPU_FEATURE_SSE2)) + os_support |= _CPU_FEATURE_SSE2; + } + + if (pinfo) { + memset(pinfo, 0, sizeof(_p_info)); + + pinfo->os_support = os_support; + pinfo->feature = feature; + pinfo->family = (dwStandard >> 8) & 0xF; // retrieve family + if (pinfo->family == 15) { // retrieve extended family + pinfo->family |= (dwStandard >> 16) & 0xFF0; + } + pinfo->model = (dwStandard >> 4) & 0xF; // retrieve model + if (pinfo->model == 15) { // retrieve extended model + pinfo->model |= (dwStandard >> 12) & 0xF; + } + pinfo->stepping = (dwStandard) & 0xF; // retrieve stepping + + pinfo->checks = _CPU_FEATURE_MMX | + _CPU_FEATURE_SSE | + _CPU_FEATURE_SSE2 | + _CPU_FEATURE_3DNOW; + } + + return feature; +} + +inline bool IsVectorAligned(const void *where) +{ + return (reinterpret_cast<size_t>(where)&(__alignof(__m128)-1)) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)) + &(__alignof(__m128)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)|reinterpret_cast<size_t>(v3)) + &(__alignof(__m128)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3,const void *v4) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)|reinterpret_cast<size_t>(v3)|reinterpret_cast<size_t>(v4)) + &(__alignof(__m128)-1) + ) == 0; +} + +#else +// not MSVC +inline int _cpuid (_p_info *pinfo) +{ + if(pinfo) memset(pinfo,0,sizeof *pinfo); + return 0; +} +#endif + +#endif + + +/*! \brief Determine SIMD capabilities + \internal +*/ +inline unsigned long setsimdcaps() +{ + unsigned long simdflags = flext::simd_none; +#if FLEXT_CPU == FLEXT_CPU_IA32 || FLEXT_CPU == FLEXT_CPU_X86_64 + _p_info cpuinfo; + _cpuid(&cpuinfo); + if(cpuinfo.os_support&_CPU_FEATURE_MMX) simdflags += flext::simd_mmx; + if(cpuinfo.os_support&_CPU_FEATURE_3DNOW) simdflags += flext::simd_3dnow; + if(cpuinfo.os_support&_CPU_FEATURE_SSE) simdflags += flext::simd_sse; + if(cpuinfo.os_support&_CPU_FEATURE_SSE2) simdflags += flext::simd_sse2; +#elif defined(__APPLE__) && defined(__VEC__) + #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH + + int selectors[2] = { CTL_HW, HW_VECTORUNIT }; + int hasVectorUnit = 0; + size_t length = sizeof(hasVectorUnit); + int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0); + + if(!error && hasVectorUnit != 0) simdflags += flext::simd_altivec; + + #else + + long cpuAttributes; + Boolean hasAltiVec = false; + OSErr err = Gestalt( gestaltPowerPCProcessorFeatures, &cpuAttributes ); + + if( noErr == err ) + if(( 1 << gestaltPowerPCHasVectorInstructions) & cpuAttributes) simdflags += flext::simd_altivec; + + #endif +#endif + return simdflags; +} + + +#if (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + +/* functions for misaligned vector data - taken from the Altivec tutorial of Ian Ollmann, Ph.D. */ + +//! Load a vector from an unaligned location in memory +inline vector unsigned char LoadUnaligned( vector unsigned char *v ) +{ + vector unsigned char permuteVector = vec_lvsl( 0, (int*) v ); + vector unsigned char low = vec_ld( 0, v ); + vector unsigned char high = vec_ld( 15, v ); + return vec_perm( low, high, permuteVector ); +} + +/* +//! Store a vector to an unaligned location in memory +inline void StoreUnaligned( vector unsigned char v, vector unsigned char *where) +{ + // Load the surrounding area + vector unsigned char low = vec_ld( 0, where ); + vector unsigned char high = vec_ld( 16, where ); + // Prepare the constants that we need + vector unsigned char permuteVector = vec_lvsr( 0, (int*) where ); + + vector unsigned char oxFF = (vector unsigned char)vec_splat_s8( -1 ); + vector unsigned char ox00 = (vector unsigned char)vec_splat_s8( 0 ); + // Make a mask for which parts of the vectors to swap out + vector unsigned char mask = vec_perm( ox00, oxFF, permuteVector ); + // Right rotate our input data + v = vec_perm( v, v, permuteVector ); + // Insert our data into the low and high vectors + low = vec_sel( v, low, mask ); + high = vec_sel( high, v, mask ); + // Store the two aligned result vectors + vec_st( low, 0, where ); + vec_st( high, 16, where ); +} +*/ + +inline vector float LoadUnaligned(const float *v ) +{ + return (vector float)LoadUnaligned((vector unsigned char *)v); +} + +/* +inline void StoreUnaligned( vector float v,float *where) +{ + return StoreUnaligned((vector unsigned char)v,(vector unsigned char *)where); +} +*/ + +inline bool IsVectorAligned(const void *where) +{ + return (reinterpret_cast<size_t>(where)&(sizeof(vector float)-1)) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)) + &(sizeof(vector float)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)|reinterpret_cast<size_t>(v3)) + &(sizeof(vector float)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3,const void *v4) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)|reinterpret_cast<size_t>(v3)|reinterpret_cast<size_t>(v4)) + &(sizeof(vector float)-1) + ) == 0; +} + +inline vector float LoadValue(const float &f) +{ + return vec_splat(IsVectorAligned(&f)?vec_ld(0,(vector float *)&f):LoadUnaligned(&f),0); +} +#endif + + +#else // FLEXT_USE_SIMD +inline unsigned long setsimdcaps() { return 0; } +#endif // FLEXT_USE_SIMD + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::CopySamples(t_sample *dst,const t_sample *src,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) + ippsCopy_32f((const float *)src,(float *)dst,cnt); + else if(sizeof(t_sample) == 8) + ippsCopy_64f((const double *)src,(double *)dst,cnt); + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + } + + if(IsVectorAligned(src)) { + if(IsVectorAligned(dst)) { + // aligned src, aligned dst + __asm { + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ecx,[n] +loopaa: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + movaps xmm0,xmmword ptr[eax] + movaps xmmword ptr[edx],xmm0 + movaps xmm1,xmmword ptr[eax+4*4] + movaps xmmword ptr[edx+4*4],xmm1 + movaps xmm2,xmmword ptr[eax+8*4] + movaps xmmword ptr[edx+8*4],xmm2 + movaps xmm3,xmmword ptr[eax+12*4] + movaps xmmword ptr[edx+12*4],xmm3 + + add eax,16*4 + add edx,16*4 + loop loopaa + } + } + else { + // aligned src, unaligned dst + __asm { + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ecx,[n] +loopau: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + movaps xmm0,xmmword ptr[eax] + movups xmmword ptr[edx],xmm0 + movaps xmm1,xmmword ptr[eax+4*4] + movups xmmword ptr[edx+4*4],xmm1 + movaps xmm2,xmmword ptr[eax+8*4] + movups xmmword ptr[edx+8*4],xmm2 + movaps xmm3,xmmword ptr[eax+12*4] + movups xmmword ptr[edx+12*4],xmm3 + + add eax,16*4 + add edx,16*4 + loop loopau + } + } + } + else { + if(IsVectorAligned(dst)) { + // unaligned src, aligned dst + __asm { + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ecx,[n] +loopua: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + movups xmm0,xmmword ptr[eax] + movaps xmmword ptr[edx],xmm0 + movups xmm1,xmmword ptr[eax+4*4] + movaps xmmword ptr[edx+4*4],xmm1 + movups xmm2,xmmword ptr[eax+8*4] + movaps xmmword ptr[edx+8*4],xmm2 + movups xmm3,xmmword ptr[eax+12*4] + movaps xmmword ptr[edx+12*4],xmm3 + + add eax,16*4 + add edx,16*4 + loop loopua + } + } + else { + // unaligned src, unaligned dst + __asm { + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ecx,[n] +loopuu: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + movups xmm0,xmmword ptr[eax] + movups xmmword ptr[edx],xmm0 + movups xmm1,xmmword ptr[eax+4*4] + movups xmmword ptr[edx+4*4],xmm1 + movups xmm2,xmmword ptr[eax+8*4] + movups xmmword ptr[edx+8*4],xmm2 + movups xmm3,xmmword ptr[eax+12*4] + movups xmmword ptr[edx+12*4],xmm3 + + add eax,16*4 + add edx,16*4 + loop loopuu + } + } + } + + src += n<<4,dst += n<<4; +zero: + while(cnt--) *(dst++) = *(src++); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VECTOROPS__) + if(true) { + int n = cnt>>2,n4 = n<<2; + vScopy(n4,(vector float *)src,(vector float *)dst); + cnt -= n4,src += n4,dst += n4; + while(cnt--) *(dst++) = *(src++); + } + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + while(n--) { + dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = src[3]; + dst[4] = src[4]; dst[5] = src[5]; dst[6] = src[6]; dst[7] = src[7]; + src += 8,dst += 8; + } + while(cnt--) *(dst++) = *(src++); + } +#endif +} + +#if defined(FLEXT_USE_SIMD) && (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) +// because of some frame code Altivec stuff should be in seperate functions.... + +FLEXT_TEMPLATE const vector float zero = (vector float)(0); + +FLEXT_TEMPLATE void SetAltivec(t_sample *dst,int cnt,t_sample s) +{ + vector float svec = LoadValue(s); + int n = cnt>>4; + cnt -= n<<4; + + while(n--) { + vec_st(svec,0,dst); + vec_st(svec,16,dst); + vec_st(svec,32,dst); + vec_st(svec,48,dst); + dst += 16; + } + + while(cnt--) *(dst++) = s; +} + +FLEXT_TEMPLATE void MulAltivec(t_sample *dst,const t_sample *src,t_sample op,int cnt) +{ + const vector float arg = LoadValue(op); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16) { + vector float a1 = vec_ld( 0,src); + vector float a2 = vec_ld(16,src); + vector float a3 = vec_ld(32,src); + vector float a4 = vec_ld(48,src); + + a1 = vec_madd(a1,arg,zero); + a2 = vec_madd(a2,arg,zero); + a3 = vec_madd(a3,arg,zero); + a4 = vec_madd(a4,arg,zero); + + vec_st(a1, 0,dst); + vec_st(a2,16,dst); + vec_st(a3,32,dst); + vec_st(a4,48,dst); + } + + while(cnt--) *(dst++) = *(src++)*op; +} + +FLEXT_TEMPLATE void MulAltivec(t_sample *dst,const t_sample *src,const t_sample *op,int cnt) +{ + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,op += 16,dst += 16) { + vector float a1 = vec_ld( 0,src),b1 = vec_ld( 0,op); + vector float a2 = vec_ld(16,src),b2 = vec_ld(16,op); + vector float a3 = vec_ld(32,src),b3 = vec_ld(32,op); + vector float a4 = vec_ld(48,src),b4 = vec_ld(48,op); + + a1 = vec_madd(a1,b1,zero); + a2 = vec_madd(a2,b2,zero); + a3 = vec_madd(a3,b3,zero); + a4 = vec_madd(a4,b4,zero); + + vec_st(a1, 0,dst); + vec_st(a2,16,dst); + vec_st(a3,32,dst); + vec_st(a4,48,dst); + } + while(cnt--) *(dst++) = *(src++) * *(op++); +} + +FLEXT_TEMPLATE void AddAltivec(t_sample *dst,const t_sample *src,t_sample op,int cnt) +{ + const vector float arg = LoadValue(op); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16) { + vector float a1 = vec_ld( 0,src); + vector float a2 = vec_ld(16,src); + vector float a3 = vec_ld(32,src); + vector float a4 = vec_ld(48,src); + + a1 = vec_add(a1,arg); + a2 = vec_add(a2,arg); + a3 = vec_add(a3,arg); + a4 = vec_add(a4,arg); + + vec_st(a1, 0,dst); + vec_st(a2,16,dst); + vec_st(a3,32,dst); + vec_st(a4,48,dst); + } + + while(cnt--) *(dst++) = *(src++)+op; +} + +FLEXT_TEMPLATE void AddAltivec(t_sample *dst,const t_sample *src,const t_sample *op,int cnt) +{ + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,op += 16,dst += 16) { + vector float a1 = vec_ld( 0,src),b1 = vec_ld( 0,op); + vector float a2 = vec_ld(16,src),b2 = vec_ld(16,op); + vector float a3 = vec_ld(32,src),b3 = vec_ld(32,op); + vector float a4 = vec_ld(48,src),b4 = vec_ld(48,op); + + a1 = vec_add(a1,b1); + a2 = vec_add(a2,b2); + a3 = vec_add(a3,b3); + a4 = vec_add(a4,b4); + + vec_st(a1, 0,dst); + vec_st(a2,16,dst); + vec_st(a3,32,dst); + vec_st(a4,48,dst); + } + while(cnt--) *(dst++) = *(src++) + *(op++); +} + +FLEXT_TEMPLATE void ScaleAltivec(t_sample *dst,const t_sample *src,t_sample opmul,t_sample opadd,int cnt) +{ + const vector float argmul = LoadValue(opmul); + const vector float argadd = LoadValue(opadd); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16) { + vec_st(vec_madd(vec_ld( 0,src),argmul,argadd), 0,dst); + vec_st(vec_madd(vec_ld(16,src),argmul,argadd),16,dst); + vec_st(vec_madd(vec_ld(32,src),argmul,argadd),32,dst); + vec_st(vec_madd(vec_ld(48,src),argmul,argadd),48,dst); + } + + while(cnt--) *(dst++) = *(src++)*opmul+opadd; +} + +FLEXT_TEMPLATE void ScaleAltivec(t_sample *dst,const t_sample *src,t_sample opmul,const t_sample *add,int cnt) +{ + const vector float argmul = LoadValue(opmul); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16,add += 16) { + vec_st(vec_madd(vec_ld( 0,src),argmul,vec_ld( 0,add)), 0,dst); + vec_st(vec_madd(vec_ld(16,src),argmul,vec_ld(16,add)),16,dst); + vec_st(vec_madd(vec_ld(32,src),argmul,vec_ld(32,add)),32,dst); + vec_st(vec_madd(vec_ld(48,src),argmul,vec_ld(48,add)),48,dst); + } + + while(cnt--) *(dst++) = *(src++) * opmul + *(add++); +} + +FLEXT_TEMPLATE void ScaleAltivec(t_sample *dst,const t_sample *src,const t_sample *mul,const t_sample *add,int cnt) +{ + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16,mul += 16,add += 16) { + vec_st(vec_madd(vec_ld( 0,src),vec_ld( 0,mul),vec_ld( 0,add)), 0,dst); + vec_st(vec_madd(vec_ld(16,src),vec_ld(16,mul),vec_ld(16,add)),16,dst); + vec_st(vec_madd(vec_ld(32,src),vec_ld(32,mul),vec_ld(32,add)),32,dst); + vec_st(vec_madd(vec_ld(48,src),vec_ld(48,mul),vec_ld(48,add)),48,dst); + } + + while(cnt--) *(dst++) = *(src++) * *(mul++) + *(add++); +} +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::SetSamples(t_sample *dst,int cnt,t_sample s) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) + ippsSet_32f((float)s,(float *)dst,cnt); + else if(sizeof(t_sample) == 8) + ippsSet_64f((double)s,(double *)dst,cnt); + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + movss xmm0,xmmword ptr [s] + shufps xmm0,xmm0,0 + } + + if(IsVectorAligned(dst)) { + // aligned version + __asm { + mov ecx,[n] + mov edx,dword ptr [dst] +loopa: + movaps xmmword ptr[edx],xmm0 + movaps xmmword ptr[edx+4*4],xmm0 + movaps xmmword ptr[edx+8*4],xmm0 + movaps xmmword ptr[edx+12*4],xmm0 + + add edx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,[n] + mov edx,dword ptr [dst] +loopu: + movups xmmword ptr[edx],xmm0 + movups xmmword ptr[edx+4*4],xmm0 + movups xmmword ptr[edx+8*4],xmm0 + movups xmmword ptr[edx+12*4],xmm0 + + add edx,16*4 + loop loopu + } + } + + dst += n<<4; +zero: + while(cnt--) *(dst++) = s; + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(dst)) + SetAltivec(dst,cnt,s); + else +#endif +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + while(n--) { + dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = dst[5] = dst[6] = dst[7] = s; + dst += 8; + } + + while(cnt--) *(dst++) = s; + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::MulSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMulC_32f((const float *)src,(float)op,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMulC_64f((const double *)src,(double)op,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + __m128 a = _mm_load1_ps(&op); + + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [op] + shufps xmm0,xmm0,0 + } + + if(VectorsAligned(src,dst)) { + // aligned version + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopa: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movaps xmm1,xmmword ptr[eax] + mulps xmm1,xmm0 + movaps xmmword ptr[edx],xmm1 + + movaps xmm2,xmmword ptr[eax+4*4] + mulps xmm2,xmm0 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm3,xmmword ptr[eax+8*4] + mulps xmm3,xmm0 + movaps xmmword ptr[edx+8*4],xmm3 + + movaps xmm4,xmmword ptr[eax+12*4] + mulps xmm4,xmm0 + movaps xmmword ptr[edx+12*4],xmm4 + + add eax,16*4 + add edx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopu: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movups xmm1,xmmword ptr[eax] + mulps xmm1,xmm0 + movups xmmword ptr[edx],xmm1 + + movups xmm2,xmmword ptr[eax+4*4] + mulps xmm2,xmm0 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm3,xmmword ptr[eax+8*4] + mulps xmm3,xmm0 + movups xmmword ptr[edx+8*4],xmm3 + + movups xmm4,xmmword ptr[eax+12*4] + mulps xmm4,xmm0 + movups xmmword ptr[edx+12*4],xmm4 + + add eax,16*4 + add edx,16*4 + loop loopu + } + } + + src += n<<4,dst += n<<4; +zero: + while(cnt--) *(dst++) = *(src++)*op; + } + else +#elif defined(__APPLE__) && defined(__VDSP__) + if(true) { + vDSP_vsmul(src,1,&op,dst,1,cnt); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) + MulAltivec(dst,src,op,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + + if(src == dst) { + while(n--) { + dst[0] *= op; dst[1] *= op; dst[2] *= op; dst[3] *= op; + dst[4] *= op; dst[5] *= op; dst[6] *= op; dst[7] *= op; + dst += 8; + } + while(cnt--) *(dst++) *= op; + } + else { + while(n--) { + dst[0] = src[0]*op; dst[1] = src[1]*op; + dst[2] = src[2]*op; dst[3] = src[3]*op; + dst[4] = src[4]*op; dst[5] = src[5]*op; + dst[6] = src[6]*op; dst[7] = src[7]*op; + src += 8,dst += 8; + } + while(cnt--) *(dst++) = *(src++)*op; + } + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMul_32f((const float *)src,(const float *)op,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMul_32f((const double *)src,(const double *)op,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,[src] + mov ebx,[op] + prefetcht0 [eax+0] + prefetcht0 [ebx+0] + prefetcht0 [eax+32] + prefetcht0 [ebx+32] + } + + if(VectorsAligned(src,dst)) { + if(IsVectorAligned(op)) { + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopaa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm0,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + mulps xmm0,xmm1 + movaps xmmword ptr[edx],xmm0 + + movaps xmm2,xmmword ptr[eax+4*4] + movaps xmm3,xmmword ptr[ebx+4*4] + mulps xmm2,xmm3 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm5,xmmword ptr[ebx+8*4] + mulps xmm4,xmm5 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm6,xmmword ptr[eax+12*4] + movaps xmm7,xmmword ptr[ebx+12*4] + mulps xmm6,xmm7 + movaps xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopaa + } + } + else { + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopau: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm0,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + mulps xmm0,xmm1 + movaps xmmword ptr[edx],xmm0 + + movaps xmm2,xmmword ptr[eax+4*4] + movups xmm3,xmmword ptr[ebx+4*4] + mulps xmm2,xmm3 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm4,xmmword ptr[eax+8*4] + movups xmm5,xmmword ptr[ebx+8*4] + mulps xmm4,xmm5 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm6,xmmword ptr[eax+12*4] + movups xmm7,xmmword ptr[ebx+12*4] + mulps xmm6,xmm7 + movaps xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopau + } + } + } + else { + if(IsVectorAligned(op)) { + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopua: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm0,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + mulps xmm0,xmm1 + movups xmmword ptr[edx],xmm0 + + movups xmm2,xmmword ptr[eax+4*4] + movaps xmm3,xmmword ptr[ebx+4*4] + mulps xmm2,xmm3 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm4,xmmword ptr[eax+8*4] + movaps xmm5,xmmword ptr[ebx+8*4] + mulps xmm4,xmm5 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm6,xmmword ptr[eax+12*4] + movaps xmm7,xmmword ptr[ebx+12*4] + mulps xmm6,xmm7 + movups xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopua + } + } + else { + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] +loopuu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm0,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + mulps xmm0,xmm1 + movups xmmword ptr[edx],xmm0 + + movups xmm2,xmmword ptr[eax+4*4] + movups xmm3,xmmword ptr[ebx+4*4] + mulps xmm2,xmm3 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm5,xmmword ptr[ebx+8*4] + mulps xmm4,xmm5 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm6,xmmword ptr[eax+12*4] + movups xmm7,xmmword ptr[ebx+12*4] + mulps xmm6,xmm7 + movups xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopuu + } + } + } + + src += n<<4,dst += n<<4,op += n<<4; +zero: + while(cnt--) *(dst++) = *(src++) * *(op++); + } + else +#elif defined(__APPLE__) && defined(__VDSP__) + if(true) { + vDSP_vmul(src,1,op,1,dst,1,cnt); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,op,dst)) + MulAltivec(dst,src,op,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + + if(src == dst) { + while(n--) { + dst[0] *= op[0]; dst[1] *= op[1]; + dst[2] *= op[2]; dst[3] *= op[3]; + dst[4] *= op[4]; dst[5] *= op[5]; + dst[6] *= op[6]; dst[7] *= op[7]; + dst += 8,op += 8; + } + while(cnt--) *(dst++) *= *(op++); + } + else { + while(n--) { + dst[0] = src[0]*op[0]; dst[1] = src[1]*op[1]; + dst[2] = src[2]*op[2]; dst[3] = src[3]*op[3]; + dst[4] = src[4]*op[4]; dst[5] = src[5]*op[5]; + dst[6] = src[6]*op[6]; dst[7] = src[7]*op[7]; + src += 8,dst += 8,op += 8; + } + while(cnt--) *(dst++) = *(src++) * *(op++); + } + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AddSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsAddC_32f((const float *)src,(float)op,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsAddC_64f_I((const double *)src,(double)op,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,[src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [op] + shufps xmm0,xmm0,0 + } + + if(VectorsAligned(src,dst)) { + // aligned version + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopa: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movaps xmm1,xmmword ptr[eax] + addps xmm1,xmm0 + movaps xmmword ptr[edx],xmm1 + + movaps xmm2,xmmword ptr[eax+4*4] + addps xmm2,xmm0 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm3,xmmword ptr[eax+8*4] + addps xmm3,xmm0 + movaps xmmword ptr[edx+8*4],xmm3 + + movaps xmm4,xmmword ptr[eax+12*4] + addps xmm4,xmm0 + movaps xmmword ptr[edx+12*4],xmm4 + + add eax,16*4 + add edx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopu: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movups xmm1,xmmword ptr[eax] + addps xmm1,xmm0 + movups xmmword ptr[edx],xmm1 + + movups xmm2,xmmword ptr[eax+4*4] + addps xmm2,xmm0 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm3,xmmword ptr[eax+8*4] + addps xmm3,xmm0 + movups xmmword ptr[edx+8*4],xmm3 + + movups xmm4,xmmword ptr[eax+12*4] + addps xmm4,xmm0 + movups xmmword ptr[edx+12*4],xmm4 + + add eax,16*4 + add edx,16*4 + loop loopu + } + } + src += n<<4,dst += n<<4,op += n<<4; +zero: + while(cnt--) *(dst++) = *(src++)+op; + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) + AddAltivec(dst,src,op,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + + if(src == dst) { + while(n--) { + dst[0] += op; dst[1] += op; dst[2] += op; dst[3] += op; + dst[4] += op; dst[5] += op; dst[6] += op; dst[7] += op; + dst += 8; + } + while(cnt--) *(dst++) += op; + } + else { + while(n--) { + dst[0] = src[0]+op; dst[1] = src[1]+op; + dst[2] = src[2]+op; dst[3] = src[3]+op; + dst[4] = src[4]+op; dst[5] = src[5]+op; + dst[6] = src[6]+op; dst[7] = src[7]+op; + src += 8,dst += 8; + } + while(cnt--) *(dst++) = *(src++)+op; + } + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsAdd_32f((const float *)src,(const float *)op,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsAdd_64f((const double *)src,(const double *)op,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // Prefetch cache + __asm { + mov eax,dword ptr [src] + mov ebx,dword ptr [op] + prefetcht0 [eax] + prefetcht0 [ebx] + prefetcht0 [eax+32] + prefetcht0 [ebx+32] + } + + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + if(VectorsAligned(src,dst)) { + if(IsVectorAligned(op)) { + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopaa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm0,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + addps xmm0,xmm1 + movaps xmmword ptr[edx],xmm0 + + movaps xmm2,xmmword ptr[eax+4*4] + movaps xmm3,xmmword ptr[ebx+4*4] + addps xmm2,xmm3 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm5,xmmword ptr[ebx+8*4] + addps xmm4,xmm5 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm6,xmmword ptr[eax+12*4] + movaps xmm7,xmmword ptr[ebx+12*4] + addps xmm6,xmm7 + movaps xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopaa + } + } + else { + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopau: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm0,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + addps xmm0,xmm1 + movaps xmmword ptr[edx],xmm0 + + movaps xmm2,xmmword ptr[eax+4*4] + movups xmm3,xmmword ptr[ebx+4*4] + addps xmm2,xmm3 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm4,xmmword ptr[eax+8*4] + movups xmm5,xmmword ptr[ebx+8*4] + addps xmm4,xmm5 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm6,xmmword ptr[eax+12*4] + movups xmm7,xmmword ptr[ebx+12*4] + addps xmm6,xmm7 + movaps xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopau + } + } + } + else { + if(IsVectorAligned(op)) { + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopua: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm0,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + addps xmm0,xmm1 + movups xmmword ptr[edx],xmm0 + + movups xmm2,xmmword ptr[eax+4*4] + movaps xmm3,xmmword ptr[ebx+4*4] + addps xmm2,xmm3 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm4,xmmword ptr[eax+8*4] + movaps xmm5,xmmword ptr[ebx+8*4] + addps xmm4,xmm5 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm6,xmmword ptr[eax+12*4] + movaps xmm7,xmmword ptr[ebx+12*4] + addps xmm6,xmm7 + movups xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopua + } + } + else { + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopuu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm0,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + addps xmm0,xmm1 + movups xmmword ptr[edx],xmm0 + + movups xmm2,xmmword ptr[eax+4*4] + movups xmm3,xmmword ptr[ebx+4*4] + addps xmm2,xmm3 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm5,xmmword ptr[ebx+8*4] + addps xmm4,xmm5 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm6,xmmword ptr[eax+12*4] + movups xmm7,xmmword ptr[ebx+12*4] + addps xmm6,xmm7 + movups xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopuu + } + } + } + + src += n<<4,dst += n<<4,op += n<<4; +zero: + while(cnt--) *(dst++) = *(src++) + *(op++); + } + else +#elif defined(__APPLE__) && defined(__VDSP__) + if(true) { + vDSP_vadd(src,1,op,1,dst,1,cnt); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,op,dst)) + AddAltivec(dst,src,op,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + + if(dst == src) { + while(n--) { + dst[0] += op[0]; dst[1] += op[1]; + dst[2] += op[2]; dst[3] += op[3]; + dst[4] += op[4]; dst[5] += op[5]; + dst[6] += op[6]; dst[7] += op[7]; + dst += 8,op += 8; + } + while(cnt--) *(dst++) += *(op++); + } + else { + while(n--) { + dst[0] = src[0]+op[0]; dst[1] = src[1]+op[1]; + dst[2] = src[2]+op[2]; dst[3] = src[3]+op[3]; + dst[4] = src[4]+op[4]; dst[5] = src[5]+op[5]; + dst[6] = src[6]+op[6]; dst[7] = src[7]+op[7]; + src += 8,dst += 8,op += 8; + } + while(cnt--) *(dst++) = *(src++) + *(op++); + } + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,t_sample opadd,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMulC_32f((const float *)src,(float)opmul,(float *)dst,cnt); + ippsAddC_32f_I((float)opadd,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMulC_64f((const double *)src,(double)opmul,(double *)dst,cnt); + ippsAddC_64f_I((double)opadd,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [opadd] + shufps xmm0,xmm0,0 + movss xmm1,xmmword ptr [opmul] + shufps xmm1,xmm1,0 + } + + if(VectorsAligned(src,dst)) { + // aligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopa: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movaps xmm2,xmmword ptr[eax] + mulps xmm2,xmm1 + addps xmm2,xmm0 + movaps xmmword ptr[edx],xmm2 + + movaps xmm3,xmmword ptr[eax+4*4] + mulps xmm3,xmm1 + addps xmm3,xmm0 + movaps xmmword ptr[edx+4*4],xmm3 + + movaps xmm4,xmmword ptr[eax+8*4] + mulps xmm4,xmm1 + addps xmm4,xmm0 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm5,xmmword ptr[eax+12*4] + mulps xmm5,xmm1 + addps xmm5,xmm0 + movaps xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopu: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movups xmm2,xmmword ptr[eax] + mulps xmm2,xmm1 + addps xmm2,xmm0 + movups xmmword ptr[edx],xmm2 + + movups xmm3,xmmword ptr[eax+4*4] + mulps xmm3,xmm1 + addps xmm3,xmm0 + movups xmmword ptr[edx+4*4],xmm3 + + movups xmm4,xmmword ptr[eax+8*4] + mulps xmm4,xmm1 + addps xmm4,xmm0 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm5,xmmword ptr[eax+12*4] + mulps xmm5,xmm1 + addps xmm5,xmm0 + movups xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + loop loopu + } + } + + src += n<<4,dst += n<<4; +zero: + while(cnt--) *(dst++) = *(src++)*opmul+opadd; + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) + ScaleAltivec(dst,src,opmul,opadd,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + while(n--) { + dst[0] = src[0]*opmul+opadd; dst[1] = src[1]*opmul+opadd; + dst[2] = src[2]*opmul+opadd; dst[3] = src[3]*opmul+opadd; + dst[4] = src[4]*opmul+opadd; dst[5] = src[5]*opmul+opadd; + dst[6] = src[6]*opmul+opadd; dst[7] = src[7]*opmul+opadd; + src += 8,dst += 8; + } + while(cnt--) *(dst++) = *(src++)*opmul+opadd; + } +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,const t_sample *opadd,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMulC_32f((const float *)src,(float)opmul,(float *)dst,cnt); + ippsAdd_32f_I((float *)opadd,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMulC_64f((const double *)src,(double)opmul,(double *)dst,cnt); + ippsAdd_64f_I((double *)opadd,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [opmul] + shufps xmm0,xmm0,0 + } + + if(VectorsAligned(src,dst,opadd)) { + // aligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [opadd] +loopa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm2,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movaps xmmword ptr[edx],xmm2 + + movaps xmm3,xmmword ptr[eax+4*4] + movaps xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movaps xmmword ptr[edx+4*4],xmm3 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm5,xmmword ptr[eax+12*4] + movaps xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movaps xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [opadd] +loopu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm2,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movups xmmword ptr[edx],xmm2 + + movups xmm3,xmmword ptr[eax+4*4] + movups xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movups xmmword ptr[edx+4*4],xmm3 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm5,xmmword ptr[eax+12*4] + movups xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movups xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + loop loopu + } + } + + src += n<<4,dst += n<<4,opadd += n<<4; +zero: + while(cnt--) *(dst++) = *(src++) * opmul + *(opadd++); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst,opadd)) + ScaleAltivec(dst,src,opmul,opadd,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + if(dst == opadd) { + while(n--) { + dst[0] += src[0]*opmul; dst[1] += src[1]*opmul; + dst[2] += src[2]*opmul; dst[3] += src[3]*opmul; + dst[4] += src[4]*opmul; dst[5] += src[5]*opmul; + dst[6] += src[6]*opmul; dst[7] += src[7]*opmul; + src += 8,dst += 8; + } + while(cnt--) *(dst++) += *(src++)*opmul; + } + else { + while(n--) { + dst[0] = src[0]*opmul+opadd[0]; dst[1] = src[1]*opmul+opadd[1]; + dst[2] = src[2]*opmul+opadd[2]; dst[3] = src[3]*opmul+opadd[3]; + dst[4] = src[4]*opmul+opadd[4]; dst[5] = src[5]*opmul+opadd[5]; + dst[6] = src[6]*opmul+opadd[6]; dst[7] = src[7]*opmul+opadd[7]; + src += 8,dst += 8,opadd += 8; + } + while(cnt--) *(dst++) = *(src++)*opmul+*(opadd++); + } + } +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ScaleSamples(t_sample *dst,const t_sample *src,const t_sample *opmul,const t_sample *opadd,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMul_32f((const float *)src,(const float *)opmul,(float *)dst,cnt); + ippsAdd_32f_I((const float *)opadd,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMul_64f((const double *)src,(const double *)opmul,(double *)dst,cnt); + ippsAdd_64f_I((const double *)opadd,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + } + + if(VectorsAligned(src,dst,opmul,opadd)) { + // aligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov esi,dword ptr [opmul] + mov ebx,dword ptr [opadd] +loopa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [esi+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + prefetcht0 [esi+96] + + movaps xmm2,xmmword ptr[eax] + movaps xmm0,xmmword ptr[esi] + movaps xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movaps xmmword ptr[edx],xmm2 + + movaps xmm3,xmmword ptr[eax+4*4] + movaps xmm0,xmmword ptr[esi+4*4] + movaps xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movaps xmmword ptr[edx+4*4],xmm3 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm0,xmmword ptr[esi+8*4] + movaps xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm5,xmmword ptr[eax+12*4] + movaps xmm0,xmmword ptr[esi+12*4] + movaps xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movaps xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + add esi,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov esi,dword ptr [opmul] + mov ebx,dword ptr [opadd] +loopu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [esi+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + prefetcht0 [esi+96] + + movups xmm2,xmmword ptr[eax] + movups xmm0,xmmword ptr[esi] + movups xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movups xmmword ptr[edx],xmm2 + + movups xmm3,xmmword ptr[eax+4*4] + movups xmm0,xmmword ptr[esi+4*4] + movups xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movups xmmword ptr[edx+4*4],xmm3 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm0,xmmword ptr[esi+8*4] + movups xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm5,xmmword ptr[eax+12*4] + movups xmm0,xmmword ptr[esi+12*4] + movups xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movups xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + add esi,16*4 + loop loopu + } + } + src += n<<4,dst += n<<4,opmul += n<<4,opadd += n<<4; +zero: + while(cnt--) *(dst++) = *(src++) * *(opmul++) + *(opadd++); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst,opmul,opadd)) + ScaleAltivec(dst,src,opmul,opadd,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + if(dst == opadd) { + while(n--) { + dst[0] += src[0]*opmul[0]; dst[1] += src[1]*opmul[1]; + dst[2] += src[2]*opmul[2]; dst[3] += src[3]*opmul[3]; + dst[4] += src[4]*opmul[4]; dst[5] += src[5]*opmul[5]; + dst[6] += src[6]*opmul[6]; dst[7] += src[7]*opmul[7]; + src += 8,dst += 8,opmul += 8; + } + while(cnt--) *(dst++) += *(src++) * *(opmul++); + } + else { + while(n--) { + dst[0] = src[0]*opmul[0]+opadd[0]; dst[1] = src[1]*opmul[1]+opadd[1]; + dst[2] = src[2]*opmul[2]+opadd[2]; dst[3] = src[3]*opmul[3]+opadd[3]; + dst[4] = src[4]*opmul[4]+opadd[4]; dst[5] = src[5]*opmul[5]+opadd[5]; + dst[6] = src[6]*opmul[6]+opadd[6]; dst[7] = src[7]*opmul[7]+opadd[7]; + src += 8,dst += 8,opmul += 8,opadd += 8; + } + while(cnt--) *(dst++) = *(src++)* *(opmul++) + *(opadd++); + } + } +#endif +} + +#include "flpopns.h" + +#endif // __FLEXT_SIMD_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flstdc.h b/externals/grill/trunk/flext/libbuild/include/flext/flstdc.h new file mode 100755 index 0000000000000000000000000000000000000000..c18d544530150a35b70efa9e7f1e26b3b224b844 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flstdc.h @@ -0,0 +1,333 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flstdc.h + \brief Definitions to unite Max/MSP and PD notions + + This file contains a few definitions to unite a few of the notions that + once drifted apart in Max and PD. It is not elegant but helps. +*/ + +#ifndef __FLEXT_STDC_H +#define __FLEXT_STDC_H + +#if defined(_MSC_VER) && (_MSC_VER < 0x1300) +/* + include math.h here - when included with PD or Max/MSP headers, + C linkage would be used which disturbs MSVC6 +*/ +#include <cmath> +#endif + +#ifdef _MSC_VER +#include <crtdbg.h> +#endif +#include <cassert> + +// PD stuff + +#if FLEXT_SYS == FLEXT_SYS_PD + +/* PD definitions start here */ + +#ifdef _MSC_VER + #pragma warning (push) + #pragma warning (disable:4091 4005) +#endif + +#if FLEXT_OS == FLEXT_OS_WIN && !defined(NT) +#define NT +#endif + +extern "C" { + // Include the relevant PD header files + #ifdef FLEXT_DEBUG + /* PD header file structure has changed with version 0.37 + from then on m_imp.h needs m_pd.h to be included before + on the other hand versions < 0.37 don't like that.... + (they want m_imp.h solely as m_pd.h is included therein) + So better use the m_pd.h here also for the debug version. + Change that if really needed for debugging PD internals... + */ + + #ifndef PD_VERSION + // include only if not already included + #include <m_pd.h> + #endif +// #include <m_imp.h> // for easier debugging + #else + #ifndef PD_VERSION + // include only if not already included + #include <m_pd.h> + #endif + #endif +} + +#ifdef _MSC_VER + #pragma warning (pop) +#endif + +#include "flpushns.h" + +#ifdef cabs +#undef cabs // this is defined in m_pd.h (clashes with math.h in MacOSX) +#endif + +typedef t_object t_sigobj; +typedef t_gpointer *t_ptrtype; + +typedef t_float t_flint; +typedef t_symbol *t_symtype; +typedef t_class **t_thing; + +typedef t_clock t_qelem; + +#define A_NOTHING A_NULL +#define A_FLINT A_FLOAT +#define A_DEFFLINT A_DEFFLOAT +#define A_DEFSYMBOL A_DEFSYM + +#include "flpopns.h" + + +#elif FLEXT_SYS == FLEXT_SYS_MAX + +/* -------------- Max/MSP ------------------- */ + +// 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 + +#if FLEXT_OS == FLEXT_OS_MAC + #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH + // MachO version - must insert prefix header + #include <Carbon/Carbon.h> + #else + // CFM version + #ifndef __MRC__ + #define powerc + #endif + #define __MOTO__ 0 + + #include <MacTypes.h> + #endif +#elif FLEXT_OS == FLEXT_OS_WIN + #define WIN_VERSION 1 + #define WIN_EXT_VERSION 1 +#endif + +// necessary for the old OS9 SDK +extern "C" { + +#include "ext.h" +#include "ext_user.h" +#if FLEXT_OS != FLEXT_OS_MAC || defined(MAC_VERSION) +// doesn't exist for OS9 +#include "ext_critical.h" +#include "buffer.h" +#else +// for OS9 include "inofficial" header file +#include "flmspbuffer.h" +#endif +#include "z_dsp.h" +#include "ext_obex.h" + +// check for Max5 SDK +#include "commonsyms.h" +#if C74_MAX_SDK_VERSION >= 0x0500 || COMMON_SYMBOLS_VERSION >= 500 + #define _FLEXT_MAX5SDK +#endif + +} // extern "C" + +#include "flpushns.h" + +#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; + +typedef t_int t_flint; +typedef t_symbol *t_symtype; +typedef t_object *t_thing; + +#ifndef _FLEXT_MAX5SDK + // for the following to work you should have the latest SDK + #if FLEXT_OS == FLEXT_OS_MAC //&& !defined(MAC_VERSION) + typedef struct qelem t_qelem; + #else + typedef void *t_qelem; + #endif +#endif + +typedef method t_method; +typedef method t_newmethod; +typedef int t_atomtype; + +#ifndef _FLEXT_MAX5SDK +typedef struct clock t_clock; // this is defined in the Max5 SDK +#endif + +typedef void t_binbuf; + +#undef clock_free +#define clock_free(tick) freeobject((object *)tick) + +#define A_NULL A_NOTHING +#define A_DEFFLINT A_DEFLONG + +#ifndef A_INT +#define A_INT A_LONG +#endif + +#ifndef A_DEFINT +#define A_DEFINT A_DEFLONG +#endif + +#ifndef A_SYMBOL +#define A_SYMBOL A_SYM +#endif + +#ifndef A_DEFSYMBOL +#define A_DEFSYMBOL A_DEFSYM +#endif + +#if FLEXT_OS == FLEXT_OS_MAC && !defined(MAC_VERSION) +// simulate non-existing functions for OS9 +#define critical_enter(N) +#define critical_exit(N) +#endif + +#ifdef _MSC_VER +#pragma pack(pop,flext_maxsdk) +#endif + +#include "flpopns.h" + +#else +#error Platform not supported +#endif // FLEXT_SYS + + +// general definitions + +#include "flpushns.h" + +typedef t_symbol *t_symptr; + +// ------------------------- + +#ifdef FLEXT_LOGGING +/* If FLEXT_LOGGING is defined implement logging */ + +#ifdef _MSC_VER +#define FLEXT_LOG(s) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s) +#define FLEXT_LOG1(s,v1) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1) +#define FLEXT_LOG2(s,v1,v2) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2) +#define FLEXT_LOG3(s,v1,v2,v3) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3) +#define FLEXT_LOG4(s,v1,v2,v3,v4) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4) +#define FLEXT_LOG5(s,v1,v2,v3,v4,v5) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5) +#define FLEXT_LOG6(s,v1,v2,v3,v4,v5,v6) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5,v6) +#define FLEXT_LOG7(s,v1,v2,v3,v4,v5,v6,v7) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5,v6,v7) +#define FLEXT_LOG8(s,v1,v2,v3,v4,v5,v6,v7,v8) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5,v6,v7,v8) +#define FLEXT_LOG9(s,v1,v2,v3,v4,v5,v6,v7,v8,v9) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5,v6,v7,v8,v9) +#else +#define FLEXT_LOG(s) post(s) +#define FLEXT_LOG1(s,v1) post(s,v1) +#define FLEXT_LOG2(s,v1,v2) post(s,v1,v2) +#define FLEXT_LOG3(s,v1,v2,v3) post(s,v1,v2,v3) +#define FLEXT_LOG4(s,v1,v2,v3,v4) post(s,v1,v2,v3,v4) +#define FLEXT_LOG5(s,v1,v2,v3,v4,v5) post(s,v1,v2,v3,v4,v5) +#define FLEXT_LOG6(s,v1,v2,v3,v4,v5,v6) post(s,v1,v2,v3,v4,v5,v6) +#define FLEXT_LOG7(s,v1,v2,v3,v4,v5,v6,v7) post(s,v1,v2,v3,v4,v5,v6,v7) +#define FLEXT_LOG8(s,v1,v2,v3,v4,v5,v6,v7,v8) post(s,v1,v2,v3,v4,v5,v6,v7,v8) +#define FLEXT_LOG9(s,v1,v2,v3,v4,v5,v6,v7,v8,v9) post(s,v1,v2,v3,v4,v5,v6,v7,v8,v9) +#endif + +#else + +/* If FLEXT_LOGGING is not defined avoid logging */ +#define FLEXT_LOG(s) ((void)0) +#define FLEXT_LOG1(s,v1) ((void)0) +#define FLEXT_LOG2(s,v1,v2) ((void)0) +#define FLEXT_LOG3(s,v1,v2,v3) ((void)0) +#define FLEXT_LOG4(s,v1,v2,v3,v4) ((void)0) +#define FLEXT_LOG5(s,v1,v2,v3,v4,v5) ((void)0) +#define FLEXT_LOG6(s,v1,v2,v3,v4,v5,v6) ((void)0) +#define FLEXT_LOG7(s,v1,v2,v3,v4,v5,v6,v7) ((void)0) +#define FLEXT_LOG8(s,v1,v2,v3,v4,v5,v6,v7,v8) ((void)0) +#define FLEXT_LOG9(s,v1,v2,v3,v4,v5,v6,v7,v8,v9) ((void)0) + +#endif + +#ifdef FLEXT_DEBUG +#ifdef _MSC_VER +#define FLEXT_ASSERT(b) do { if(!(b)) _CrtDbgReport(_CRT_ASSERT,__FILE__,__LINE__,"flext",#b); } while(false) +#define FLEXT_WARN(str) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",NULL) +#define FLEXT_ERROR(str) _CrtDbgReport(_CRT_ERROR,__FILE__,__LINE__,"flext",NULL) +#else +#define FLEXT_ASSERT(b) assert(b) +//#define FLEXT_ASSERT(b) do { if(!(b)) error("Assertion failed: " #b " - in " __FILE__ " line %i",(int)__LINE__); } while(false) +#define FLEXT_WARN(str) error("Warning: in " __FILE__ " line %i",(int)__LINE__) +#define FLEXT_ERROR(str) error("Error: in " __FILE__ " line %i",(int)__LINE__) +#endif +#else +#define FLEXT_ASSERT(b) assert(1) +#define FLEXT_WARN(str) assert(1) +#define FLEXT_ERROR(str) error("Error: in " __FILE__ " line %i",(int)__LINE__) +#endif + +#define ERRINTERNAL() error("flext: Internal error in file " __FILE__ ", line %i - please report",(int)__LINE__) + + +// ----- disable attribute editor for PD version < devel_0_36 or 0.37 +#ifndef PD_MAJOR_VERSION +# undef FLEXT_NOATTREDIT +# define FLEXT_NOATTREDIT +#endif + + +// ----- set message queue mode ----- +#if FLEXT_SYS == FLEXT_SYS_PD && PD_MINOR_VERSION >= 37 +// for PD version >= 0.37test10 FLEXT_PDLOCK is standard +# undef FLEXT_PDLOCK +# define FLEXT_PDLOCK +#endif + +#ifndef FLEXT_QMODE +# if FLEXT_SYS == FLEXT_SYS_PD && PD_MINOR_VERSION >= 38 && defined(PD_DEVEL_VERSION) +// use idle callback +# define FLEXT_QMODE 1 +# elif defined(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_QMODE 2 +# else +# define FLEXT_QMODE 0 +# endif +# else +# error FLEXT_PDLOCK can only be defined with PD +# endif +# else +# define FLEXT_QMODE 0 +# endif +#endif + +#ifndef FLEXT_QMODE +# error Internal error: Queueing mode not defined +#endif + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flsupport.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flsupport.cpp new file mode 100755 index 0000000000000000000000000000000000000000..ae02443f20a04f7f46a9f476e4ae2368a13ce0b3 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flsupport.cpp @@ -0,0 +1,328 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flsupport.cpp + \brief flext support functions and classes. +*/ + +#ifndef __FLEXT_SUPPORT_CPP +#define __FLEXT_SUPPORT_CPP + +#include "flext.h" + +#include <cstdio> +#include <cstdarg> +#include <cstdlib> +#include <cstring> +#include <new> + +#include "flpushns.h" + +#ifdef _MSC_VER +#define vsnprintf _vsnprintf +#define snprintf _snprintf +#endif + +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym__ = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_float = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_symbol = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_bang = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_list = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_pointer = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_int = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_signal = NULL; + +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_anything = NULL; + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_buffer = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_size = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_dirty = NULL; +#endif + +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_attributes = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_methods = NULL; + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::indsp = false; + + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::Version() { return FLEXT_VERSION; } +FLEXT_TEMPIMPL(const char *FLEXT_CLASSDEF(flext))::VersionStr() { return FLEXT_VERSTR; } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Setup() +{ + if(sym__) return; + +#if FLEXT_SYS == FLEXT_SYS_PD + sym__ = &s_; + sym_anything = &s_anything; + sym_pointer = &s_pointer; + sym_float = &s_float; + sym_symbol = &s_symbol; + sym_bang = &s_bang; + sym_list = &s_list; + sym_signal = &s_signal; + sym_int = flext::MakeSymbol("int"); +#elif FLEXT_SYS == FLEXT_SYS_MAX + sym__ = flext::MakeSymbol(""); + sym_int = flext::MakeSymbol("int"); + sym_float = flext::MakeSymbol("float"); + sym_symbol = flext::MakeSymbol("symbol"); + sym_bang = flext::MakeSymbol("bang"); + sym_list = flext::MakeSymbol("list"); + sym_anything = flext::MakeSymbol("anything"); + sym_signal = flext::MakeSymbol("signal"); + + sym_buffer = flext::MakeSymbol("buffer~"); + sym_size = flext::MakeSymbol("size"); + sym_dirty = flext::MakeSymbol("dirty"); +#endif + + sym_attributes = flext::MakeSymbol("attributes"); + sym_methods = flext::MakeSymbol("methods"); + +#ifdef FLEXT_THREADS + thrid = GetThreadId(); + StartHelper(); +#endif +} + + +#if FLEXT_SYS == FLEXT_SYS_PD && defined(FLEXT_THREADED) && defined(FLEXT_PDLOCK) +#define SYSLOCK() sys_lock() +#define SYSUNLOCK() sys_unlock() +#else +#define SYSLOCK() (void)0 +#define SYSUNLOCK() (void)0 +#endif + + +///////////////////////////////////////////////////////// +// overloaded new/delete memory allocation methods +// +///////////////////////////////////////////////////////// + +#define LARGEALLOC 32000 + +#ifndef FLEXT_USE_CMEM + +#ifdef FLEXT_DEBUGMEM +static const size_t memtest = 0x12345678L; +#endif + +FLEXT_TEMPIMPL(void *FLEXT_CLASSDEF(flext_root))::operator new(size_t bytes) +{ + bytes += sizeof(size_t); +#ifdef FLEXT_DEBUGMEM + bytes += sizeof(memtest)*2; +#endif + char *blk; + if(UNLIKELY(bytes >= LARGEALLOC)) { +#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) + blk = (char *)sysmem_newptr(bytes); +#else + // use C library function for large memory blocks + blk = (char *)malloc(bytes); +#endif + } + else { + //! We need system locking here for secondary threads! + SYSLOCK(); + blk = (char *)getbytes(bytes); + SYSUNLOCK(); + } + + FLEXT_ASSERT(blk); + + *(size_t *)blk = bytes; +#ifdef FLEXT_DEBUGMEM + *(size_t *)(blk+sizeof(size_t)) = memtest; + *(size_t *)(blk+bytes-sizeof(memtest)) = memtest; + return blk+sizeof(size_t)+sizeof(memtest); +#else + return blk+sizeof(size_t); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::operator delete(void *blk) +{ + if(!blk) return; + + FLEXT_ASSERT(MemCheck(blk)); + +#ifdef FLEXT_DEBUGMEM + char *ori = (char *)blk-sizeof(size_t)-sizeof(memtest); +#else + char *ori = (char *)blk-sizeof(size_t); +#endif + size_t bytes = *(size_t *)ori; + + if(UNLIKELY(bytes >= LARGEALLOC)) { +#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) + sysmem_freeptr(ori); +#else + // use C library function for large memory blocks + free(ori); +#endif + } + else { + //! We need system locking here for secondary threads! + SYSLOCK(); + freebytes(ori,bytes); + SYSUNLOCK(); + } +} + +#ifdef FLEXT_DEBUGMEM +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_root))::MemCheck(void *blk) +{ + char *ori = (char *)blk-sizeof(size_t)-sizeof(memtest); + size_t bytes = *(size_t *)ori; + + return + *(size_t *)((char *)ori+sizeof(size_t)) == memtest && + *(size_t *)((char *)ori+bytes-sizeof(memtest)) == memtest; +} +#endif + +#endif + +FLEXT_TEMPIMPL(void *FLEXT_CLASSDEF(flext_root))::NewAligned(size_t bytes,int bitalign) +{ + const size_t ovh = sizeof(size_t)+sizeof(char *); + const size_t alignovh = bitalign/8-1; + bytes += ovh+alignovh; + + char *blk; + if(UNLIKELY(bytes >= LARGEALLOC)) { +#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) + blk = (char *)sysmem_newptr(bytes); +#else + // use C library function for large memory blocks + blk = (char *)malloc(bytes); +#endif + } + else { + //! We need system locking here for secondary threads! + SYSLOCK(); + +#if defined(FLEXT_USE_CMEM) + blk = (char *)malloc(bytes); +#else + blk = (char *)getbytes(bytes); +#endif + SYSUNLOCK(); + } + FLEXT_ASSERT(blk); + + char *ablk = reinterpret_cast<char *>((reinterpret_cast<size_t>(blk)+ovh+alignovh) & ~alignovh); + *(char **)(ablk-sizeof(size_t)-sizeof(char *)) = blk; + *(size_t *)(ablk-sizeof(size_t)) = bytes; + return ablk; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::FreeAligned(void *blk) +{ + FLEXT_ASSERT(blk); + + char *ori = *(char **)((char *)blk-sizeof(size_t)-sizeof(char *)); + size_t bytes = *(size_t *)((char *)blk-sizeof(size_t)); + + if(UNLIKELY(bytes >= LARGEALLOC)) { +#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) + sysmem_freeptr(ori); +#else + // use C library function for large memory blocks + free(ori); +#endif + } + else { + //! We need system locking here for secondary threads! + SYSLOCK(); + +#if defined(FLEXT_USE_CMEM) + free(ori); +#else + freebytes(ori,bytes); +#endif + SYSUNLOCK(); + } +} + +// ------------------------------------------ + +/*! \todo there is probably also a shortcut for Max and jMax + \todo size checking +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::GetAString(const t_atom &a,char *buf,size_t szbuf) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + atom_string(const_cast<t_atom *>(&a),buf,(int)szbuf); +#else + if(IsSymbol(a)) STD::strncpy(buf,GetString(a),szbuf); + else if(IsFloat(a)) STD::snprintf(buf,szbuf,"%f",GetFloat(a)); + else if(IsInt(a)) STD::snprintf(buf,szbuf,"%i",GetInt(a)); + else *buf = 0; +#endif +} + +FLEXT_TEMPIMPL(unsigned long FLEXT_CLASSDEF(flext))::AtomHash(const t_atom &a) +{ +#if FLEXT_SYS == FLEXT_SYS_MAX || FLEXT_SYS == FLEXT_SYS_PD + return ((unsigned long)a.a_type<<28)^*(unsigned long *)&a.a_w; +#else +#error Not implemented +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::post(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + + char buf[1024]; + vsnprintf(buf,sizeof buf,fmt, ap); + buf[sizeof buf-1] = 0; // in case of full buffer + +#if FLEXT_SYS == FLEXT_SYS_MAX && C74_MAX_SDK_VERSION >= 0x0500 + ::object_post(NULL,buf); +#else + ::post(buf); +#endif + + va_end(ap); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::error(const char *fmt,...) +{ + va_list ap; + va_start(ap, fmt); + + char buf[1024]; + STD::strcpy(buf,"error: "); + vsnprintf(buf+7,sizeof buf-7,fmt, ap); + buf[sizeof buf-1] = 0; // in case of full buffer + +#if FLEXT_SYS == FLEXT_SYS_MAX + #if C74_MAX_SDK_VERSION >= 0x0500 + ::object_error(NULL,buf); + #else + ::error(buf); + #endif +#else + ::post(buf); +#endif + + va_end(ap); +} + +#include "flpopns.h" + +#endif // __FLEXT_SUPPORT_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flsupport.h b/externals/grill/trunk/flext/libbuild/include/flext/flsupport.h new file mode 100755 index 0000000000000000000000000000000000000000..0bd61e7de4195f8f9a549a649b6d289e7ba543b8 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flsupport.h @@ -0,0 +1,1405 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flsupport.h + \brief flext support functions and classes +*/ + +#ifndef __FLSUPPORT_H +#define __FLSUPPORT_H + +#include "flstdc.h" +#include <new> +#include <cstring> + + +#include "flpushns.h" + +#if C74_MAX_SDK_VERSION >= 0x0610 +// really bad: post and error are #defines in Max SDK >= 610 +#undef post +#undef error +#endif + +/*! \defgroup FLEXT_SUPPORT Flext support classes + @{ +*/ + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_root); + +typedef FLEXT_TEMPINST(FLEXT_SHARE FLEXT_CLASSDEF(flext_root)) flext_root; + +/*! \brief Flext root support class + + Moved memory functions and console output here so that all the classes + contained in flext can use them +*/ +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext_root) { +public: +// --- console output ----------------------------------------------- + + //! post message to console, with line feed (limited to 1k chars!) + static void post(const char *fmt,...); + //! post error message to console (limited to 1k chars!) + static void error(const char *fmt,...); + +// --- memory ------------------------------------------------------- + + /*! \defgroup FLEXT_S_MEMORY Memory allocation functions + @{ + */ + +#ifdef FLEXT_NOGLOBALNEW +#error FLEXT_NOGLOBALNEW is deprecated, define FLEXT_USE_CMEM instead +#define FLEXT_USE_CMEM +#endif + +#ifdef FLEXT_USE_CMEM + inline void *operator new(size_t bytes) { return ::operator new(bytes); } + inline void operator delete(void *blk) { ::operator delete(blk); } + + inline void *operator new[](size_t bytes) { return ::operator new[](bytes); } + inline void operator delete[](void *blk) { ::operator delete[](blk); } + + static bool MemCheck(void *) { return true; } +#else + /*! Overloaded new memory allocation method + \note this uses a fast allocation method of the real-time system + \warning Max/MSP (or MacOS) allows only 32K in overdrive mode! + */ + void *operator new(size_t bytes); + //! Overloaded delete method + void operator delete(void *blk); + +#ifndef __MRC__ // doesn't allow new[] overloading?! + inline void *operator new[](size_t bytes) { return operator new(bytes); } + inline void operator delete[](void *blk) { operator delete(blk); } +#endif + +#ifdef FLEXT_DEBUGMEM + static bool MemCheck(void *blk); +#else + static bool MemCheck(void *) { return true; } +#endif + +#endif // USECMEM + +#ifndef __BORLANDC__ + inline void *operator new(size_t,void *p) { return p; } + inline void operator delete(void *,void *) {} +#ifndef __MRC__ + inline void *operator new[](size_t,void *p) { return p; } + inline void operator delete[](void *,void *) {} +#endif +#endif + + //! Get an aligned memory block + static void *NewAligned(size_t bytes,int bitalign = 128); + // same with templated type + template<typename T> + static T *NewAligned(size_t times,int bitalign = 128) { return static_cast<T *>(NewAligned(times*sizeof(T),bitalign)); } + //! Free an aligned memory block + static void FreeAligned(void *blk); + //! Test for alignment + static bool IsAligned(void *ptr,int bitalign = 128) { + return (reinterpret_cast<size_t>(ptr)&(bitalign-1)) == 0; + } + //! @} FLEXT_S_MEMORY +}; + +#ifndef FLEXT_USE_CMEM +/************************************************************************/ +// MFC doesn't like global overloading of allocators +// anyway, who likes MFC + +#if !defined(_MSC_VER) && !defined(__BORLANDC__) +#define NEWTHROW throw(std::bad_alloc) +#define DELTHROW throw() +#else +#define NEWTHROW +#define DELTHROW +#endif + +// define global new/delete operators +inline void *operator new(size_t bytes) NEWTHROW { return flext_root::operator new(bytes); } +inline void operator delete(void *blk) DELTHROW { flext_root::operator delete(blk); } +#ifndef __MRC__ // doesn't allow new[] overloading?! +inline void *operator new[](size_t bytes) NEWTHROW { return flext_root::operator new[](bytes); } +inline void operator delete[](void *blk) DELTHROW { flext_root::operator delete[](blk); } +#endif + +#endif // FLEXT_USE_CMEM + +/************************************************************************/ + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext); + +typedef FLEXT_TEMPINST(FLEXT_CLASSDEF(flext)) flext; + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_base); + +/*! \brief Flext support class + + A number of methods (most are static functions) are defined here for convenience. + This class doesn't define any data members, hence it can be inherited to all + classes (not only PD objects) to profit from the cross-platform functionality. + Examples are the overloaded memory allocation, atom and atom list functions, + thread functions and classes, the sample buffer class and others. + + This class can also be used for a non-object class (not representing an external object) + and won't give any extra burden to it. +*/ + +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext): + public flext_root +{ + /*! \defgroup FLEXT_SUPPORT Flext support class + @{ + */ +public: + +// --- version ----------------------------------------------- + + /*! \brief Flext version number + + Return the version number of the flext library. + For statically linked flext this is identical to the header definition FLEXT_VERSION, + otherwise it reflects the version number of the shared flext library. + */ + static int Version(); + + //! Flext version string + static const char *VersionStr(); + +// --- special typedefs --------------------------------------------- + +// later! +#if 0 + typedef t_float Float; + typedef t_int Int; + typedef t_sample Sample; + typedef const t_symbol *Symbol; + typedef t_atom Atom; +#endif + +// --- buffer/array stuff ----------------------------------------- + + /*! \defgroup FLEXT_S_BUFFER Buffer handling + @{ + */ + + //! Class for platform independent buffer handling + class FLEXT_SHARE buffer: + public flext_root + { + public: + +#if FLEXT_SYS == FLEXT_SYS_PD + typedef bool lock_t; +#elif FLEXT_SYS == FLEXT_SYS_MAX + typedef long lock_t; +#else +#error Not implemented +#endif + + +// PD 64-bit buffer handling macros +#if FLEXT_SYS == FLEXT_SYS_PD +# if PD_MINOR_VERSION >= 41 + /* use new garray support that is 64-bit safe */ +# define FLEXT_PD_ARRAYGRAB garray_getfloatwords +# define FLEXT_ARRAYTYPE t_word +# define FLEXT_GETSAMPLE(x) ((x).w_float) + +# else + /* use old garray support, not 64-bit safe */ +# define FLEXT_PD_ARRAYGRAB garray_getfloatarray +# define FLEXT_ARRAYTYPE t_sample +# define FLEXT_GETSAMPLE(x) (x) +# endif + +#elif FLEXT_SYS == FLEXT_SYS_MAX +# define FLEXT_ARRAYTYPE t_sample +# define FLEXT_GETSAMPLE(x) (x) +#endif + + class Element { + public: + Element() {} + Element(t_sample s) { FLEXT_GETSAMPLE(el) = s; } + operator t_sample &() { return FLEXT_GETSAMPLE(el); } + operator t_sample () const { return FLEXT_GETSAMPLE(el); } + protected: + FLEXT_ARRAYTYPE el; + }; + + /*! \brief Construct buffer. + \param s: symbol name, can be NULL + \param delayed = true: only sets name, needs another Set(NULL) to really initialize the buffer + \remark As externals can be created prior to the buffer objects they are pointing to, initialization should be done at loadbang! + */ + buffer(const t_symbol *s = NULL,bool delayed = false); + + //! Destroy buffer + ~buffer(); + + /*! \brief Check if the buffer is valid for use + \note This must be true to use any of the other functions except set + */ + bool Ok() const + { + return sym +#if FLEXT_SYS == FLEXT_SYS_PD + && arr +#endif + && data; + } + + /*! \brief Check if buffer content is valid (not in state of content change) + \note buffer must be Ok() + */ + bool Valid() const + { + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + return true; +#elif FLEXT_SYS == FLEXT_SYS_MAX + const t_buffer *p = (const t_buffer *)sym->s_thing; + return p && p->b_valid; +#else +#error not implemented +#endif + } + + /*! \brief Check and update if the buffer has been changed (e.g. resized) + \note buffer must be Ok() + */ + bool Update(); + + /*! \brief Lock buffer + \return previous state (needed for Unlock) + \note buffer must be Ok() + */ + lock_t Lock(); + + /*! \brief Unlock buffer + \param prv: Previous state is returned by Lock() + \note buffer must be Ok() + */ + void Unlock(lock_t prv); + + /*! \brief Set to specified buffer. + \param nameonly: if true sets name only, but doesn't look at buffer actually + \return -1 on failure, 0 on success, 1 if parameters (length, data ptr, channels) have changed + */ + int Set(const t_symbol *s = NULL,bool nameonly = false); + + /*! \brief Declare buffer content as dirty. + \param refr: if true forces immediate graphics refresh + */ + void Dirty(bool refr = false); + + //! Clear the dirty flag. + void ClearDirty(); + + /*! Query whether the buffer content has been changed since the last ClearDirty() + \note With mainstream versions of PD this will always return true, since the dirtiness can't be judged + */ + bool IsDirty() const; + + //! Get symbol of buffer + const t_symbol *Symbol() const { return sym; } + + //! Get literal name of buffer + const char *Name() const { return sym?GetString(sym):""; } + + /*! \brief Get pointer to buffer, channel and frame count. + \remark Channels are interleaved + */ + Element *Data() { return data; } + + const Element *Data() const { return data; } + + //! Get channel count + int Channels() const { return chns; } + //! Get frame count + int Frames() const { return frames; } + //! Set frame count + void Frames(int fr,bool keep = false,bool zero = true); + + //! Get data value in a platform-independent way + inline t_sample operator [](int index) const { return data[index]; } + + //! Reference data value in a platform-independent way + inline t_sample &operator [](int index) { return data[index]; } + + //! Graphic auto refresh interval + void SetRefrIntv(float intv); + + //! Buffer locking class + class Locker + { + public: + Locker(buffer &b): buf(b),lock(b.Lock()) {} + ~Locker() { buf.Unlock(lock); } + private: + buffer &buf; + lock_t lock; + }; + + protected: + //! buffer name + const t_symbol *sym; + //! array holding audio data + Element *data; + //! number of audio channels + int chns; + //! number of frames (multiplied by chns for the number of samples) + int frames; +#if FLEXT_SYS == FLEXT_SYS_PD + //! pointer to the PD array structure + t_garray *arr; + //! update interval + float interval; + //! flag signaling that the data has been changed + bool isdirty; + //! flag showing that the update clock is active + bool ticking; + //! update clock + t_clock *tick; + //! last time the dirty flag was cleared (using the clock_getlogicaltime function) + double cleantime; + + private: + //! update clock callback + static void cb_tick(buffer *b); +#elif FLEXT_SYS == FLEXT_SYS_MAX + //! last time the dirty flag was cleared (using the gettime function) + long cleantime; +#endif + }; + + +//! @} FLEXT_S_BUFFER + +// --- utilities -------------------------------------------------- + + /*! \defgroup FLEXT_S_UTIL Utility functions + @{ + */ + + //! Copy an atom + static void CopyAtom(t_atom *dst,const t_atom *src) { *dst = *src; } + + //! Copy atoms + static void CopyAtoms(int cnt,t_atom *dst,const t_atom *src); + + //! Print an atom + static bool PrintAtom(const t_atom &a,char *buf,size_t bufsz); + + /*! Scan an atom until whitespace + \return next token position, or NULL on failure + */ + static const char *ScanAtom(t_atom &a,const char *buf); + + //! Copy a list of atoms + static t_atom *CopyList(int argc,const t_atom *argv); + + //! Print an atom list + static bool PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz); + + /*! Scan an atom list + \param argc ... maximum amount of atoms scanned + \param argv ... array of atoms + \param buf ... char buffer + */ + static int ScanList(int argc,t_atom *argv,const char *buf); + + //! Copy a memory region + static void CopyMem(void *dst,const void *src,int bytes); + //! Copy a sample array + static void CopySamples(t_sample *dst,const t_sample *src,int cnt); + template<typename T> static void CopySamples(T *dst,const T *src,int cnt) { CopyMem(dst,src,sizeof(*src)*cnt); } + //! Set a memory region + static void ZeroMem(void *dst,int bytes); + //! Set a sample array to a fixed value + static void SetSamples(t_sample *dst,int cnt,t_sample s); + template<typename T> static void SetSamples(T *dst,int cnt,t_sample s) { for(int i = 0; i < cnt; ++i) dst[i] = s; } + //! Set a sample array to 0 + static void ZeroSamples(t_sample *dst,int cnt) { SetSamples(dst,cnt,0); } + template<typename T> static void ZeroSamples(T *dst,int cnt) { ZeroMem(dst,sizeof(*dst)*cnt); } + + + //! Get a 32 bit hash value from an atom + static unsigned long AtomHash(const t_atom &a); + +//! @} FLEXT_S_UTIL + +// --- various symbols -------------------------------------------- + + /*! \defgroup FLEXT_S_ATOM Atom/list handling + @{ + */ + + //! Symbol constant for "" + static const t_symbol *sym__; + //! Symbol constant for "float" + static const t_symbol *sym_float; + //! Symbol constant for "symbol" + static const t_symbol *sym_symbol; + //! Symbol constant for "bang" + static const t_symbol *sym_bang; + //! Symbol constant for "list" + static const t_symbol *sym_list; + //! Symbol constant for "anything" + static const t_symbol *sym_anything; + + /*! \brief Symbol constant for "int" + \note Only the Max/MSP system has this defined as an internal type + */ + static const t_symbol *sym_int; + + /*! Symbol constant for "pointer" + \note Only PD has this defined as an internal type + */ + static const t_symbol *sym_pointer; + + //! Symbol constant for "signal" + static const t_symbol *sym_signal; + + //! \note This is used in macros where the type of the arg is not clear + static const t_symbol *MakeSymbol(const t_symbol *s) { return s; } + + //! Make a symbol from a string + static const t_symbol *MakeSymbol(const char *s) { return ::gensym(const_cast<char *>(s)); } + //! Get symbol string + static const char *GetString(const t_symbol *s) { return s->s_name; } + //! Check for symbol and get string + static const char *GetAString(const t_symbol *s,const char *def = NULL) { return s?GetString(s):def; } + +// --- atom stuff ---------------------------------------- + + //! Set atom from another atom + static void SetAtom(t_atom &a,const t_atom &b) { CopyAtom(&a,&b); } + //! Compare two atoms + static int CmpAtom(const t_atom &a,const t_atom &b); + + // there are some more comparison functions for t_atom types outside the class + + //! Set atom from another atom + static int GetType(const t_atom &a) { return a.a_type; } + + //! Check whether the atom is nothing + static bool IsNothing(const t_atom &a) { return a.a_type == A_NULL; } + //! Set the atom to represent nothing + static void SetNothing(t_atom &a) { a.a_type = A_NULL; } + + //! Check whether the atom is a float + static bool IsFloat(const t_atom &a) { return a.a_type == A_FLOAT; } + + //! Check whether the atom can be represented as a float + static bool CanbeFloat(const t_atom &a) { return IsFloat(a) || IsInt(a); } + + //! Access the float value (without type check) + static float GetFloat(const t_atom &a) { return a.a_w.w_float; } + //! Set the atom to represent a float + static void SetFloat(t_atom &a,float v) { a.a_type = A_FLOAT; a.a_w.w_float = v; } + + //! Check whether the atom is a symbol + static bool IsSymbol(const t_atom &a) { return a.a_type == A_SYMBOL; } + +#if FLEXT_SYS == FLEXT_SYS_PD + //! Access the symbol value (without type check) + static const t_symbol *GetSymbol(const t_atom &a) { return const_cast<const t_symbol *>(a.a_w.w_symbol); } + //! Set the atom to represent a symbol + static void SetSymbol(t_atom &a,const t_symbol *s) { a.a_type = A_SYMBOL; a.a_w.w_symbol = const_cast<t_symbol *>(s); } +#elif FLEXT_SYS == FLEXT_SYS_MAX + //! Access the symbol value (without type check) + static const t_symbol *GetSymbol(const t_atom &a) { return const_cast<const t_symbol *>(a.a_w.w_sym); } + //! Set the atom to represent a symbol + static void SetSymbol(t_atom &a,const t_symbol *s) { a.a_type = A_SYMBOL; a.a_w.w_sym = const_cast<t_symbol *>(s); } +#else +#error +#endif + //! Check for a symbol and get its value + static const t_symbol *GetASymbol(const t_atom &a,const t_symbol *def = NULL) { return IsSymbol(a)?GetSymbol(a):def; } // NULL or empty symbol? + + //! Check whether the atom is a string + static bool IsString(const t_atom &a) { return IsSymbol(a); } + //! Access the string value (without type check) + static const char *GetString(const t_atom &a) { const t_symbol *s = GetSymbol(a); return s?GetString(s):NULL; } + //! Check for a string and get its value + static const char *GetAString(const t_atom &a,const char *def = NULL) { return IsSymbol(a)?GetAString(GetSymbol(a),def):def; } + //! Check for a string and get its value + static void GetAString(const t_atom &a,char *buf,size_t szbuf); + //! Set the atom to represent a string + static void SetString(t_atom &a,const char *c) { SetSymbol(a,MakeSymbol(c)); } + + //! Check whether the atom can be represented as an integer + static bool CanbeInt(const t_atom &a) { return IsFloat(a) || IsInt(a); } + +#if FLEXT_SYS == FLEXT_SYS_PD + //! Check for a float and get its value + static float GetAFloat(const t_atom &a,float def = 0) { return IsFloat(a)?GetFloat(a):def; } + + //! Check whether the atom is an integer + static bool IsInt(const t_atom &) { return false; } + //! Access the integer value (without type check) + static int GetInt(const t_atom &a) { return (int)GetFloat(a); } + //! Check for an integer and get its value + static int GetAInt(const t_atom &a,int def = 0) { return (int)GetAFloat(a,(float)def); } + //! Set the atom to represent a integer (depending on the system) + static void SetInt(t_atom &a,int v) { a.a_type = A_FLOAT; a.a_w.w_float = (float)v; } + +#ifndef FLEXT_COMPATIBLE + //! Check whether the atom strictly is a pointer + static bool IsPointer(const t_atom &a) { return a.a_type == A_POINTER; } + //! Check whether the atom can be a pointer + static bool CanbePointer(const t_atom &a) { return IsPointer(a); } + //! Access the pointer value (without type check) + static t_gpointer *GetPointer(const t_atom &a) { return a.a_w.w_gpointer; } + //! Check for a pointer and get its value + static t_gpointer *GetAPointer(const t_atom &a,t_gpointer *def = NULL) { return IsPointer(a)?GetPointer(a):def; } + //! Set the atom to represent a pointer + static void SetPointer(t_atom &a,t_gpointer *p) { a.a_type = A_POINTER; a.a_w.w_gpointer = (t_gpointer *)p; } +#endif + +#elif FLEXT_SYS == FLEXT_SYS_MAX + //! Check for a float and get its value + static float GetAFloat(const t_atom &a,float def = 0) { return IsFloat(a)?GetFloat(a):(IsInt(a)?GetInt(a):def); } + + //! Check whether the atom is an int + static bool IsInt(const t_atom &a) { return a.a_type == A_INT; } + //! Access the integer value (without type check) + static int GetInt(const t_atom &a) { return a.a_w.w_long; } + //! Check for an integer and get its value + static int GetAInt(const t_atom &a,int def = 0) { return IsInt(a)?GetInt(a):(IsFloat(a)?(int)GetFloat(a):def); } + //! Set the atom to represent an integer + static void SetInt(t_atom &a,int v) { a.a_type = A_INT; a.a_w.w_long = v; } +#else +#error "Platform not supported" +#endif + + // bool type - based on int + + //! Set the atom to represent a boolean + static void SetBool(t_atom &a,bool v) { SetInt(a,v?1:0); } + //! Check whether the atom can be represented as a boolean + static bool CanbeBool(const t_atom &a) { return CanbeInt(a); } + //! Check for an boolean and get its value + static bool GetABool(const t_atom &a) { return GetAInt(a) != 0; } + //! Check for an boolean and get its value + static bool GetBool(const t_atom &a) { return GetInt(a) != 0; } + +// --- atom list stuff ------------------------------------------- + + //! Class representing a list of atoms + class FLEXT_SHARE AtomList + : public flext_root + { + public: + //! Construct list + AtomList(): cnt(0),lst(NULL) {} + //! Construct list + explicit AtomList(int argc,const t_atom *argv = NULL): cnt(0),lst(NULL) { operator()(argc,argv); } + //! Construct list + AtomList(const AtomList &a): cnt(0),lst(NULL) { operator =(a); } + //! Destroy list + virtual ~AtomList(); + + //! Clear list + AtomList &Clear() { return operator()(); } + + //! Set list + AtomList &Set(int argc,const t_atom *argv,int offs = 0,bool resize = false); + //! Get list + int Get(t_atom *argv,int mxsz = -1) const; + + //! Set list + AtomList &operator()(int argc = 0,const t_atom *argv = NULL) { return Set(argc,argv,0,true); } + //! Set list by another AtomList + AtomList &operator =(const AtomList &a) { return operator()(a.Count(),a.Atoms()); } + + //! Compare list to another AtomList ( -1..< , 0..==, 1...> ) + int Compare(const AtomList &a) const; + + bool operator <(const AtomList &a) const { return Compare(a) < 0; } + bool operator <=(const AtomList &a) const { return Compare(a) <= 0; } + bool operator >(const AtomList &a) const { return Compare(a) > 0; } + bool operator >=(const AtomList &a) const { return Compare(a) >= 0; } + bool operator ==(const AtomList &a) const { return Compare(a) == 0; } + bool operator !=(const AtomList &a) const { return Compare(a) != 0; } + + //! Get number of atoms in the list + int Count() const { return cnt; } + //! Get a reference to an indexed atom + t_atom &operator [](int ix) { return lst[ix]; } + //! Get a reference to an indexed atom + const t_atom &operator [](int ix) const { return lst[ix]; } + + //! Get a pointer to the list of atoms + t_atom *Atoms() { return lst; } + //! Get a pointer to the list of atoms + const t_atom *Atoms() const { return lst; } + + //! Append an atom list to the list + AtomList &Append(int argc,const t_atom *argv = NULL) + { + int c = Count(); + Alloc(c+argc,0,c); + Set(argc,argv,c); + return *this; + } + + //! Prepend an atom list to the list + AtomList &Prepend(int argc,const t_atom *argv = NULL) + { + int c = Count(); + Alloc(c+argc,0,c,argc); + Set(argc,argv); + return *this; + } + + //! Append an atom to the list + AtomList &Append(const t_atom &a) { return Append(1,&a); } + //! Append an atom list to the list + AtomList &Append(const AtomList &a) { return Append(a.Count(),a.Atoms()); } + //! Prepend an atom to the list + AtomList &Prepend(const t_atom &a) { return Prepend(1,&a); } + //! Prepend an atom list to the list + AtomList &Prepend(const AtomList &a) { return Prepend(a.Count(),a.Atoms()); } + + //! Get a part of the list + void GetPart(int offs,int len,AtomList &ret) const; + //! Set to a part of the list + AtomList &Part(int offs,int len) { GetPart(offs,len,*this); return *this; } + + //! Represent as a string + bool Print(char *buffer,int buflen) const { return flext::PrintList(Count(),Atoms(),buffer,buflen); } + + /*! Read from string + \note: doesn't clear or reallocate the list + */ + int Scan(const char *buffer) { return flext::ScanList(Count(),Atoms(),buffer); } + + protected: + virtual void Alloc(int sz,int keepix = -1,int keeplen = -1,int keepto = 0); + virtual void Free(); + + int cnt; + t_atom *lst; + }; + + class FLEXT_SHARE AtomListStaticBase + : public AtomList + { + protected: + explicit AtomListStaticBase(int pc,t_atom *dt): precnt(pc),predata(dt) {} + virtual ~AtomListStaticBase(); + virtual void Alloc(int sz,int keepix = -1,int keeplen = -1,int keepto = 0); + virtual void Free(); + + AtomListStaticBase &operator =(const AtomList &a) { AtomList::operator =(a); return *this; } + AtomListStaticBase &operator =(const AtomListStaticBase &a) { AtomList::operator =(a); return *this; } + + const int precnt; + t_atom *const predata; + }; + + template<int PRE> + class AtomListStatic + : public AtomListStaticBase + { + public: + //! Construct list + explicit AtomListStatic(): AtomListStaticBase(PRE,pre) {} + //! Construct list + explicit AtomListStatic(int argc,const t_atom *argv = NULL): AtomListStaticBase(PRE,pre) { AtomList::operator()(argc,argv); } + //! Construct list + explicit AtomListStatic(const AtomList &a): AtomListStaticBase(PRE,pre) { operator =(a); } + + //! Set list by another AtomList + AtomListStatic &operator =(const AtomList &a) { AtomListStaticBase::operator =(a); return *this; } + AtomListStatic &operator =(const AtomListStatic &a) { AtomListStaticBase::operator =(a); return *this; } + protected: + t_atom pre[PRE]; + }; + + //! Class representing an "anything" + class FLEXT_SHARE AtomAnything: + public AtomList + { + public: + explicit AtomAnything(): hdr(NULL) {} + + //! Construct anything + explicit AtomAnything(const t_symbol *h,int argc = 0,const t_atom *argv = NULL) + : AtomList(argc,argv),hdr(h?h:sym__) + {} + + //! Construct anything + explicit AtomAnything(const char *h,int argc = 0,const t_atom *argv = NULL) + : AtomList(argc,argv),hdr(MakeSymbol(h)) + {} + + //! Construct anything + AtomAnything(const AtomAnything &a) + : AtomList(a),hdr(a.hdr) + {} + + //! Clear anything + AtomAnything &Clear() { return operator()(); } + + //! Get header symbol of anything + const t_symbol *Header() const { return hdr; } + + //! Set header symbol of anything + void Header(const t_symbol *h) { hdr = h; } + + //! Set anything + AtomAnything &operator()(const t_symbol *h = NULL,int argc = 0,const t_atom *argv = NULL) + { + hdr = h; AtomList::operator()(argc,argv); + return *this; + } + + //! Set list by another AtomAnything + AtomAnything &operator =(const AtomAnything &a) { return operator()(a.Header(),a.Count(),a.Atoms()); } + + protected: + const t_symbol *hdr; + }; + + + // double type - based on two floats + +#ifdef _MSC_VER +#pragma optimize("p",off) // improve floating point precision consistency +#endif + static t_atom *SetDouble(t_atom *dbl,double d) + { + float f = static_cast<float>(d); + float r = static_cast<float>(d-f); + SetFloat(dbl[0],f); + SetFloat(dbl[1],r); + return dbl; + } +#ifdef _MSC_VER +#pragma optimize("p",on) +#endif + + static double GetDouble(int argc,const t_atom *argv) + { + double d = argc >= 1?GetAFloat(argv[0]):0; + return argc >= 2?d+GetAFloat(argv[1]):d; + } + + static AtomList &SetDouble(AtomList &l,double d) { SetDouble(l(2).Atoms(),d); return l; } + + static double GetDouble(const AtomList &l) { return GetDouble(l.Count(),l.Atoms()); } + + //! @} FLEXT_S_ATOM + + +// --- messages ------------------------------------------------------- + + /*! \defgroup FLEXT_S_MSGBUNDLE Flext message handling + @{ + */ + + class MsgBundle; + + //! Make new message bundle + static MsgBundle *MsgNew(); + + //! Destroy message bundle + static void MsgFree(MsgBundle *mb); + + //! Send (and destroy) message bundle + static void ToSysMsg(MsgBundle *mb); + + //! Send (and destroy) message bundle + static void ToOutMsg(MsgBundle *mb); + + //! Send low priority (and destroy) message bundle + static void ToQueueMsg(MsgBundle *mb); + + //! @} FLEXT_S_MSGBUNDLE + + + /*! \defgroup FLEXT_S_MSG Flext message handling + @{ + */ + + static bool Forward(const t_symbol *sym,const t_symbol *s,int argc,const t_atom *argv); + static bool Forward(const t_symbol *sym,const AtomAnything &args) { return Forward(sym,args.Header(),args.Count(),args.Atoms()); } + static bool Forward(const char *sym,const AtomAnything &args) { return Forward(MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); } + static bool Forward(const t_symbol *sym,int argc,const t_atom *argv) { return Forward(sym,sym_list,argc,argv); } + static bool Forward(const t_symbol *sym,const AtomList &args) { return Forward(sym,args.Count(),args.Atoms()); } + static bool Forward(const char *sym,const AtomList &args) { return Forward(MakeSymbol(sym),args.Count(),args.Atoms()); } + + static bool SysForward(const t_symbol *sym,const t_symbol *s,int argc,const t_atom *argv); + static bool SysForward(const t_symbol *sym,const AtomAnything &args) { return SysForward(sym,args.Header(),args.Count(),args.Atoms()); } + static bool SysForward(const char *sym,const AtomAnything &args) { return SysForward(MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); } + static bool SysForward(const t_symbol *sym,int argc,const t_atom *argv) { return SysForward(sym,sym_list,argc,argv); } + static bool SysForward(const t_symbol *sym,const AtomList &args) { return SysForward(sym,args.Count(),args.Atoms()); } + static bool SysForward(const char *sym,const AtomList &args) { return SysForward(MakeSymbol(sym),args.Count(),args.Atoms()); } + + static bool QueueForward(const t_symbol *sym,const t_symbol *s,int argc,const t_atom *argv); + static bool QueueForward(const t_symbol *sym,const AtomAnything &args) { return QueueForward(sym,args.Header(),args.Count(),args.Atoms()); } + static bool QueueForward(const char *sym,const AtomAnything &args) { return QueueForward(MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); } + static bool QueueForward(const t_symbol *sym,int argc,const t_atom *argv) { return QueueForward(sym,sym_list,argc,argv); } + static bool QueueForward(const t_symbol *sym,const AtomList &args) { return QueueForward(sym,args.Count(),args.Atoms()); } + static bool QueueForward(const char *sym,const AtomList &args) { return QueueForward(MakeSymbol(sym),args.Count(),args.Atoms()); } + + static bool MsgForward(MsgBundle *mb,const t_symbol *sym,const t_symbol *s,int argc,const t_atom *argv); + static bool MsgForward(MsgBundle *mb,const t_symbol *sym,const AtomAnything &args) { return MsgForward(mb,sym,args.Header(),args.Count(),args.Atoms()); } + static bool MsgForward(MsgBundle *mb,const char *sym,const AtomAnything &args) { return MsgForward(mb,MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); } + static bool MsgForward(MsgBundle *mb,const t_symbol *sym,int argc,const t_atom *argv) { return MsgForward(mb,sym,sym_list,argc,argv); } + static bool MsgForward(MsgBundle *mb,const t_symbol *sym,const AtomList &args) { return MsgForward(mb,sym,args.Count(),args.Atoms()); } + static bool MsgForward(MsgBundle *mb,const char *sym,const AtomList &args) { return MsgForward(mb,MakeSymbol(sym),args.Count(),args.Atoms()); } + + //! @} FLEXT_S_MSG + + + +// --- thread stuff ----------------------------------------------- + + /*! \defgroup FLEXT_S_LOCK Global system locking + @{ + */ + +#if FLEXT_SYS == FLEXT_SYS_PD + #if PD_MINOR_VERSION >= 38 || (PD_MINOR_VERSION >= 37 && defined(PD_DEVEL_VERSION)) + static void Lock() { sys_lock(); } + static void Unlock() { sys_unlock(); } + #else + // no system locking for old PD versions + static void Lock() {} + static void Unlock() {} + #endif +#elif FLEXT_SYS == FLEXT_SYS_MAX + // Max 4.2 upwards! + static void Lock() { critical_enter(0); } + static void Unlock() { critical_exit(0); } +#else +#error +#endif + +//! @} FLEXT_S_LOCK + + /*! \defgroup FLEXT_S_THREAD Flext thread handling + @{ + */ + + //! Check if current thread is registered to be a secondary thread +#ifdef FLEXT_THREADS + static bool IsThreadRegistered(); +#else + static bool IsThreadRegistered() { return false; } +#endif + +#ifdef FLEXT_THREADS + + //! thread type +# if FLEXT_THREADS == FLEXT_THR_MP + typedef MPTaskID thrid_t; +# elif FLEXT_THREADS == FLEXT_THR_POSIX + typedef pthread_t thrid_t; +# elif FLEXT_THREADS == FLEXT_THR_WIN32 + typedef DWORD thrid_t; +# else +# error Threading model not supported +# endif + + /*! \brief Get current thread id + */ + static thrid_t GetThreadId() { +#if FLEXT_THREADS == FLEXT_THR_POSIX + return pthread_self(); +#elif FLEXT_THREADS == FLEXT_THR_MP + return MPCurrentTaskID(); +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + return GetCurrentThreadId(); +#else +#error +#endif + } + + /*! \brief Get system thread id + */ + static thrid_t GetSysThreadId() { return thrid; } + + //! Check if current thread should terminate + static bool ShouldExit(); + + //! Check if current thread is the realtime system's thread + static bool IsThread(thrid_t t,thrid_t ref = GetThreadId()) { +#if FLEXT_THREADS == FLEXT_THR_POSIX + return pthread_equal(ref,t) != 0; +#else + return ref == t; +#endif + } + + + /*! \brief Thread parameters + \internal + */ + class FLEXT_SHARE thr_params: + public flext_root + { + public: + thr_params(int n = 1): cl(NULL),var(new _data[n]) {} + ~thr_params() { delete[] var; } + + void set_any(const t_symbol *s,int argc,const t_atom *argv) { var[0]._any = new AtomAnything(s,argc,argv); } + void set_list(int argc,const t_atom *argv) { var[0]._list = new AtomList(argc,argv); } + + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *cl; + union _data { + bool _bool; + float _float; + int _int; + t_symptr _t_symptr; + AtomAnything *_any; + AtomList *_list; + void *_ext; + } *var; + }; + +protected: + + static thrid_t thrhelpid; + static thrid_t thrmsgid; + static void ThrHelper(void *); + + //! the system's thread id + static thrid_t thrid; // the system thread + +private: + static bool StartHelper(); // used in flext::Setup() + +public: + + /*! \brief Yield to other threads + \remark A call to this is only needed for systems with cooperative multitasking like MacOS<=9 + */ + static void ThrYield() { +#if FLEXT_THREADS == FLEXT_THR_POSIX + // for a preemptive system this should do nothing + sched_yield(); +#elif FLEXT_THREADS == FLEXT_THR_MP + MPYield(); +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + SwitchToThread(); +#else +#error +#endif + } + + /*! \brief Query whether task is preemptive + */ + static bool IsThreadPreemptive(thrid_t t = GetThreadId()) { +#if FLEXT_THREADS == FLEXT_THR_POSIX || FLEXT_THREADS == FLEXT_THR_WIN32 + return true; +#elif FLEXT_THREADS == FLEXT_THR_MP + return MPTaskIsPreemptive(t); +#else +#error +#endif + } + + + /*! \brief Increase/Decrease priority of a thread + */ + static bool RelPriority(int dp,thrid_t ref = GetSysThreadId(),thrid_t thr = GetThreadId()); + + /*! \brief Get priority of a thread + */ + static int GetPriority(thrid_t thr = GetThreadId()); + + /*! \brief Set priority of a thread + */ + static bool SetPriority(int p,thrid_t thr = GetThreadId()); + + /*! \brief Thread mutex + \sa pthreads documentation + */ + class FLEXT_SHARE ThrMutex: + public flext_root +#if FLEXT_THREADS == FLEXT_THR_POSIX + { + public: + //! Construct thread mutex + ThrMutex() { pthread_mutex_init(&mutex,NULL); } + //! Destroy thread mutex + ~ThrMutex() { pthread_mutex_destroy(&mutex); } + + //! Lock thread mutex + bool Lock() { return pthread_mutex_lock(&mutex) == 0; } + /*! Wait to lock thread mutex. + \todo Implement! + */ +// bool WaitForLock(double tm) { return pthread_mutex_lock(&mutex) == 0; } + //! Try to lock, but don't wait + bool TryLock() { return pthread_mutex_trylock(&mutex) == 0; } + //! Unlock thread mutex + bool Unlock() { return pthread_mutex_unlock(&mutex) == 0; } + + protected: + pthread_mutex_t mutex; +// int cnt; + }; +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + { + public: + //! Construct thread mutex + ThrMutex() { ::InitializeCriticalSection(&mutex); } + //! Destroy thread mutex + ~ThrMutex() { ::DeleteCriticalSection(&mutex); } + + //! Lock thread mutex + bool Lock() { ::EnterCriticalSection(&mutex); return true; } + /*! Wait to lock thread mutex. + \todo Implement! + */ +// bool WaitForLock(double tm) { return pthread_mutex_lock(&mutex) == 0; } + //! Try to lock, but don't wait + bool TryLock() { return ::TryEnterCriticalSection(&mutex) != 0; } + //! Unlock thread mutex + bool Unlock() { ::LeaveCriticalSection(&mutex); return true; } + + protected: + CRITICAL_SECTION mutex; + }; +#elif FLEXT_THREADS == FLEXT_THR_MP + { + public: + //! Construct thread mutex + ThrMutex() { MPCreateCriticalRegion(&crit); } + //! Destroy thread mutex + ~ThrMutex() { MPDeleteCriticalRegion(crit); } + + //! Lock thread mutex + bool Lock() { return MPEnterCriticalRegion(crit,kDurationForever) == noErr; } + //! Wait to lock thread mutex +// bool WaitForLock(double tm) { return MPEnterCriticalRegion(crit,tm*kDurationMicrosecond*1.e6) == noErr; } + //! Try to lock, but don't wait + bool TryLock() { return MPEnterCriticalRegion(crit,kDurationImmediate) == noErr; } + //! Unlock thread mutex + bool Unlock() { return MPExitCriticalRegion(crit) == noErr; } + + protected: + MPCriticalRegionID crit; + }; +#else +#error "Not implemented" +#endif + + /*! \brief Thread conditional + \sa pthreads documentation + */ + class FLEXT_SHARE ThrCond +#if FLEXT_THREADS == FLEXT_THR_POSIX + :public ThrMutex + { + public: + //! Construct thread conditional + ThrCond() { pthread_cond_init(&cond,NULL); } + //! Destroy thread conditional + ~ThrCond() { pthread_cond_destroy(&cond); } + + //! Wait for condition + bool Wait(); + + /*! Wait for condition (for a certain time). + \param ftime Wait time in seconds + \ret true = signalled, false = timed out + \remark If ftime = 0 this may suck away your cpu if used in a signalled loop. + \remark The time resolution of the implementation is required to be at least ms. + */ + bool TimedWait(double ftime); + + //! Signal condition + bool Signal() { return pthread_cond_signal(&cond) == 0; } + + protected: + pthread_cond_t cond; + }; +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + { + public: + //! Construct thread conditional + ThrCond() { cond = CreateEvent(NULL,FALSE,FALSE,NULL); } + //! Destroy thread conditional + ~ThrCond() { CloseHandle(cond); } + + //! Wait for condition + bool Wait() { return WaitForSingleObject(cond,INFINITE) == WAIT_OBJECT_0; } + + /*! Wait for condition (for a certain time). + \param ftime Wait time in seconds + \ret true = signalled, false = timed out + \remark If ftime = 0 this may suck away your cpu if used in a signalled loop. + \remark The time resolution of the implementation is required to be at least ms. + */ + bool TimedWait(double ftime) { return WaitForSingleObject(cond,(LONG)(ftime*1000)) == WAIT_OBJECT_0; } + + //! Signal condition + bool Signal() { return SetEvent(cond) != 0; } + + protected: + HANDLE cond; + }; +#elif FLEXT_THREADS == FLEXT_THR_MP + { + public: + //! Construct thread conditional + ThrCond() { MPCreateEvent(&ev); } + //! Destroy thread conditional + ~ThrCond() { MPDeleteEvent(ev); } + + //! Wait for condition + bool Wait() { return MPWaitForEvent(ev,NULL,kDurationForever) == noErr; } + + /*! \brief Wait for condition (for a certain time). + \param time Wait time in seconds + */ + bool TimedWait(double tm) { return MPWaitForEvent(ev,NULL,tm*kDurationMicrosecond*1.e6) == noErr; } + + //! Signal condition + bool Signal() { return MPSetEvent(ev,1) == noErr; } // one bit needs to be set at least + + protected: + MPEventID ev; + }; +#else +#error "Not implemented" +#endif + + protected: + /*! \brief Add current thread to list of active threads. + \note Calls RegisterThread automatically + \return true on success + \internal + */ + static bool PushThread(); + + /*! \brief Remove current thread from list of active threads. + \note Calls UnregisterThread automatically + \internal + */ + static void PopThread(); + + public: + /*! \brief Launch a thread. + \param meth Thread function + \param params Parameters to pass to the thread, may be NULL if not needed. + \return Thread id on success, NULL on failure + */ + static bool LaunchThread(void (*meth)(thr_params *p),thr_params *params = NULL); + + /*! \brief Terminate a thread. + \param meth Thread function + \param params Parameters to pass to the thread, may be NULL if not needed. + \return True if at least one matching thread has been found. + \remark Terminates all running threads with matching meth and params. + \note Function doesn NOT wait for termination + */ + static bool StopThread(void (*meth)(thr_params *p),thr_params *params = NULL,bool wait = false); + + + //! \brief Register current thread to be allowed to execute flext functions. + static void RegisterThread(thrid_t id = GetThreadId()); + + //! \brief Unregister current thread + static void UnregisterThread(thrid_t id = GetThreadId()); + +#endif // FLEXT_THREADS + +//! @} FLEXT_S_THREAD + + + public: +// --- timer stuff ----------------------------------------------- + +/*! \defgroup FLEXT_S_TIMER Flext timer handling + @{ + + \remark The clock of the real-time system is used for most of these functions. + \remark Since this clock can be synchronized to an external clock (or e.g. the audio card) + \remark it may differ from the clock of the operating system +*/ + + /*! \brief Get time since real-time system startup. + \note This is not the time of the operating system but of the real-time system. + \note It may depend on the time source the system is synchronized to (e.g. audio sample rate). + */ + static double GetTime() + { + #if FLEXT_SYS == FLEXT_SYS_PD + return clock_gettimesince(0)*0.001; + #elif FLEXT_SYS == FLEXT_SYS_MAX + double tm; + clock_getftime(&tm); + return tm*0.001; + #else + #error Not implemented + #endif + } + + /*! \brief Get time granularity of the GetTime function. + \note This can be zero if not determined. + */ + static double GetTimeGrain() + { + #if FLEXT_SYS == FLEXT_SYS_PD + return 0; + #elif FLEXT_SYS == FLEXT_SYS_MAX + return 0.001; + #else + #error Not implemented + #endif + } + + /*! \brief Get operating system time since flext startup. + */ + static double GetOSTime(); + + /*! \brief Sleep for an amount of time. + \remark The OS clock is used for that. + \note Clearly in a real-time system this should only be used in a detached thread. + */ + static void Sleep(double s); + + /*! \brief Class encapsulating a timer with callback functionality. + This class can either be used with FLEXT_ADDTIMER or used as a base class with an overloaded virtual Work function. + */ + class FLEXT_SHARE Timer: + public flext_root + { + public: + Timer(bool queued = false); + virtual ~Timer(); + + //! Set timer callback function. + void SetCallback(void (*cb)(void *data)) { clss = NULL,cback = cb; } + //! Set timer callback function (with class pointer). + void SetCallback(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) &th,bool (*cb)(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *th,void *data)) { clss = &th,cback = (void (*)(void *))cb; } + + //! Clear timer. + bool Reset(); + //! Trigger a one shot at an absolute time. + bool At(double time,void *data = NULL,bool dopast = true); + //! Trigger a one shot interval. + bool Delay(double time,void *data = NULL); + //! Trigger a periodic interval. + bool Periodic(double time,void *data = NULL); + //! Trigger immediately. + bool Now(void *data = NULL) { return Delay(0,data); } + + //! Worker function, called on every timer event. + virtual void Work(); + + protected: + static void callback(Timer *tmr); + +#if FLEXT_SYS == FLEXT_SYS_PD + t_clock *clk; +#elif FLEXT_SYS == FLEXT_SYS_MAX + static void queuefun(Timer *tmr); + t_clock *clk; + t_qelem *qelem; +#else +#error Not implemented +#endif + + const bool queued; + void (*cback)(void *data); + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *clss; + void *userdata; + double period; + }; + +//! @} FLEXT_S_TIMER + + //! Check if we are in DSP time + static bool InDSP() { return indsp; } + +// --- SIMD functionality ----------------------------------------------- + +/*! \defgroup FLEXT_S_SIMD Cross platform SIMD support for modern CPUs + @{ +*/ + enum simd_type { + simd_none = 0, + simd_mmx = 0x01, + simd_3dnow = 0x02, + simd_sse = 0x04, + simd_sse2 = 0x08, + simd_altivec = 0x10 + }; + + /*! Check for SIMD capabilities of the CPU */ + static unsigned long GetSIMDCapabilities(); + + + static void MulSamples(t_sample *dst,const t_sample *src,t_sample mul,int cnt); + static void MulSamples(t_sample *dst,const t_sample *src,const t_sample *mul,int cnt); + static void AddSamples(t_sample *dst,const t_sample *src,t_sample add,int cnt); + static void AddSamples(t_sample *dst,const t_sample *src,const t_sample *add,int cnt); + static void ScaleSamples(t_sample *dst,const t_sample *src,t_sample mul,t_sample add,int cnt); + static void ScaleSamples(t_sample *dst,const t_sample *src,t_sample mul,const t_sample *add,int cnt); + static void ScaleSamples(t_sample *dst,const t_sample *src,const t_sample *mul,const t_sample *add,int cnt); + +//! @} FLEXT_S_SIMD + + +//! @} FLEXT_SUPPORT + +protected: +#ifdef __MRC__ + friend class flext_obj; +#endif + + static void Setup(); + + static bool chktilde(const char *objname); + + static unsigned long simdcaps; + + static const t_symbol *sym_attributes; + static const t_symbol *sym_methods; + +#if FLEXT_SYS == FLEXT_SYS_MAX + static const t_symbol *sym_buffer; + static const t_symbol *sym_size; + static const t_symbol *sym_dirty; +#endif + + //! flag if we are within DSP + static bool indsp; +}; + + +// gcc doesn't like these to be included into the flext class (even if static) +inline bool operator ==(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) == 0; } +inline bool operator !=(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) != 0; } +inline bool operator <(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) < 0; } +inline bool operator <=(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) <= 0; } +inline bool operator >(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) > 0; } +inline bool operator >=(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) >= 0; } + +//! @} // FLEXT_SUPPORT + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flthr.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flthr.cpp new file mode 100755 index 0000000000000000000000000000000000000000..3ca3ed87ce920eb41ad78e7e8c21b432597cb153 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flthr.cpp @@ -0,0 +1,741 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flthr.cpp + \brief Implementation of the flext thread functionality. +*/ + +#ifndef __FLEXT_THR_CPP +#define __FLEXT_THR_CPP + +#include "flext.h" + +#ifdef FLEXT_THREADS + +// maximum wait time for threads to finish (in ms) +#define MAXIMUMWAIT 100 + + +#include "flinternal.h" +#include "flcontainers.h" +#include <set> +#include <ctime> + +#if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH || FLEXT_OSAPI == FLEXT_OSAPI_UNIX_POSIX || FLEXT_OSAPI == FLEXT_OSAPI_WIN_POSIX +#include <sys/time.h> +#include <unistd.h> +#elif FLEXT_OS == FLEXT_OS_WIN +#include <sys/timeb.h> +#endif + +#if FLEXT_THREADS == FLEXT_THR_WIN32 && WINVER < 0x0500 +#error WIN32 threads need Windows SDK version >= 0x500 +#endif + +#include <cerrno> + +#include "flpushns.h" + +//! Thread id of system thread - will be initialized in flext::Setup +FLEXT_TEMPIMPL(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext))::thrid_t FLEXT_CLASSDEF(flext))::thrid; + +//! Thread id of helper thread - will be initialized in flext::Setup +FLEXT_TEMPIMPL(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext))::thrid_t FLEXT_CLASSDEF(flext))::thrhelpid; + + +//! \brief This represents an entry to the list of active method threads +class thr_entry + : public flext + , public LifoCell +{ +public: + void Set(void (*m)(thr_params *),thr_params *p,thrid_t id = GetThreadId()) + { + th = p?p->cl:NULL; + meth = m,params = p,thrid = id; + shouldexit = false; +#if FLEXT_THREADS == FLEXT_THR_MP + weight = 100; // MP default weight +#endif + } + + //! \brief Check if this class represents the current thread + bool Is(thrid_t id = GetThreadId()) const { return IsThread(thrid,id); } + + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *This() const { return th; } + thrid_t Id() const { return thrid; } + + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *th; + void (*meth)(thr_params *); + thr_params *params; + thrid_t thrid; + bool shouldexit; +#if FLEXT_THREADS == FLEXT_THR_MP + int weight; +#endif +}; + +template<class T> +class ThrFinder: + public T +{ +public: + ~ThrFinder() { thr_entry *e; while((e = Pop()) != NULL) delete e; } + + void Push(thr_entry *e) { T::Push(e); } + thr_entry *Pop() { return T::Pop(); } + + thr_entry *Find(flext::thrid_t id,bool pop = false) + { + TypedLifo<thr_entry> qutmp; + thr_entry *fnd; + while((fnd = Pop()) && !fnd->Is(id)) qutmp.Push(fnd); + // put back entries + for(thr_entry *ti; (ti = qutmp.Pop()) != NULL; ) Push(ti); + if(fnd && !pop) Push(fnd); + return fnd; + } +}; + +FLEXT_TEMPLATE +struct ThrRegistry +{ + typedef ThrFinder< PooledLifo<thr_entry,1,10> > RegPooledLifo; + typedef ThrFinder< TypedLifo<thr_entry> > RegFinder; + static RegPooledLifo pending; + static RegFinder active,stopped; +}; + +FLEXT_TEMPIMPL(FLEXT_TEMPINST(ThrRegistry)::RegPooledLifo ThrRegistry)::pending; +FLEXT_TEMPIMPL(FLEXT_TEMPINST(ThrRegistry)::RegFinder ThrRegistry)::active; +FLEXT_TEMPIMPL(FLEXT_TEMPINST(ThrRegistry)::RegFinder ThrRegistry)::stopped; + + +class ThrId + : public flext +{ +public: + ThrId(const thrid_t &_id): id(_id) {} + thrid_t id; + + bool operator <(const ThrId &tid) const + { + if(sizeof(id) == sizeof(unsigned)) + return (unsigned *)&id < (unsigned *)&tid; + else + return memcmp(&id,&tid,sizeof(id)) < 0; + } +}; + +FLEXT_TEMPLATE +struct ThrVars { + // this should _definitely_ be a hashmap.... + // \TODO above all it should be populated immediately, otherwise it could easily happen + // that the passing on to the set happens too late! We need that lockfree set! + static std::set<ThrId> regthreads; + + //! Registry lock + static flext::ThrMutex *thrregmtx; + + //! Helper thread conditional + static flext::ThrCond *thrhelpcond; + + static bool initialized; +}; + +FLEXT_TEMPIMPL(std::set<ThrId> ThrVars)::regthreads; +FLEXT_TEMPIMPL(flext::ThrMutex *ThrVars)::thrregmtx = NULL; +FLEXT_TEMPIMPL(flext::ThrCond *ThrVars)::thrhelpcond = NULL; +FLEXT_TEMPIMPL(bool ThrVars)::initialized = false; + +FLEXT_TEMPLATE void LaunchHelper(thr_entry *e) +{ + e->thrid = flext::GetThreadId(); + flext::RegisterThread(e->thrid); + e->meth(e->params); + flext::UnregisterThread(e->thrid); +} + +//! Start helper thread +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::StartHelper() +{ + bool ok = false; + FLEXT_TEMPINST(ThrVars)::initialized = false; + + FLEXT_TEMPINST(ThrVars)::thrregmtx = new ThrMutex; + +#if FLEXT_THREADS == FLEXT_THR_POSIX + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + pthread_t tmp; + ok = pthread_create (&tmp,&attr,(void *(*)(void *))ThrHelper,NULL) == 0; +#elif FLEXT_THREADS == FLEXT_THR_MP + if(!MPLibraryIsLoaded()) + error("Thread library is not loaded"); + else { + MPTaskID tmp; + OSStatus ret = MPCreateTask((TaskProc)ThrHelper,NULL,0,0,0,0,0,&tmp); + ok = ret == noErr; + } +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + ok = _beginthread(ThrHelper,0,NULL) >= 0; +#else +#error +#endif + if(!ok) + error("flext - Could not launch helper thread!"); + else { + // now we have to wait for thread helper to initialize + while(!FLEXT_TEMPINST(ThrVars)::initialized) Sleep(0.001); + + // we are ready for threading now! + } + +#if FLEXT_THREADS == FLEXT_THR_POSIX + pthread_attr_destroy(&attr); +#endif + return ok; +} + +//! Static helper thread function +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ThrHelper(void *) +{ + thrhelpid = GetThreadId(); + +#if FLEXT_THREADS == FLEXT_THR_POSIX + // set prototype thread attributes + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); +#endif + + // set thread priority one point below normal + // so thread construction won't disturb real-time audio + RelPriority(-1); + + FLEXT_TEMPINST(ThrVars)::thrhelpcond = new ThrCond; + + FLEXT_TEMPINST(ThrVars)::initialized = true; + + // helper loop + for(;;) { + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Wait(); + + // start all inactive threads + thr_entry *ti; + while((ti = FLEXT_TEMPINST(ThrRegistry)::pending.Pop()) != NULL) { + bool ok; + + #if FLEXT_THREADS == FLEXT_THR_POSIX + thrid_t dummy; + ok = pthread_create (&dummy,&attr,(void *(*)(void *))FLEXT_TEMPINST(LaunchHelper),ti) == 0; + #elif FLEXT_THREADS == FLEXT_THR_MP + thrid_t dummy; + ok = MPCreateTask((TaskProc)FLEXT_TEMPINST(LaunchHelper),ti,0,0,0,0,0,&dummy) == noErr; + #elif FLEXT_THREADS == FLEXT_THR_WIN32 + ok = _beginthread((void (*)(void *))FLEXT_TEMPINST(LaunchHelper),0,ti) >= 0; + #else + #error + #endif + if(!ok) { + error("flext - Could not launch thread!"); + FLEXT_TEMPINST(ThrRegistry)::pending.Free(ti); ti = NULL; + } + else + // insert into queue of active threads + FLEXT_TEMPINST(ThrRegistry)::active.Push(ti); + } + } + + FLEXT_ASSERT(false); +/* + // Never reached! + + delete thrhelpcond; + thrhelpcond = NULL; + +#if FLEXT_THREADS == FLEXT_THR_POSIX + pthread_attr_destroy(&attr); +#endif +*/ +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::LaunchThread(void (*meth)(thr_params *p),thr_params *p) +{ + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrhelpcond); + + // make an entry into thread list + thr_entry *e = FLEXT_TEMPINST(ThrRegistry)::pending.New(); + e->Set(meth,p); + FLEXT_TEMPINST(ThrRegistry)::pending.Push(e); + // signal thread helper + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + + return true; +} + +FLEXT_TEMPLATE bool waitforstopped(TypedLifo<thr_entry> &qufnd,float wait = 0) +{ + TypedLifo<thr_entry> qutmp; + + double until; + if(wait) until = flext::GetOSTime()+wait; + + for(;;) { + thr_entry *fnd = qufnd.Pop(); + if(!fnd) break; // no more entries -> done! + + thr_entry *ti; + // search for entry + while((ti = FLEXT_TEMPINST(ThrRegistry)::stopped.Pop()) != NULL && ti != fnd) qutmp.Push(ti); + // put back entries + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::stopped.Push(ti); + + if(ti) { + // still in ThrRegistry::stopped queue + qufnd.Push(fnd); + // yield to other threads + flext::ThrYield(); + + if(wait && flext::GetOSTime() > until) + // not successful -> remaining thread are still in qufnd queue + return false; + } + } + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::StopThread(void (*meth)(thr_params *p),thr_params *p,bool wait) +{ + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrhelpcond); + + TypedLifo<thr_entry> qutmp; + thr_entry *ti; + + // first search pending queue + // -------------------------- + + { + bool found = false; + while((ti = FLEXT_TEMPINST(ThrRegistry)::pending.Pop()) != NULL) + if(ti->meth == meth && ti->params == p) { + // found -> thread hasn't started -> just delete + FLEXT_TEMPINST(ThrRegistry)::pending.Free(ti); + found = true; + } + else + qutmp.Push(ti); + + // put back into pending queue (order doesn't matter) + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::pending.Push(ti); + + if(found) return true; + } + + // now search active queue + // ----------------------- + + TypedLifo<thr_entry> qufnd; + + while((ti = FLEXT_TEMPINST(ThrRegistry)::active.Pop()) != NULL) + if(ti->meth == meth && ti->params == p) { + FLEXT_TEMPINST(ThrRegistry)::stopped.Push(ti); + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + qufnd.Push(ti); + } + else + qutmp.Push(ti); + + // put back into pending queue (order doesn't matter) + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::active.Push(ti); + + // wakeup helper thread + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + + // now wait for entries in qufnd to have vanished from ThrRegistry::stopped + if(wait) + return FLEXT_TEMPINST(waitforstopped)(qufnd); + else + return !qufnd.Avail(); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::ShouldExit() +{ + return FLEXT_TEMPINST(ThrRegistry)::stopped.Find(GetThreadId()) != NULL; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::PushThread() +{ + // set priority of newly created thread one point below the system thread's + RelPriority(-1); + RegisterThread(); + return true; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::PopThread() +{ + thrid_t id = GetThreadId(); + UnregisterThread(id); + thr_entry *fnd = FLEXT_TEMPINST(ThrRegistry)::stopped.Find(id,true); + if(!fnd) fnd = FLEXT_TEMPINST(ThrRegistry)::active.Find(id,true); + + if(fnd) + FLEXT_TEMPINST(ThrRegistry)::pending.Free(fnd); +#ifdef FLEXT_DEBUG + else + post("flext - INTERNAL ERROR: Thread not found!"); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::RegisterThread(thrid_t id) +{ +#if 1 + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrregmtx); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Lock(); + FLEXT_TEMPINST(ThrVars)::regthreads.insert(id); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Unlock(); +#else + regqueue.Push(new ThrIdCell(id)); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::UnregisterThread(thrid_t id) +{ +#if 1 + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrregmtx); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Lock(); + FLEXT_TEMPINST(ThrVars)::regthreads.erase(id); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Unlock(); +#else + unregqueue.Push(new ThrIdCell(id)); +#endif +} + +#if 0 +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ThreadRegistryWorker() +{ + ThrIdCell *pid; + while((pid = regqueue.Pop()) != NULL) { regthreads.insert(pid->id); delete pid; } + while((pid = unregqueue.Pop()) != NULL) { regthreads.erase(pid->id); delete pid; } +} +#endif + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::IsThreadRegistered() +{ + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrregmtx); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Lock(); + bool fnd = FLEXT_TEMPINST(ThrVars)::regthreads.find(GetThreadId()) != FLEXT_TEMPINST(ThrVars)::regthreads.end(); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Unlock(); + return fnd; +} + +//! Terminate all object threads +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::StopThreads() +{ + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrhelpcond); + + TypedLifo<thr_entry> qutmp; + thr_entry *ti; + + // first search pending queue + // -------------------------- + + while((ti = FLEXT_TEMPINST(ThrRegistry)::pending.Pop()) != NULL) + if(ti->This() == this) + // found -> thread hasn't started -> just delete + FLEXT_TEMPINST(ThrRegistry)::pending.Free(ti); + else + qutmp.Push(ti); + + // put back into pending queue (order doesn't matter) + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::pending.Push(ti); + + // now search active queue + // ----------------------- + + TypedLifo<thr_entry> qufnd; + + while((ti = FLEXT_TEMPINST(ThrRegistry)::active.Pop()) != NULL) + if(ti->This() == this) { + FLEXT_TEMPINST(ThrRegistry)::stopped.Push(ti); + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + qufnd.Push(ti); + } + else + qutmp.Push(ti); + + // put back into pending queue (order doesn't matter) + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::active.Push(ti); + + // wakeup helper thread + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + + // now wait for entries in qufnd to have vanished from ThrRegistry::stopped + if(!FLEXT_TEMPINST(waitforstopped)(qufnd,MAXIMUMWAIT*0.001f)) { +#ifdef FLEXT_DEBUG + post("flext - doing hard thread termination"); +#endif + + // timeout -> hard termination + while((ti = qufnd.Pop()) != NULL) { +#if FLEXT_THREADS == FLEXT_THR_POSIX + if(pthread_cancel(ti->thrid)) + post("%s - Thread could not be terminated!",thisName()); +#elif FLEXT_THREADS == FLEXT_THR_MP + MPTerminateTask(ti->thrid,0); + // here, we should use a task queue to check whether the task has really terminated!! +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + // can't use the c library function _endthread.. memory leaks will occur + HANDLE hnd = OpenThread(THREAD_ALL_ACCESS,TRUE,ti->thrid); + TerminateThread(hnd,0); +#else +# error Not implemented +#endif + FLEXT_TEMPINST(ThrRegistry)::pending.Free(ti); + } + return false; + } + else + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::RelPriority(int dp,thrid_t ref,thrid_t id) +{ +#if FLEXT_THREADS == FLEXT_THR_POSIX + sched_param parm; + int policy; + if(pthread_getschedparam(ref,&policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to get thread priority"); +# endif + return false; + } + else { + parm.sched_priority += dp; + + // MSVC++ 6 produces wrong code with the following lines!!! +// int schmin = sched_get_priority_min(policy); +// int schmax = sched_get_priority_max(policy); + + if(parm.sched_priority < sched_get_priority_min(policy)) { +# ifdef FLEXT_DEBUG + post("flext - minimum thread priority reached"); +# endif + parm.sched_priority = sched_get_priority_min(policy); + } + else if(parm.sched_priority > sched_get_priority_max(policy)) { +# ifdef FLEXT_DEBUG + post("flext - maximum thread priority reached"); +# endif + parm.sched_priority = sched_get_priority_max(policy); + } + + if(pthread_setschedparam(id,policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to change thread priority"); +# endif + return false; + } + } + return true; + +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + HANDLE href = OpenThread(THREAD_ALL_ACCESS,TRUE,ref); + HANDLE hid = OpenThread(THREAD_ALL_ACCESS,TRUE,id); + int pr = GetThreadPriority(href); + + if(pr == THREAD_PRIORITY_ERROR_RETURN) { +# ifdef FLEXT_DEBUG + post("flext - failed to get thread priority"); +# endif + return false; + } + + pr += dp; + if(pr < THREAD_PRIORITY_IDLE) { +# ifdef FLEXT_DEBUG + post("flext - minimum thread priority reached"); +# endif + pr = THREAD_PRIORITY_IDLE; + } + else if(pr > THREAD_PRIORITY_TIME_CRITICAL) { +# ifdef FLEXT_DEBUG + post("flext - maximum thread priority reached"); +# endif + pr = THREAD_PRIORITY_TIME_CRITICAL; + } + + if(SetThreadPriority(hid,pr) == 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to change thread priority"); +# endif + return false; + } + return true; + +#elif FLEXT_THREADS == FLEXT_THR_MP + thr_entry *ti = FLEXT_TEMPINST(ThrRegistry)::pending.Find(id); + if(!ti) ti = FLEXT_TEMPINST(ThrRegistry)::active.Find(id); + if(ti) { + // thread found in list + int w = GetPriority(id); + if(dp < 0) w /= 1<<(-dp); + else w *= 1<<dp; + if(w < 1) { +# ifdef FLEXT_DEBUG + post("flext - minimum thread priority reached"); +# endif + w = 1; + } + else if(w > 10000) { +# ifdef FLEXT_DEBUG + post("flext - maximum thread priority reached"); +# endif + w = 10000; + } + ti->weight = w; + return MPSetTaskWeight(id,w) == noErr; + } + else return false; +#else +# error +#endif +} + + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::GetPriority(thrid_t id) +{ +#if FLEXT_THREADS == FLEXT_THR_POSIX + sched_param parm; + int policy; + if(pthread_getschedparam(id,&policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to get parms"); +# endif + return -1; + } + return parm.sched_priority; + +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + HANDLE hid = OpenThread(THREAD_ALL_ACCESS,TRUE,id); + int pr = GetThreadPriority(hid); + + if(pr == THREAD_PRIORITY_ERROR_RETURN) { +# ifdef FLEXT_DEBUG + post("flext - failed to get thread priority"); +# endif + return -1; + } + return pr; + +#elif FLEXT_THREADS == FLEXT_THR_MP + thr_entry *ti = FLEXT_TEMPINST(ThrRegistry)::pending.Find(id); + if(!ti) ti = FLEXT_TEMPINST(ThrRegistry)::active.Find(id); + return ti?ti->weight:-1; +#else +# error +#endif +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::SetPriority(int p,thrid_t id) +{ +#if FLEXT_THREADS == FLEXT_THR_POSIX + sched_param parm; + int policy; + if(pthread_getschedparam(id,&policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to get parms"); +# endif + return false; + } + else { + parm.sched_priority = p; + if(pthread_setschedparam(id,policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to change priority"); +# endif + return false; + } + } + return true; + +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + HANDLE hid = OpenThread(THREAD_ALL_ACCESS,TRUE,id); + if(SetThreadPriority(hid,p) == 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to change thread priority"); +# endif + return false; + } + return true; + +#elif FLEXT_THREADS == FLEXT_THR_MP + thr_entry *ti = FLEXT_TEMPINST(ThrRegistry)::pending.Find(id); + if(!ti) ti = FLEXT_TEMPINST(ThrRegistry)::active.Find(id); + return ti && MPSetTaskWeight(id,ti->weight = p) == noErr; +#else +# error +#endif +} + + +#if FLEXT_THREADS == FLEXT_THR_POSIX +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::ThrCond::Wait() { + this->Lock(); // use this-> to avoid wrong function invocation (global Unlock) + bool ret = pthread_cond_wait(&cond,&this->mutex) == 0; + this->Unlock(); // use this-> to avoid wrong function invocation (global Unlock) + return ret; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::ThrCond::TimedWait(double ftm) +{ + timespec tm; +#if FLEXT_OS == FLEXT_OS_WIN && FLEXT_OSAPI == FLEXT_OSAPI_WIN_NATIVE +# ifdef _MSC_VER + _timeb tmb; + _ftime(&tmb); +# else + timeb tmb; + ftime(&tmb); +# endif + tm.tv_nsec = tmb.millitm*1000000; + tm.tv_sec = (long)tmb.time; +#else // POSIX +# if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) + clock_gettime(CLOCK_REALTIME,&tm); +# else + struct timeval tp; + gettimeofday(&tp, NULL); + tm.tv_nsec = tp.tv_usec*1000; + tm.tv_sec = tp.tv_sec; +# endif +#endif + + tm.tv_nsec += (long)((ftm-(long)ftm)*1.e9); + long nns = tm.tv_nsec%1000000000; + tm.tv_sec += (long)ftm+(tm.tv_nsec-nns)/1000000000; + tm.tv_nsec = nns; + + this->Lock(); // use this-> to avoid wrong function invocation (global Unlock) + bool ret = pthread_cond_timedwait(&cond,&this->mutex,&tm) == 0; + this->Unlock(); // use this-> to avoid wrong function invocation (global Unlock) + return ret; +} +#endif + +#include "flpopns.h" + +#endif // FLEXT_THREADS + +#endif // __FLEXT_THR_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/fltimer.cpp b/externals/grill/trunk/flext/libbuild/include/flext/fltimer.cpp new file mode 100755 index 0000000000000000000000000000000000000000..32bf1a52bc45e471d1da1a44d337c8f8d1c5a087 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/fltimer.cpp @@ -0,0 +1,291 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fltimer.cpp + \brief flext timer functions and classes +*/ + +#ifndef __FLEXT_TIMER_CPP +#define __FLEXT_TIMER_CPP + +#include "flext.h" + +#if FLEXT_OS == FLEXT_OS_WIN +#include <windows.h> +#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH +#include <unistd.h> +#include <sys/time.h> +#elif FLEXT_OS == FLEXT_OS_MAC +#include <Timer.h> +#include <Threads.h> +#endif + +#include "flpushns.h" + +FLEXT_TEMPLATE double getstarttime(); + +FLEXT_TEMPLATE +struct TimerVars +{ +#if FLEXT_OS == FLEXT_OS_WIN + static double perffrq; +#endif + static double starttime; +}; + +#if FLEXT_OS == FLEXT_OS_WIN +FLEXT_TEMPIMPL(double TimerVars)::perffrq = 0; +#endif +FLEXT_TEMPIMPL(double TimerVars)::starttime = FLEXT_TEMPINST(getstarttime)(); + +FLEXT_TEMPLATE +double getstarttime() +{ +#if FLEXT_OS == FLEXT_OS_WIN + LARGE_INTEGER frq; + if(QueryPerformanceFrequency(&frq)) TimerVars<>::perffrq = (double)frq.QuadPart; +#endif + + FLEXT_TEMPINST(TimerVars)::starttime = 0; + return flext::GetOSTime(); +} + +FLEXT_TEMPIMPL(double FLEXT_CLASSDEF(flext))::GetOSTime() +{ + double tm; + +#if FLEXT_OS == FLEXT_OS_WIN + LARGE_INTEGER cnt; + if(perffrq && QueryPerformanceCounter(&cnt)) + tm = cnt.QuadPart/TimerVars<>::perffrq; + else { + SYSTEMTIME systm; + FILETIME fltm; + GetSystemTime(&systm); + SystemTimeToFileTime(&systm,&fltm); + tm = ((LARGE_INTEGER *)&fltm)->QuadPart*1.e-7; + } +#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH // POSIX + timeval tmv; + gettimeofday(&tmv,NULL); + tm = tmv.tv_sec+tmv.tv_usec*1.e-6; +#elif FLEXT_OS == FLEXT_OS_MAC // that's just for OS9 & Carbon! + UnsignedWide tick; + Microseconds(&tick); + tm = (tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo)*1.e-6; +#else + #error Not implemented +#endif + return tm-FLEXT_TEMPINST(TimerVars)::starttime; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Sleep(double s) +{ + if(s <= 0) return; +#if FLEXT_OS == FLEXT_OS_WIN +#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x400 +#if 0 + LARGE_INTEGER liDueTime; + liDueTime.QuadPart = (LONGLONG)(-1.e7*s); + + // Create a waitable timer. + HANDLE hTimer = CreateWaitableTimer(NULL,TRUE,NULL); + if(hTimer) { + if(SetWaitableTimer(hTimer,&liDueTime,0,NULL,NULL,0)) + // Wait for the timer. + WaitForSingleObject(hTimer,INFINITE); // != WAIT_OBJECT_0) + else + ::Sleep((long)(s*1000.)); + CloseHandle(hTimer); + } + else +#else + LARGE_INTEGER cnt; + if(perffrq && QueryPerformanceCounter(&cnt)) { + LONGLONG dst = (LONGLONG)(cnt.QuadPart+perffrq*s); + for(;;) { + SwitchToThread(); // while waiting switch to another thread + QueryPerformanceCounter(&cnt); + if(cnt.QuadPart > dst) break; + } + } + else +#endif +#endif + // last resort.... + ::Sleep((long)(s*1000.)); +#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH // POSIX + usleep((long)(s*1000000.)); +#elif FLEXT_OS == FLEXT_OS_MAC // that's just for OS9 & Carbon! + UnsignedWide tick; + Microseconds(&tick); + double target = tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo+s*1.e6; + for(;;) { + // this is just a loop running until the time has passed - stone age (but we yield at least) + Microseconds(&tick); + if(target <= tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo) break; + YieldToAnyThread(); // yielding surely reduces the timing precision (but we're civilized) + } +#else + #error Not implemented +#endif +} + +/* \param qu determines whether timed messages should be queued (low priority - only when supported by the system). +*/ +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::Timer::Timer(bool qu): + queued(qu), + clss(NULL),userdata(NULL), + period(0) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + clk = (t_clock *)clock_new(this,(t_method)callback); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clk = (t_clock *)clock_new(this,(t_method)callback); + if(queued) qelem = (t_qelem *)qelem_new(this,(method)queuefun); +#else + #error Not implemented +#endif +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::Timer::~Timer() +{ +#if FLEXT_SYS == FLEXT_SYS_PD + clock_free(clk); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_free(clk); + if(queued) ::qelem_free(qelem); +#else + #error Not implemented +#endif +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Timer::Reset() +{ +#if FLEXT_SYS == FLEXT_SYS_PD + clock_unset(clk); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_unset(clk); + if(queued) ::qelem_unset(qelem); +#else + #error Not implemented +#endif + return true; +} + +/*! \param tm absolute time (in seconds) + \param data user data + \param dopast if set events with times lying in the past will be triggered immediately, if not set they are ignored + \return true on success +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Timer::At(double tm,void *data,bool dopast) +{ + userdata = data; + period = 0; +#if FLEXT_SYS == FLEXT_SYS_PD + const double systm = clock_gettimesince(0); + double df = tm*1000.-systm; + if(dopast && df < 0) df = 0; + if(df >= 0) + clock_delay(clk,df); +#elif FLEXT_SYS == FLEXT_SYS_MAX + const double ms = tm*1000.; + double cur; + clock_getftime(&cur); + if(cur <= ms) + clock_fdelay(clk,ms-cur); + else if(dopast) // trigger timer is past + clock_fdelay(clk,0); +#else + #error Not implemented +#endif + return true; +} + +/*! \param tm relative time (in seconds) + \param data user data + \return true on success +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Timer::Delay(double tm,void *data) +{ + userdata = data; + period = 0; +#if FLEXT_SYS == FLEXT_SYS_PD + clock_delay(clk,tm*1000); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_fdelay(clk,tm*1000.); +#else + #error Not implemented +#endif + return true; +} + +/*! \param tm relative time between periodic events (in seconds) + \param data user data + \return true on success + \note the first event will be delayed by tm +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Timer::Periodic(double tm,void *data) +{ + userdata = data; + period = tm; +#if FLEXT_SYS == FLEXT_SYS_PD + clock_delay(clk,tm*1000.); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_fdelay(clk,tm*1000.); +#else + #error Not implemented +#endif + return true; +} + +//! \brief Callback function for system clock. +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Timer::callback(Timer *tmr) +{ +#if FLEXT_SYS == FLEXT_SYS_MAX + if(tmr->queued) + qelem_set(tmr->qelem); + else +#endif + tmr->Work(); + + if(tmr->period) { + // reschedule +#if FLEXT_SYS == FLEXT_SYS_PD + clock_delay(tmr->clk,tmr->period*1000.); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_fdelay(tmr->clk,tmr->period*1000.); +#else + #error Not implemented +#endif + } +} + +#if FLEXT_SYS == FLEXT_SYS_MAX +/*! \brief Callback function for low priority clock (for queued messages). +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Timer::queuefun(Timer *tmr) { tmr->Work(); } +#endif + +/*! \brief Virtual worker function - by default it calls the user callback function. + \remark The respective callback parameter format is chosen depending on whether clss is defined or not. +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Timer::Work() +{ + if(cback) { + if(clss) + ((bool (*)(flext_base *,void *))cback)(clss,userdata); + else + cback(userdata); + } +} + +#include "flpopns.h" + +#endif // __FLEXT_TIMER_CPP + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flutil.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flutil.cpp new file mode 100755 index 0000000000000000000000000000000000000000..f86598f9f9e3a2635e73a4914f050f74e88c0625 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flutil.cpp @@ -0,0 +1,61 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flutil.cpp + \brief Implementation of the various utility functions. +*/ + +#ifndef __FLEXT_UTIL_CPP +#define __FLEXT_UTIL_CPP + +#include "flext.h" +#include <cstring> + +#if FLEXT_OS == FLEXT_OS_WIN +#include <windows.h> +#elif FLEXT_OS == FLEXT_OS_MAC + #if FLEXT_OSAPI != FLEXT_OSAPI_MAC_MACH + #include <MacMemory.h> + #else + #include <Carbon/Carbon.h> + #endif +#endif + +#include "flpushns.h" + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::CopyMem(void *dst,const void *src,int bytes) +{ +#if FLEXT_OS == FLEXT_OS_WIN + MoveMemory(dst,src,bytes); +#elif FLEXT_OS == FLEXT_OS_MAC && !defined(__LP64__) + BlockMoveData(src,dst,bytes); // not available for 64 bits +#else + memmove(dst,src,bytes); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ZeroMem(void *dst,int bytes) +{ +#if FLEXT_OS == FLEXT_OS_WIN + ZeroMemory(dst,bytes); +#elif FLEXT_OS == FLEXT_OS_MAC +# ifdef __LP64__ // 64 bits compilation + bzero(dst,bytes); +# else + BlockZero(dst,bytes); +# endif +#else + memset(dst,0,bytes); +#endif +} + +#include "flpopns.h" + +#endif // __FLEXT_UTIL_CPP + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/flxlet.cpp b/externals/grill/trunk/flext/libbuild/include/flext/flxlet.cpp new file mode 100755 index 0000000000000000000000000000000000000000..a8e28fe27ae90ece6d6b76133ca3b760541277d9 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/flxlet.cpp @@ -0,0 +1,120 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flxlet.cpp + \brief Implementation of the variable inlet/outlet functionality. +*/ + +#ifndef __FLEXT_XLET_CPP +#define __FLEXT_XLET_CPP + +#include "flext.h" +#include "flinternal.h" +#include <cstring> +#include <cstdarg> + +#include "flpushns.h" + +#define MAXLETS 256 + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::xlet FLEXT_CLASSDEF(flext_base))::inlist[MAXLETS]; +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::xlet FLEXT_CLASSDEF(flext_base))::outlist[MAXLETS]; + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::xlet::xlet(): tp(xlet_none),desc(NULL) {} +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::xlet::~xlet() { if(desc) delete[] desc; } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::xlet::Desc(const char *c) +{ + if(desc) delete[] desc; + if(c) { + size_t l = strlen(c); + desc = new char[l+1]; + memcpy(desc,c,l+1); + } + else + desc = NULL; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddInlet(xlettype tp,int mult,const char *desc) +{ + if(UNLIKELY(incnt+mult >= MAXLETS)) + post("%s - too many inlets",thisName()); + else + for(int i = 0; i < mult; ++i) { + xlet &x = inlist[incnt++]; + x.tp = tp; + x.Desc(desc); + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddOutlet(xlettype tp,int mult,const char *desc) +{ + if(UNLIKELY(outcnt+mult >= MAXLETS)) + post("%s - too many outlets",thisName()); + else + for(int i = 0; i < mult; ++i) { + xlet &x = outlist[outcnt++]; + x.tp = tp; + x.Desc(desc); + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::DescInlet(int ix,const char *d) +{ + if(UNLIKELY(ix >= incnt)) + post("%s - inlet %i not found",thisName(),ix); + else + inlist[ix].Desc(d); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::DescOutlet(int ix,const char *d) +{ + if(UNLIKELY(ix >= incnt)) + post("%s - outlet %i not found",thisName(),ix); + else + outlist[ix].Desc(d); +} + +FLEXT_TEMPIMPL(unsigned long FLEXT_CLASSDEF(flext_base))::XletCode(xlettype tp,...) +{ + unsigned long code = 0; + + va_list marker; + va_start(marker,tp); + int cnt = 0; + xlettype arg = tp; + for(; arg; ++cnt) { +#ifdef FLEXT_DEBUG + if(cnt > 9) { + error("%s - Too many in/outlets defined - truncated to 9",thisName()); + break; + } +#endif + + code = code*10+(int)arg; + arg = (xlettype)va_arg(marker,int); + } + va_end(marker); + + return code; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddInlets(unsigned long code) +{ + for(; code; code /= 10) AddInlet((xlettype)(code%10)); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddOutlets(unsigned long code) +{ + for(; code; code /= 10) AddOutlet((xlettype)(code%10)); +} + +#include "flpopns.h" + +#endif // __FLEXT_XLET_CPP + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/lockfree/atomic_int.hpp b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/atomic_int.hpp new file mode 100755 index 0000000000000000000000000000000000000000..18832ebb88491b81c441c34c0549da3b7dd9de54 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/atomic_int.hpp @@ -0,0 +1,238 @@ +// $Id$ +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_ATOMIC_INT_HPP +#define __LOCKFREE_ATOMIC_INT_HPP + +#include "prefix.hpp" + +namespace lockfree +{ + +#if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) + +template <typename T> +class atomic_int +{ +public: + explicit atomic_int(T v = 0): + value(v) + { + } + + operator T(void) const + { + return __sync_fetch_and_add(&value, 0); + } + + void operator =(T v) + { + value = v; + __sync_synchronize(); + } + + T operator +=(T v) + { + return __sync_add_and_fetch(&value, v); + } + + T operator -=(T v) + { + return __sync_sub_and_fetch(&value, v); + } + + /* prefix operator */ + T operator ++(void) + { + return __sync_add_and_fetch(&value, 1); + } + + /* prefix operator */ + T operator --(void) + { + return __sync_sub_and_fetch(&value, 1); + } + + /* postfix operator */ + T operator ++(int) + { + return __sync_fetch_and_add(&value, 1); + } + + /* postfix operator */ + T operator --(int) + { + return __sync_fetch_and_sub(&value, 1); + } + +private: + mutable T value; +}; + +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) + +template <typename T> +class atomic_int +{ +public: + explicit atomic_int(T v = 0): + value(v) + { + } + + operator T(void) const + { + return __gnu_cxx::__exchange_and_add(&value, 0); + } + + void operator =(T v) + { + value = v; + } + + T operator +=(T v) + { + return __gnu_cxx::__exchange_and_add(&value, v) + v; + } + + T operator -=(T v) + { + return __gnu_cxx::__exchange_and_add(&value, -v) - v; + } + + /* prefix operator */ + T operator ++(void) + { + return operator+=(1); + } + + /* prefix operator */ + T operator --(void) + { + return operator-=(1); + } + + /* postfix operator */ + T operator ++(int) + { + return __gnu_cxx::__exchange_and_add(&value, 1); + } + + /* postfix operator */ + T operator --(int) + { + return __gnu_cxx::__exchange_and_add(&value, -1); + } + +private: + mutable _Atomic_word value; +}; + +#else /* emulate via CAS */ + +template <typename T> +class atomic_int +{ +public: + explicit atomic_int(T v = 0) + { + *this = v; + } + + operator T(void) const + { + memory_barrier(); + return value; + } + + void operator =(T v) + { + value = v; + memory_barrier(); + } + + /* prefix operator */ + T operator ++() + { + return *this += 1; + } + + /* prefix operator */ + T operator --() + { + return *this -= 1; + } + + T operator +=(T v) + { + for(;;) + { + T newv = value+v; + if(likely(CAS(&value,value,newv))) + return newv; + } + } + + T operator -=(T v) + { + for(;;) + { + T newv = value-v; + if(likely(CAS(&value,value,newv))) + return newv; + } + } + + /* postfix operator */ + T operator ++(int) + { + for(;;) + { + T oldv = value; + if(likely(CAS(&value,oldv,oldv+1))) + return oldv; + } + } + + /* postfix operator */ + T operator --(int) + { + for(;;) + { + T oldv = value; + if(likely(CAS(&value,oldv,oldv-1))) + return oldv; + } + } + +private: + T value; +}; + + +#endif + +} // namespace lockfree + +#endif /* __LOCKFREE_ATOMIC_INT_HPP */ diff --git a/externals/grill/trunk/flext/libbuild/include/flext/lockfree/atomic_ptr.hpp b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/atomic_ptr.hpp new file mode 100755 index 0000000000000000000000000000000000000000..688dd78aaf85d1357f5ee75ab453d55852d90636 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/atomic_ptr.hpp @@ -0,0 +1,104 @@ +// $Id$ +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_ATOMIC_PTR_HPP +#define __LOCKFREE_ATOMIC_PTR_HPP + +#include "cas.hpp" +#include "branch_hints.hpp" + +#include <cstddef> + +namespace lockfree +{ + using std::size_t; + + template <class T> + class atomic_ptr + { + public: + atomic_ptr() {} + + atomic_ptr(const atomic_ptr &p): ptr(p.ptr),tag(p.tag) {} + + atomic_ptr(T *p,size_t t = 0): ptr(p),tag(t) {} + + /** atomic set operation */ + inline atomic_ptr &operator =(const atomic_ptr &p) + { + for (;;) + { + atomic_ptr current(ptr, tag); + + if(likely(CAS(current, p))) + return *this; + } + } + + inline atomic_ptr &operator()(T *p,size_t t) + { + return operator=(atomic_ptr(p, t) ); + } + + + inline bool operator ==(const atomic_ptr &p) const { return ptr == p.ptr && tag == p.tag; } + + inline bool operator !=(const atomic_ptr &p) const { return !operator ==(p); } + + + inline T * getPtr() const { return ptr; } + + inline void setPtr(T * p) { ptr = p; } + + + inline size_t getTag() const { return tag; } + + inline void setTag(size_t t) { tag = t; } + + inline size_t incTag() { return ++tag; } + + + inline bool CAS(const atomic_ptr &oldval,const atomic_ptr &newval) + { + return lockfree::CAS2(this,oldval.ptr,oldval.tag,newval.ptr,newval.tag); + } + + inline bool CAS(const atomic_ptr &oldval,T *newptr) + { + return lockfree::CAS2(this,oldval.ptr,oldval.tag,newptr,oldval.tag+1); + } + + inline bool CAS(const T *oldptr,size_t oldtag,T *newptr) + { + return lockfree::CAS2(this,oldptr,oldtag,newptr,oldtag+1); + } + + protected: + T * volatile ptr; + size_t volatile tag; + }; + +} // namespace + +#endif /* __LOCKFREE_ATOMIC_PTR_HPP */ diff --git a/externals/grill/trunk/flext/libbuild/include/flext/lockfree/branch_hints.hpp b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/branch_hints.hpp new file mode 100755 index 0000000000000000000000000000000000000000..d5a117f9d4de9088afadafb67da4e4e3634e82f3 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/branch_hints.hpp @@ -0,0 +1,53 @@ +// $Id$ +// +// branch hints +// Copyright (C) 2007 Tim Blechmann +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_BRANCH_HINTS_HPP +#define __LOCKFREE_BRANCH_HINTS_HPP + +namespace lockfree +{ + /** \brief hint for the branch prediction */ + inline bool likely(bool expr) + { +#ifdef __GNUC__ + return __builtin_expect(expr, true); +#else + return expr; +#endif + } + + /** \brief hint for the branch prediction */ + inline bool unlikely(bool expr) + { +#ifdef __GNUC__ + return __builtin_expect(expr, false); +#else + return expr; +#endif + } + +} // namespace + +#endif /* __LOCKFREE_BRANCH_HINTS_HPP */ diff --git a/externals/grill/trunk/flext/libbuild/include/flext/lockfree/cas.hpp b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/cas.hpp new file mode 100755 index 0000000000000000000000000000000000000000..8451f77b6c5663363b5206049d2d98e507b3e12c --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/cas.hpp @@ -0,0 +1,252 @@ +// $Id$ +// +// Copyright (C) 2007-2008 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_CAS_H +#define __LOCKFREE_CAS_H + +#include "prefix.hpp" + +#ifndef _WIN32 +// pthreads are not available under Windows by default and we should not need them there +# include <pthread.h> +#endif + +namespace lockfree +{ + inline void memory_barrier() + { +#if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) + __sync_synchronize(); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__i686__)) + asm("" : : : "memory"); +#elif defined(_MSC_VER) && (_MSC_VER >= 1300) + _ReadWriteBarrier(); +#elif defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4) + OSMemoryBarrier(); +#elif defined(AO_HAVE_nop_full) + AO_nop_full(); +#else +# error no memory barrier implemented for this platform +#endif + } + + template <class C, class D> + inline bool CAS(volatile C * addr,D old,D nw) + { +#if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) + return __sync_bool_compare_and_swap(addr, old, nw); +#elif defined(_MSC_VER) + assert((size_t(addr)&3) == 0); // a runtime check only for debug mode is somehow insufficient.... + return _InterlockedCompareExchange(addr,nw,old) == old; +#elif defined(_WIN32) || defined(_WIN64) + assert((size_t(addr)&3) == 0); // a runtime check only for debug mode is somehow insufficient.... + return InterlockedCompareExchange(addr,nw,old) == old; +#elif defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4) + if(sizeof(D) == 4) + return OSAtomicCompareAndSwap32(old,nw,addr); + else if(sizeof(D) == 8) + return OSAtomicCompareAndSwap64(old,nw,addr); + else + assert(false); +#elif defined(AO_HAVE_compare_and_swap_full) + return AO_compare_and_swap_full(reinterpret_cast<volatile AO_t*>(addr), + reinterpret_cast<AO_t>(old), + reinterpret_cast<AO_t>(nw)); +#else + +# ifdef __GNUC__ +# warning blocking CAS emulation +# else +# pragma message("blocking CAS emulation") +# endif + + pthread_mutex_t guard = PTHREAD_MUTEX_INITIALIZER; + int status = pthread_mutex_lock(&guard); + assert(!status); + + bool ret; + + if (*addr == old) + { + *addr = nw; + ret = true; + } + else + ret = false; + int status2 = pthread_mutex_unlock(&guard); + assert(!status2); + return ret; +#endif + + } + + + template <class C, class D, class E> + inline bool CAS2(C * addr,D old1,E old2,D new1,E new2) + { +#if defined(__GNUC__) && ((__GNUC__ > 4) || ( (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 2) ) ) && (defined(__i686__) || defined(__pentiumpro__) || defined(__nocona__) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)) + struct packed_c + { + D d; + E e; + }; + + union cu + { + packed_c c; + long long l; + }; + + cu old; + old.c.d = old1; + old.c.e = old2; + + cu nw; + nw.c.d = new1; + nw.c.e = new2; + + return __sync_bool_compare_and_swap_8(reinterpret_cast<volatile long long*>(addr), + old.l, + nw.l); +#elif defined(__GNUC__) && ((__GNUC__ > 4) || ( (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 2) ) ) && (defined(__x86_64__) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)) + struct packed_c + { + D d; + E e; + }; + + union cu + { + packed_c c; + long long l; + }; + + cu old; + old.c.d = old1; + old.c.e = old2; + + cu nw; + nw.c.d = new1; + nw.c.e = new2; + + return __sync_bool_compare_and_swap_16(reinterpret_cast<volatile long long*>(addr), + old.l, + nw.l); +#elif defined(_MSC_VER) + bool ok; + __asm { +# ifdef _WIN32 + mov eax,[old1] + mov edx,[old2] + mov ebx,[new1] + mov ecx,[new2] + mov edi,[addr] + lock cmpxchg8b [edi] +# else + mov rax,[old1] + mov rdx,[old2] + mov rbx,[new1] + mov rcx,[new2] + mov rdi,[addr] + lock cmpxchg16b [rdi] +# endif + setz [ok] + } + return ok; +#elif defined(__GNUC__) && (defined(__i386__) || defined(__i686__) || defined(__x86_64__)) + char result; + if(sizeof(D) == 4 && sizeof(E) == 4) { + #ifndef __PIC__ + __asm__ __volatile__("lock; cmpxchg8b %0; setz %1" + : "=m"(*addr), "=q"(result) + : "m"(*addr), "a" (old1), "d" (old2), + "b" (new1), "c" (new2) : "memory"); + #else + __asm__ __volatile__("push %%ebx; movl %5,%%ebx; lock; cmpxchg8b %0; setz %1; pop %%ebx" + : "=m"(*addr), "=q"(result) + : "m"(*addr), "a" (old1), "d" (old2), + "m" (new1), "c" (new2) : "memory"); + #endif + } + else if(sizeof(D) == 8 && sizeof(E) == 8) { + __asm__ __volatile__("lock; cmpxchg16b %0; setz %1" + : "=m"(*addr), "=q"(result) + : "m"(*addr), "a" (old1), "d" (old2), + "b" (new1), "c" (new2) : "memory"); + } + else + assert(false); + return result != 0; +#elif defined(AO_HAVE_double_compare_and_swap_full) + if (sizeof(D) != sizeof(AO_t) || sizeof(E) != sizeof(AO_t)) { + assert(false); + return false; + } + + return AO_compare_double_and_swap_double_full( + reinterpret_cast<volatile AO_double_t*>(addr), + static_cast<AO_t>(old2), + reinterpret_cast<AO_t>(old1), + static_cast<AO_t>(new2), + reinterpret_cast<AO_t>(new1) + ); +#else + +# ifdef __GNUC__ +# warning blocking CAS2 emulation +# else +# pragma message("blocking CAS2 emulation") +# endif + struct packed_c + { + D d; + E e; + }; + + volatile packed_c * packed_addr = reinterpret_cast<volatile packed_c*>(addr); + + pthread_mutex_t guard = PTHREAD_MUTEX_INITIALIZER; + int status = pthread_mutex_lock(&guard); + assert(!status); + + bool ret; + + if (packed_addr->d == old1 && + packed_addr->e == old2) + { + packed_addr->d = new1; + packed_addr->e = new2; + ret = true; + } + else + ret = false; + int status2 = pthread_mutex_unlock(&guard); + assert(!status2); + return ret; +#endif + } + +} // namespace + +#endif /* __LOCKFREE_CAS_H */ diff --git a/externals/grill/trunk/flext/libbuild/include/flext/lockfree/fifo.hpp b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/fifo.hpp new file mode 100755 index 0000000000000000000000000000000000000000..d906bb8062555d935451d13d08a24aff58452a8a --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/fifo.hpp @@ -0,0 +1,250 @@ +// $Id$ +// +// lock-free fifo queue from +// Michael, M. M. and Scott, M. L., +// "simple, fast and practical non-blocking and blocking concurrent queue algorithms" +// +// intrusive implementation for c++ +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_FIFO_HPP +#define __LOCKFREE_FIFO_HPP + +#include "cas.hpp" +#include "atomic_ptr.hpp" +#include "branch_hints.hpp" + +#ifdef HAVE_BOOST +# include <boost/type_traits.hpp> +# include <boost/static_assert.hpp> +#else /* HAVE_BOOST */ +# ifdef BOOST_STATIC_ASSERT +# undef BOOST_STATIC_ASSERT +# endif +# define BOOST_STATIC_ASSERT(x) +#endif /* HAVE_BOOST */ + +#include <memory> + +namespace lockfree +{ + struct intrusive_fifo_node; + + typedef atomic_ptr<intrusive_fifo_node> intrusive_fifo_ptr_t; + + struct intrusive_fifo_node + { + intrusive_fifo_ptr_t next; + struct fifo_node * data; + }; + + struct fifo_node + { + intrusive_fifo_node *volatile node; + + protected: + fifo_node(void) + { + node = new intrusive_fifo_node(); + } + + ~fifo_node(void) + { + delete node; + } + + template <class T> friend class intrusive_fifo; + }; + + template <typename T> + class intrusive_fifo + { + BOOST_STATIC_ASSERT((boost::is_base_of<fifo_node,T>::value)); + + public: + intrusive_fifo(void) + { + /* dummy pointer for head/tail */ + intrusive_fifo_node * dummy = new intrusive_fifo_node(); + dummy->next(NULL,0); + head_(dummy,0); + tail_(dummy,0); + } + + ~intrusive_fifo(void) + { + /* client must have freed all members already */ + assert (empty()); + delete head_.getPtr(); + } + + bool empty() const + { + return head_.getPtr() == tail_.getPtr() || (!tail_.getPtr()); + } + + void enqueue(T * instance) + { + /* volatile */ intrusive_fifo_node * node = static_cast<fifo_node*>(instance)->node; + node->next.setPtr(NULL); + node->data = static_cast<fifo_node*>(instance); + + for (;;) + { + intrusive_fifo_ptr_t tail(tail_); + memory_barrier(); + + intrusive_fifo_ptr_t next(tail.getPtr()->next); + memory_barrier(); + + if (likely(tail == tail_)) + { + if (next.getPtr() == 0) + { + if (tail.getPtr()->next.CAS(next,node)) + { + tail_.CAS(tail,node); + return; + } + } + else + tail_.CAS(tail,next); + } + } + } + + T* dequeue (void) + { + T * ret; + for (;;) + { + intrusive_fifo_ptr_t head(head_); + memory_barrier(); + + intrusive_fifo_ptr_t tail(tail_); + /* volatile */ intrusive_fifo_node * next = head.getPtr()->next.getPtr(); + memory_barrier(); + + if (likely(head == head_)) + { + if (head.getPtr() == tail.getPtr()) + { + if (next == 0) + return 0; + tail_.CAS(tail,next); + } + else + { + ret = static_cast<T*>(next->data); + if (head_.CAS(head,next)) + { + ret->node = head.getPtr(); + return ret; + } + } + } + } + } + + private: + intrusive_fifo_ptr_t head_,tail_; + }; + + template <typename T> + class fifo_value_node: + public fifo_node + { + public: + fifo_value_node(T const & v): value(v) {} + + T value; + }; + + template <typename T, class Alloc = std::allocator<T> > + class fifo + : intrusive_fifo<fifo_value_node<T> > + { + public: + ~fifo() + { + fifo_value_node<T> * node; + while((node = intrusive_fifo<fifo_value_node<T> >::dequeue()) != NULL) + free(node); + } + + void enqueue(T const & v) + { + intrusive_fifo<fifo_value_node<T> >::enqueue(alloc(v)); + } + + bool dequeue (T & v) + { + fifo_value_node<T> * node = intrusive_fifo<fifo_value_node<T> >::dequeue(); + if(!node) + return false; + + v = node->value; + free(node); + return true; + } + + private: + +#if 0 + inline fifo_value_node<T> *alloc(const T &k) + { + fifo_value_node<T> *node = allocator.allocate(1); + allocator.construct(node,k); + return node; + } + + inline void free(fifo_value_node<T> *n) + { + assert(n); + allocator.destroy(n); + allocator.deallocate(n,1); + } +#else + // hmmm... static keyword brings 10% speedup... + + static inline fifo_value_node<T> *alloc(const T &k) + { + return new fifo_value_node<T>(k); + } + + static inline void free(fifo_value_node<T> *n) + { + assert(n); + delete n; + } +#endif + + typename Alloc::template rebind<fifo_value_node<T> >::other allocator; + }; +} + +#endif /* __LOCKFREE_FIFO_HPP */ + + + diff --git a/externals/grill/trunk/flext/libbuild/include/flext/lockfree/prefix.hpp b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/prefix.hpp new file mode 100755 index 0000000000000000000000000000000000000000..6dde2eaebc1f59f0053ee227c56897ae794f81c7 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/prefix.hpp @@ -0,0 +1,64 @@ +// $Id$ +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + + +#ifndef __LOCKFREE_PREFIX_H +#define __LOCKFREE_PREFIX_H + +#include <cassert> + +#ifdef USE_ATOMIC_OPS + #define AO_REQUIRE_CAS + #define AO_USE_PENTIUM4_INSTRS + + extern "C" { + #include <atomic_ops.h> + } +#endif + +#ifdef _WIN32 + #include <windows.h> +#endif + +#ifdef __APPLE__ + #include <libkern/OSAtomic.h> +#else + #if defined(__GLIBCPP__) || defined(__GLIBCXX__) + #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) + #include <ext/atomicity.h> + #else + #include <bits/atomicity.h> + #endif + #endif +#endif + +#if defined(_MSC_VER) +// \note: Must use /Oi option for VC++ to enable intrinsics + extern "C" { + void __cdecl _ReadWriteBarrier(); + LONG __cdecl _InterlockedCompareExchange(LONG volatile* Dest,LONG Exchange, LONG Comp); + } +#endif + +#endif /* __LOCKFREE_PREFIX_H */ diff --git a/externals/grill/trunk/flext/libbuild/include/flext/lockfree/stack.hpp b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/stack.hpp new file mode 100755 index 0000000000000000000000000000000000000000..c8781b828754588a55238166103778cbeb5878be --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/include/flext/lockfree/stack.hpp @@ -0,0 +1,157 @@ +// $Id$ +// +// lock-free stack +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_STACK_HPP +#define __LOCKFREE_STACK_HPP + +#include "cas.hpp" +#include "atomic_ptr.hpp" +#include "branch_hints.hpp" + +#include <memory> // for std::allocator + +#if HAVE_BOOST +# include <boost/type_traits.hpp> +# include <boost/static_assert.hpp> +#else +# define BOOST_STATIC_ASSERT(x) +#endif + +namespace lockfree +{ + //! nodes for the intrusive_stack must be derived from that + class stack_node + { + template <class T> friend class intrusive_stack; + + public: + stack_node(): next(NULL) {} + + private: + atomic_ptr<stack_node> next; + }; + + //! intrusive lock-free stack implementation with T being the node type (inherited from stack_node) + template <typename T> + class intrusive_stack + { + BOOST_STATIC_ASSERT((boost::is_base_of<stack_node,T>::value)); + + public: + intrusive_stack(): head(NULL) {} + + ~intrusive_stack() + { + assert(empty()); + } + + bool empty() const { return !head.getPtr(); } + + void push(T *node) + { + assert(!node->next.getPtr()); + while(unlikely(!head.CAS(node->next = head,node))); + } + + T *pop() + { + for(;;) { + atomic_ptr<stack_node> current(head); + T *node = static_cast<T *>(current.getPtr()); + if(!node || likely(head.CAS(current,node->next.getPtr()))) { + if(node) node->next.setPtr(NULL); + return node; + } + } + } + + private: + atomic_ptr<stack_node> head; + }; + + + //! node type used by non-intrusive stack + template <typename T> + class stack_value_node + : public stack_node + { + public: + stack_value_node(T const &v): value(v) {} + T value; + }; + + + //! non-intrusive lock-free stack + template <typename T,class Alloc = std::allocator<T> > + class stack + : intrusive_stack<stack_value_node<T> > + { + public: + ~stack() + { + // delete remaining elements + stack_value_node<T> * node; + while((node = intrusive_stack<stack_value_node<T> >::pop()) != NULL) + free(node); + } + + void push(T const &v) + { + intrusive_stack<stack_value_node<T> >::push(alloc(v)); + } + + bool pop(T &v) + { + stack_value_node<T> *node = intrusive_stack<stack_value_node<T> >::pop(); + if(!node) + return false; + v = node->value; + free(node); + return true; + } + + private: + + inline stack_value_node<T> *alloc(const T &k) + { + stack_value_node<T> *node = allocator.allocate(1); + allocator.construct(node,k); + return node; + } + + inline void free(stack_value_node<T> *n) + { + assert(n); + allocator.destroy(n); + allocator.deallocate(n,1); + } + + typename Alloc::template rebind<stack_value_node<T> >::other allocator; + }; + +} // namespace + +#endif diff --git a/externals/grill/trunk/flext/libbuild/lib/libflext-pd.so.0.6 b/externals/grill/trunk/flext/libbuild/lib/libflext-pd.so.0.6 new file mode 120000 index 0000000000000000000000000000000000000000..65f9f4053e52be1bd26ad6552577ee8a20a6bb7e --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/lib/libflext-pd.so.0.6 @@ -0,0 +1 @@ +libflext-pd.so.0.6.0 \ No newline at end of file diff --git a/externals/grill/trunk/flext/libbuild/lib/libflext-pd.so.0.6.0 b/externals/grill/trunk/flext/libbuild/lib/libflext-pd.so.0.6.0 new file mode 100755 index 0000000000000000000000000000000000000000..cf2122e94c9e8c1dc9034da857d1d0ac70c3074d Binary files /dev/null and b/externals/grill/trunk/flext/libbuild/lib/libflext-pd.so.0.6.0 differ diff --git a/externals/grill/trunk/flext/libbuild/lib/libflext-pd_d.so.0.6 b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_d.so.0.6 new file mode 120000 index 0000000000000000000000000000000000000000..752c599782cd90e2eaf3dc74d39dae0e3be06dd7 --- /dev/null +++ b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_d.so.0.6 @@ -0,0 +1 @@ +libflext-pd_d.so.0.6.0 \ No newline at end of file diff --git a/externals/grill/trunk/flext/libbuild/lib/libflext-pd_d.so.0.6.0 b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_d.so.0.6.0 new file mode 100755 index 0000000000000000000000000000000000000000..3e572c517a2903d9db9114b136cd9c8b0024c646 Binary files /dev/null and b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_d.so.0.6.0 differ diff --git a/externals/grill/trunk/flext/libbuild/lib/libflext-pd_s.a.0.6.0 b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_s.a.0.6.0 new file mode 100755 index 0000000000000000000000000000000000000000..baf8f2ed2b74366935b29b317b577f872717ee43 Binary files /dev/null and b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_s.a.0.6.0 differ diff --git a/externals/grill/trunk/flext/libbuild/lib/libflext-pd_sd.a.0.6.0 b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_sd.a.0.6.0 new file mode 100755 index 0000000000000000000000000000000000000000..a8173a024ae4857aacc56adead91efd5c2279eca Binary files /dev/null and b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_sd.a.0.6.0 differ diff --git a/externals/grill/trunk/flext/libbuild/lib/libflext-pd_t.a.0.6.0 b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_t.a.0.6.0 new file mode 100755 index 0000000000000000000000000000000000000000..06f7f8162104994d4d1a848154009f4c78de9e1d Binary files /dev/null and b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_t.a.0.6.0 differ diff --git a/externals/grill/trunk/flext/libbuild/lib/libflext-pd_td.a.0.6.0 b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_td.a.0.6.0 new file mode 100755 index 0000000000000000000000000000000000000000..5fc73713fb5837ecc11909b8d5c67ec4d7e9766e Binary files /dev/null and b/externals/grill/trunk/flext/libbuild/lib/libflext-pd_td.a.0.6.0 differ diff --git a/externals/grill/trunk/flext/license.txt b/externals/grill/trunk/flext/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..9488294fe6cd6c4568ba2c0627a438606519b616 --- /dev/null +++ b/externals/grill/trunk/flext/license.txt @@ -0,0 +1,19 @@ +flext - C++ layer for Max/MSP and pd (pure data) externals +Copyright (C) 2001-2005 Thomas Grill + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +In the official flext distribution, the GNU General Public License is +in the file gpl.txt \ No newline at end of file diff --git a/externals/grill/trunk/flext/max-flext.pc.in b/externals/grill/trunk/flext/max-flext.pc.in new file mode 100644 index 0000000000000000000000000000000000000000..094505cc02071b935351a053349f4444150fa98f --- /dev/null +++ b/externals/grill/trunk/flext/max-flext.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/flext + +Name: max-flext +Description: C++ glue layer for Pure Data and Max +Version: @VERSION@ +Cflags: -I${includedir} -DFLEXT_SYS=1 -DFLEXT_SHARED +Libs: -L${libdir} -lflext-max diff --git a/externals/grill/trunk/flext/notes.txt b/externals/grill/trunk/flext/notes.txt new file mode 100644 index 0000000000000000000000000000000000000000..693c6222e64ca35d2bbd3efdae60d981d211bf37 --- /dev/null +++ b/externals/grill/trunk/flext/notes.txt @@ -0,0 +1,69 @@ +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2012 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +---------------------------------------------------------------------------- + +VARIOUS NOTES: + +Platform specific: +- Pd does not allow signal and message to go into the same inlet (except leftmost inlet) +- Pd: with DSP objects all float messages to the leftmost inlet are converted to signal + +Restrictions in compatibility mode: +- Max allows only 9 float/int inlets + +Porting to new compilers/platforms: +- enums must be int-sized!!! +- compiler must support bool type +- an STL implementation must exist +- C++ exceptions and RTTI must be enabled + +---------------------------------------------------------------------------- + +KNOWN BUGS: +- Some few external libraries have troubles with flext's global new and delete overloadings. + In these cases one can switch back to the C library memory operators by defining the FLEXT_NOGLOBALNEW macro before + inclusion of the flext.h header file (e.g. as a -D compiler option) + +- Pd: floats into the leftmost inlet of DSP objects can't be used as messages + even if there's no signal inlet at all + +---------------------------------------------------------------------------- + +TODO LIST: + +- optimizations for object initialization and messaging +- speed up message handling (usage of other containers?) +- SIMD for gcc +- lock-free code for old AMD 64-bit architectures + +- update documentation +- add log messages for debugging version +- use Pd's t_float and t_int types (or comparable for 32-bit safety) + +- add double handlers +- add signal in/out connection query function + +- support for Max qelem style + +- flext::post and flext::error should print via a worker thread (and should be unlimited in characters) + +- manage running threads individually (stop, isrunning?, priority etc.) + +---------------------------------------------------------------------------- + +TESTS TO DO: + +- Pd: problems with timed buffer redrawing (takes a lot of cpu time) +- hard thread termination upon object destruction doesn't seem to work properly -> crash +- Max rounding bug ... buffer resize could be one sample less! + +- Pd: figure out what "pointer" messages do and whether they are correctly implemented in flext + +- Max buffer~ resize: flext_base::buffer::Frames(): must we use buffer or system sample rate? + +- check whether m_dsp gets called upon deletion of a used buffer (Pd and MaxMSP may behave differently). + -> Pd does call m_dsp, Max/MSP does not diff --git a/externals/grill/trunk/flext/package.txt b/externals/grill/trunk/flext/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..bbb1b10743402c3d78b2a42c7160dc95193532e3 --- /dev/null +++ b/externals/grill/trunk/flext/package.txt @@ -0,0 +1,57 @@ +# +# flext - C++ layer for Max and Pd (Pure data) externals +# +# Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +# +# $LastChangedRevision$ +# $LastChangedDate$ +# $LastChangedBy$ +# +# For information on usage and redistribution, and for a DISCLAIMER OF ALL +# WARRANTIES, see the file, "license.txt," in this distribution. +# +# more information on http://grrrr.org/ext +# ------------------------------------------------------------------------ +# +# This file contains information for the building process +# +# DO NOT EDIT!! +# +# ------------------------------------------------------------------------ + +NAME=flext + +BUILDCLASS=flext +BUILDMODE=all +BUILDTYPE=all + +BUILDDIR=build + +SRCDIR=source + +PRECOMPILE=flext.h + +SRCS= \ + flbase.cpp flext.cpp flbuf.cpp fldsp.cpp fllib.cpp \ + flxlet.cpp flattr.cpp flattr_ed.cpp flsupport.cpp \ + flutil.cpp flatom.cpp flatom_pr.cpp flthr.cpp fltimer.cpp flsimd.cpp flout.cpp \ + flatom_part.cpp flitem.cpp flmeth.cpp flmsg.cpp \ + flproxy.cpp flqueue.cpp flbind.cpp flmap.cpp +HDRS= \ + flext.h flprefix.h flstdc.h flinternal.h flfeatures.h \ + flpushns.h flpopns.h \ + flbase.h flclass.h flsupport.h fldsp.h \ + flmap.h flcontainers.h \ + fldefs.h fldefs_hdr.h fldefs_setup.h \ + fldefs_methcb.h fldefs_meththr.h fldefs_methadd.h fldefs_methbind.h fldefs_methcall.h \ + fldefs_attrcb.h fldefs_attrvar.h fldefs_attradd.h \ + lockfree/prefix.hpp lockfree/cas.hpp lockfree/branch_hints.hpp \ + lockfree/atomic_int.hpp lockfree/atomic_ptr.hpp \ + lockfree/fifo.hpp lockfree/stack.hpp + + +SRCS_SNDOBJ=flsndobj.cpp +HDRS_SNDOBJ=flsndobj.h + +SRCS_STK=flstk.cpp +HDRS_STK=flstk.h diff --git a/externals/grill/trunk/flext/pd-flext.pc.in b/externals/grill/trunk/flext/pd-flext.pc.in new file mode 100644 index 0000000000000000000000000000000000000000..349b8ff7697979a8d3b776b5dea1b091098899f0 --- /dev/null +++ b/externals/grill/trunk/flext/pd-flext.pc.in @@ -0,0 +1,23 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/flext + +Name: pd-flext +Description: C++ glue layer for Pure Data and Max +Version: @VERSION@ +Cflags: -I${includedir} -DPD -DFLEXT_SYS=2 -DFLEXT_SHARED +Libs: -L${libdir} -lflext-pd + +## sections below ought to be factored out into standalone .pc files +#Name: pd-flext-static +#Description: C++ glue layer for Pure Data and Max (static) +#Version: @VERSION@ +#Cflags: -I${includedir} -DPD +#Libs: -L${libdir} -lflext-pd_s +# +#Name: pd-flext-inline +#Description: C++ glue layer for Pure Data and Max (inline) +#Version: @VERSION@ +#Cflags: -I${includedir} -DPD -DFLEXT_INLINE +#Libs: diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flatom.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flatom.opp new file mode 100644 index 0000000000000000000000000000000000000000..f6683c9997654f5f46deff30ffafeacf4b1f02d2 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flatom.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flatom_part.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flatom_part.opp new file mode 100644 index 0000000000000000000000000000000000000000..54b1f2ee8317c2da720adedcd62d1dc41b44c78f Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flatom_part.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flatom_pr.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flatom_pr.opp new file mode 100644 index 0000000000000000000000000000000000000000..9836e7001e0765c48c9f25ffe061fde08c872b60 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flatom_pr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flattr.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flattr.opp new file mode 100644 index 0000000000000000000000000000000000000000..eef4b25b2c74b01579e61ff25f275db592fdebed Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flattr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flattr_ed.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flattr_ed.opp new file mode 100644 index 0000000000000000000000000000000000000000..fd4d38f0f81ecad2d1bf4c91c36ba2a68d3127d8 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flattr_ed.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flbase.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flbase.opp new file mode 100644 index 0000000000000000000000000000000000000000..9b7a4a84a2f9ae740c3abd130b5ca8d5235b6ddc Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flbase.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flbind.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flbind.opp new file mode 100644 index 0000000000000000000000000000000000000000..66defff500eab3963ff288b2b84f51823134e6c3 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flbind.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flbuf.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flbuf.opp new file mode 100644 index 0000000000000000000000000000000000000000..cc1fbb2dcf00181463327ddc64364e9b9958c8fb Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flbuf.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/fldsp.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/fldsp.opp new file mode 100644 index 0000000000000000000000000000000000000000..7d083e01d4db900aad4c4b5388224b2a842fd786 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/fldsp.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flext.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flext.opp new file mode 100644 index 0000000000000000000000000000000000000000..423351efa5d2e301edc8f31a25218abdb32d3304 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flext.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flitem.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flitem.opp new file mode 100644 index 0000000000000000000000000000000000000000..ba6447b82ac9b3b0deba155d9339b77d7651ace4 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flitem.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/fllib.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/fllib.opp new file mode 100644 index 0000000000000000000000000000000000000000..0f83db8a4c09e7cfa6492dd25265496eb3f5aac2 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/fllib.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flmap.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flmap.opp new file mode 100644 index 0000000000000000000000000000000000000000..ce5738ef8a18a244ae8dfe0cc35402c99d94c1dd Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flmap.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flmeth.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flmeth.opp new file mode 100644 index 0000000000000000000000000000000000000000..745b7d7216e32e593a2ca3dc5b669dfb6957eeb1 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flmeth.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flmsg.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flmsg.opp new file mode 100644 index 0000000000000000000000000000000000000000..2369125cd04891f1d3403f303c20e9f6fb404d2f Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flmsg.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flout.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flout.opp new file mode 100644 index 0000000000000000000000000000000000000000..a9a6daa1064563c2d1c706064d088fe278e1e642 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flout.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flproxy.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flproxy.opp new file mode 100644 index 0000000000000000000000000000000000000000..737b9661430db33e6cfb3b5cb0929e8604d3bc1b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flproxy.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flqueue.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flqueue.opp new file mode 100644 index 0000000000000000000000000000000000000000..294b8ee40faa26c3e33d1e578fd2b9b4757f07ed Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flqueue.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flsimd.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flsimd.opp new file mode 100644 index 0000000000000000000000000000000000000000..e49e625b4385f33f302e0ec431f85b7510c1857a Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flsimd.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flsupport.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flsupport.opp new file mode 100644 index 0000000000000000000000000000000000000000..c69c14eed57a06b24cf9c4834802765a01af2f73 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flsupport.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flthr.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flthr.opp new file mode 100644 index 0000000000000000000000000000000000000000..d4af719347bcd0bbaf59500a701ec6bd4f7ae595 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flthr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/fltimer.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/fltimer.opp new file mode 100644 index 0000000000000000000000000000000000000000..d5af9c3c110f95472ad180eb50a52870637545fa Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/fltimer.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flutil.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flutil.opp new file mode 100644 index 0000000000000000000000000000000000000000..1a4c9fde1f712f9a6acda2c7d6f5c72f8f004d43 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flutil.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/flxlet.opp b/externals/grill/trunk/flext/pd-linux/debug-multi/flxlet.opp new file mode 100644 index 0000000000000000000000000000000000000000..70b109245509dfca798a9aecb756da18f464fab5 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/flxlet.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-multi/libflext-pd_td.a.0.6.0 b/externals/grill/trunk/flext/pd-linux/debug-multi/libflext-pd_td.a.0.6.0 new file mode 100644 index 0000000000000000000000000000000000000000..5fc73713fb5837ecc11909b8d5c67ec4d7e9766e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-multi/libflext-pd_td.a.0.6.0 differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flatom.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flatom.opp new file mode 100644 index 0000000000000000000000000000000000000000..a42c5516a9cb17274f25c525cc0eb5559d20ec6e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flatom.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flatom_part.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flatom_part.opp new file mode 100644 index 0000000000000000000000000000000000000000..c458e31b3adc6b5945017e1419c7197ac098a5a2 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flatom_part.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flatom_pr.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flatom_pr.opp new file mode 100644 index 0000000000000000000000000000000000000000..f8aac329ff071a70319d370adb1113c9e8c31f5c Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flatom_pr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flattr.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flattr.opp new file mode 100644 index 0000000000000000000000000000000000000000..c0ccc59e0b191437bdf86e5d4663cfc84a1dd6c0 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flattr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flattr_ed.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flattr_ed.opp new file mode 100644 index 0000000000000000000000000000000000000000..4633920be356fe1d09b054fc6d703070d60fd8ab Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flattr_ed.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flbase.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flbase.opp new file mode 100644 index 0000000000000000000000000000000000000000..19912e02ebd0683661a47ea42e4517f168fe362e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flbase.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flbind.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flbind.opp new file mode 100644 index 0000000000000000000000000000000000000000..d1433652d367255b019c2e8c76b407502afe3517 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flbind.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flbuf.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flbuf.opp new file mode 100644 index 0000000000000000000000000000000000000000..c1c96c35de6eb496697f96bb6acda907fd865c4f Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flbuf.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/fldsp.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/fldsp.opp new file mode 100644 index 0000000000000000000000000000000000000000..65c53ea6ffb32ce5d09f8f48c3c9a09408f14bcf Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/fldsp.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flext.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flext.opp new file mode 100644 index 0000000000000000000000000000000000000000..97e63cda50c0e282fb7f1a0bccc098e519dfedb0 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flext.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flitem.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flitem.opp new file mode 100644 index 0000000000000000000000000000000000000000..95812548b3deab25de152dbc65d621c5de868774 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flitem.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/fllib.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/fllib.opp new file mode 100644 index 0000000000000000000000000000000000000000..b10836ea42067981a5df86306f80b0597a30c124 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/fllib.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flmap.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flmap.opp new file mode 100644 index 0000000000000000000000000000000000000000..1282abefe5c1042cb6d758afa4e183d9d821dae0 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flmap.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flmeth.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flmeth.opp new file mode 100644 index 0000000000000000000000000000000000000000..4367744289f0c350beb391f1834c9ab110bb7923 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flmeth.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flmsg.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flmsg.opp new file mode 100644 index 0000000000000000000000000000000000000000..56e85999b392de403133532136256bb36cf39860 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flmsg.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flout.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flout.opp new file mode 100644 index 0000000000000000000000000000000000000000..a3b6c302bdf98259590f3b970adb493ee17e203c Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flout.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flproxy.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flproxy.opp new file mode 100644 index 0000000000000000000000000000000000000000..dd0e9c55dc67ad5dbba044afc80524d22b5c8aa3 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flproxy.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flqueue.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flqueue.opp new file mode 100644 index 0000000000000000000000000000000000000000..3be0ad507eb25b09e8c269cbda76f45e716ea555 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flqueue.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flsimd.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flsimd.opp new file mode 100644 index 0000000000000000000000000000000000000000..ab29a2707d35a0936f8c51a0c651fb24477ccb19 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flsimd.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flsupport.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flsupport.opp new file mode 100644 index 0000000000000000000000000000000000000000..63988497b7b83f1abcf123ece65252a2fad2c65f Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flsupport.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flthr.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flthr.opp new file mode 100644 index 0000000000000000000000000000000000000000..a8dac45313b0b5ebeb1725aa196bcaab81da61e1 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flthr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/fltimer.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/fltimer.opp new file mode 100644 index 0000000000000000000000000000000000000000..7093affbd660e9e1367ff20fbe7c619ec0073935 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/fltimer.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flutil.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flutil.opp new file mode 100644 index 0000000000000000000000000000000000000000..4933c70ac81c8b5893156801fdd5140eae08eff1 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flutil.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/flxlet.opp b/externals/grill/trunk/flext/pd-linux/debug-shared/flxlet.opp new file mode 100644 index 0000000000000000000000000000000000000000..f2f113b1f3f030ab79bdc0ec33d387dcfd6d6c75 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/flxlet.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-shared/libflext-pd_d.so.0.6.0 b/externals/grill/trunk/flext/pd-linux/debug-shared/libflext-pd_d.so.0.6.0 new file mode 100755 index 0000000000000000000000000000000000000000..3e572c517a2903d9db9114b136cd9c8b0024c646 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-shared/libflext-pd_d.so.0.6.0 differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flatom.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flatom.opp new file mode 100644 index 0000000000000000000000000000000000000000..6396f6e778e9c2bd4cafca6c6c484659214c5615 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flatom.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flatom_part.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flatom_part.opp new file mode 100644 index 0000000000000000000000000000000000000000..e126099a56dc991ed37810afbf36b46a0ef4328a Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flatom_part.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flatom_pr.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flatom_pr.opp new file mode 100644 index 0000000000000000000000000000000000000000..52f8149fd5c5c80237a781beb49d6224eb51ba9f Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flatom_pr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flattr.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flattr.opp new file mode 100644 index 0000000000000000000000000000000000000000..935796615d34fbdbccaa5ecfab897c1037b66822 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flattr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flattr_ed.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flattr_ed.opp new file mode 100644 index 0000000000000000000000000000000000000000..0324433e64e512b6fcf4fbe2da17c381963f8ca8 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flattr_ed.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flbase.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flbase.opp new file mode 100644 index 0000000000000000000000000000000000000000..5a54907585acf2c03caf897c5384c0e69f83d977 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flbase.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flbind.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flbind.opp new file mode 100644 index 0000000000000000000000000000000000000000..5008008865639d5db8dcef0f46bd2da67478450e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flbind.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flbuf.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flbuf.opp new file mode 100644 index 0000000000000000000000000000000000000000..d44e551690323ac1fb0b84ad51f858be3255cc41 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flbuf.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/fldsp.opp b/externals/grill/trunk/flext/pd-linux/debug-single/fldsp.opp new file mode 100644 index 0000000000000000000000000000000000000000..d4a1a6307258bad731efff2fd32dc686667ec444 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/fldsp.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flext.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flext.opp new file mode 100644 index 0000000000000000000000000000000000000000..0d86eb227b1628dded24e492ff4d496063390730 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flext.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flitem.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flitem.opp new file mode 100644 index 0000000000000000000000000000000000000000..e36c54eceafaec78286593ef08e3fee3e93af74b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flitem.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/fllib.opp b/externals/grill/trunk/flext/pd-linux/debug-single/fllib.opp new file mode 100644 index 0000000000000000000000000000000000000000..ad6a1a8febf70a65fbfb6db2101103646b3c5f90 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/fllib.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flmap.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flmap.opp new file mode 100644 index 0000000000000000000000000000000000000000..70556430b2bf41213bbe71ff03b5e1e08a8831b1 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flmap.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flmeth.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flmeth.opp new file mode 100644 index 0000000000000000000000000000000000000000..a9d2e32f39cb98aa7297e070b32c04f728a417a2 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flmeth.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flmsg.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flmsg.opp new file mode 100644 index 0000000000000000000000000000000000000000..31ef34a4a1bd8609a5555021d072cb4bf7685f1b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flmsg.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flout.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flout.opp new file mode 100644 index 0000000000000000000000000000000000000000..99f1a76d289930c0a7e90b595b51cff9e68a7447 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flout.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flproxy.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flproxy.opp new file mode 100644 index 0000000000000000000000000000000000000000..3065ad09d39f767fdfd2f565e27c17b9d667d8a0 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flproxy.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flqueue.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flqueue.opp new file mode 100644 index 0000000000000000000000000000000000000000..4b392a21027f0632ff65733db7e7f0e68b2f5ae8 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flqueue.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flsimd.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flsimd.opp new file mode 100644 index 0000000000000000000000000000000000000000..df49fe9033c27b5f8fa16d94989445de9c980ef9 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flsimd.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flsupport.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flsupport.opp new file mode 100644 index 0000000000000000000000000000000000000000..dfa8da1fcdb8338ba58064585425b253df8ddf9c Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flsupport.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flthr.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flthr.opp new file mode 100644 index 0000000000000000000000000000000000000000..dc6419f2fb0c7eec43e5ad6e27647497ff436001 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flthr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/fltimer.opp b/externals/grill/trunk/flext/pd-linux/debug-single/fltimer.opp new file mode 100644 index 0000000000000000000000000000000000000000..d02b95b97c2771ee449886daca4f5d22368269c8 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/fltimer.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flutil.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flutil.opp new file mode 100644 index 0000000000000000000000000000000000000000..b22afe8625bdf1f299f1a3d6542b1ebe99ea80f6 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flutil.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/flxlet.opp b/externals/grill/trunk/flext/pd-linux/debug-single/flxlet.opp new file mode 100644 index 0000000000000000000000000000000000000000..57014c522f94664f84b970abbe93aca157e7524e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/flxlet.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/debug-single/libflext-pd_sd.a.0.6.0 b/externals/grill/trunk/flext/pd-linux/debug-single/libflext-pd_sd.a.0.6.0 new file mode 100644 index 0000000000000000000000000000000000000000..a8173a024ae4857aacc56adead91efd5c2279eca Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/debug-single/libflext-pd_sd.a.0.6.0 differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flatom.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flatom.opp new file mode 100644 index 0000000000000000000000000000000000000000..79380cbc018b2630b779421c6a073fe8e68a3d0b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flatom.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flatom_part.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flatom_part.opp new file mode 100644 index 0000000000000000000000000000000000000000..b77997305be6089bc1bd347f0015a509c805e42e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flatom_part.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flatom_pr.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flatom_pr.opp new file mode 100644 index 0000000000000000000000000000000000000000..ffc990c057dd5b72b8fd61d1feef85cc2173791f Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flatom_pr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flattr.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flattr.opp new file mode 100644 index 0000000000000000000000000000000000000000..ea6a073c47c34e3b0736804b7f89d56c68a63bd5 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flattr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flattr_ed.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flattr_ed.opp new file mode 100644 index 0000000000000000000000000000000000000000..e8ba9a70305466e8362e75006cc7780a216af9ad Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flattr_ed.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flbase.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flbase.opp new file mode 100644 index 0000000000000000000000000000000000000000..87b758d0cd37a80dfd9f89d078353ac5dbe6f0de Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flbase.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flbind.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flbind.opp new file mode 100644 index 0000000000000000000000000000000000000000..f0ffc63bba9917a87a7c3d1d7a68cefc904c9966 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flbind.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flbuf.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flbuf.opp new file mode 100644 index 0000000000000000000000000000000000000000..1302d5955703e8f5ea71b83e3d96a444a5d92a6d Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flbuf.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/fldsp.opp b/externals/grill/trunk/flext/pd-linux/release-multi/fldsp.opp new file mode 100644 index 0000000000000000000000000000000000000000..fcd058f85f454ff36ba377921a2e118a035737d1 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/fldsp.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flext.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flext.opp new file mode 100644 index 0000000000000000000000000000000000000000..07a9dc2b9a7d2aa6e37b38c845075cc0e85051d3 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flext.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flitem.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flitem.opp new file mode 100644 index 0000000000000000000000000000000000000000..14de7cd5fd6ac51bc21890ea453ababe58cbc5c2 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flitem.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/fllib.opp b/externals/grill/trunk/flext/pd-linux/release-multi/fllib.opp new file mode 100644 index 0000000000000000000000000000000000000000..c51d395c95079044ae6aa19b0a83b8266e4b6879 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/fllib.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flmap.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flmap.opp new file mode 100644 index 0000000000000000000000000000000000000000..84afd15e90f2b1824863f7ef417043b50263161b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flmap.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flmeth.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flmeth.opp new file mode 100644 index 0000000000000000000000000000000000000000..d43f2c8af7ab76b30459403cd95f3f82a57496c3 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flmeth.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flmsg.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flmsg.opp new file mode 100644 index 0000000000000000000000000000000000000000..a1f0613d357641bc3cfdb14e6a18e59d3bed5b57 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flmsg.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flout.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flout.opp new file mode 100644 index 0000000000000000000000000000000000000000..661b8542a6aa7568456db4e0d4975d26a5e602f1 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flout.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flproxy.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flproxy.opp new file mode 100644 index 0000000000000000000000000000000000000000..a9c39b90c4f20fc0603c8876eaaf6a95ed94c050 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flproxy.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flqueue.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flqueue.opp new file mode 100644 index 0000000000000000000000000000000000000000..fa448abab8376ce7cd1ad5c2e403ffaade0e80bd Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flqueue.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flsimd.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flsimd.opp new file mode 100644 index 0000000000000000000000000000000000000000..201c5dc34a12b6463c1539252c92cb13c033e3fd Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flsimd.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flsupport.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flsupport.opp new file mode 100644 index 0000000000000000000000000000000000000000..03d011b96ca31eea874313b383a6a5823d119a7b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flsupport.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flthr.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flthr.opp new file mode 100644 index 0000000000000000000000000000000000000000..f3b7eabb2b7227959ac6b3f06ed533c8682fc6c9 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flthr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/fltimer.opp b/externals/grill/trunk/flext/pd-linux/release-multi/fltimer.opp new file mode 100644 index 0000000000000000000000000000000000000000..e4f52ffe3cbc3d022a4cfeadf5ea1ef71bacb079 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/fltimer.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flutil.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flutil.opp new file mode 100644 index 0000000000000000000000000000000000000000..cb7c2701d01e4ee67a978dc5935459cbae089896 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flutil.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/flxlet.opp b/externals/grill/trunk/flext/pd-linux/release-multi/flxlet.opp new file mode 100644 index 0000000000000000000000000000000000000000..0a826aca8f4f116d247bb9d562e6f9adc824d571 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/flxlet.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-multi/libflext-pd_t.a.0.6.0 b/externals/grill/trunk/flext/pd-linux/release-multi/libflext-pd_t.a.0.6.0 new file mode 100644 index 0000000000000000000000000000000000000000..06f7f8162104994d4d1a848154009f4c78de9e1d Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-multi/libflext-pd_t.a.0.6.0 differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flatom.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flatom.opp new file mode 100644 index 0000000000000000000000000000000000000000..0c87e51ee284bc573f36072f920d79e123341a67 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flatom.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flatom_part.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flatom_part.opp new file mode 100644 index 0000000000000000000000000000000000000000..95fac11bfd41bc5b36c14029a0f2faedc04ca30e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flatom_part.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flatom_pr.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flatom_pr.opp new file mode 100644 index 0000000000000000000000000000000000000000..ebcb077d1457331e1836274bc9c37684b2194d04 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flatom_pr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flattr.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flattr.opp new file mode 100644 index 0000000000000000000000000000000000000000..e5c726c4adf0eb6a9e3ba0551b70a481fb7180cf Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flattr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flattr_ed.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flattr_ed.opp new file mode 100644 index 0000000000000000000000000000000000000000..39d3c3ccd2ea1da1705f7563f744a2823152c9f4 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flattr_ed.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flbase.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flbase.opp new file mode 100644 index 0000000000000000000000000000000000000000..913d7efa96ff4a68521d4449e390ee349353b6d4 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flbase.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flbind.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flbind.opp new file mode 100644 index 0000000000000000000000000000000000000000..0e844bc6abd30aa7ee542d451c3c3bc3fc1cab6b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flbind.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flbuf.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flbuf.opp new file mode 100644 index 0000000000000000000000000000000000000000..a03d8292d3d2bfc77860cee8659af8f97395cc8d Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flbuf.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/fldsp.opp b/externals/grill/trunk/flext/pd-linux/release-shared/fldsp.opp new file mode 100644 index 0000000000000000000000000000000000000000..8c2e36efeb490efb29fcb359c38838f801c6e808 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/fldsp.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flext.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flext.opp new file mode 100644 index 0000000000000000000000000000000000000000..d0f356fe90d6948fe13025891f49ec6355900bc0 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flext.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flitem.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flitem.opp new file mode 100644 index 0000000000000000000000000000000000000000..e80ef999e8081caf57b73777db36fa81c0d22a0a Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flitem.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/fllib.opp b/externals/grill/trunk/flext/pd-linux/release-shared/fllib.opp new file mode 100644 index 0000000000000000000000000000000000000000..d840477fd8a5939b6745eae9a7adf6866bf95479 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/fllib.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flmap.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flmap.opp new file mode 100644 index 0000000000000000000000000000000000000000..84afd15e90f2b1824863f7ef417043b50263161b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flmap.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flmeth.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flmeth.opp new file mode 100644 index 0000000000000000000000000000000000000000..be996ecdc65fe0901216736ec38298809c563a4f Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flmeth.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flmsg.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flmsg.opp new file mode 100644 index 0000000000000000000000000000000000000000..ba2e23ad4a9abcb21e840462904f05cd41c947bf Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flmsg.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flout.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flout.opp new file mode 100644 index 0000000000000000000000000000000000000000..1d70d11b330efcf6701fc3041efb0d39acd6c06d Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flout.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flproxy.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flproxy.opp new file mode 100644 index 0000000000000000000000000000000000000000..ddb410c6a5d84ddf9f90443c0ec43e70e00d2087 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flproxy.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flqueue.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flqueue.opp new file mode 100644 index 0000000000000000000000000000000000000000..80e0dd9fb6ca82b1a550c87c85733b4127e2c2e6 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flqueue.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flsimd.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flsimd.opp new file mode 100644 index 0000000000000000000000000000000000000000..01ddcac9e809f07257f70b3a43dc6e7af213a12d Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flsimd.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flsupport.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flsupport.opp new file mode 100644 index 0000000000000000000000000000000000000000..52fbf8b0b26fc19ab380bf33ce49f3c6570d258d Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flsupport.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flthr.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flthr.opp new file mode 100644 index 0000000000000000000000000000000000000000..8b6a41e1688a9eec52e0cf97eaabe474125a35cd Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flthr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/fltimer.opp b/externals/grill/trunk/flext/pd-linux/release-shared/fltimer.opp new file mode 100644 index 0000000000000000000000000000000000000000..dce918525506ccc9d9214346a839d2c6267259a2 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/fltimer.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flutil.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flutil.opp new file mode 100644 index 0000000000000000000000000000000000000000..f1b7fd97d1d8c539deb3c6f83a8065ca0548f06e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flutil.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/flxlet.opp b/externals/grill/trunk/flext/pd-linux/release-shared/flxlet.opp new file mode 100644 index 0000000000000000000000000000000000000000..86828cffff3110819f6ae7483d3328d3c944dff2 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/flxlet.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-shared/libflext-pd.so.0.6.0 b/externals/grill/trunk/flext/pd-linux/release-shared/libflext-pd.so.0.6.0 new file mode 100755 index 0000000000000000000000000000000000000000..cf2122e94c9e8c1dc9034da857d1d0ac70c3074d Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-shared/libflext-pd.so.0.6.0 differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flatom.opp b/externals/grill/trunk/flext/pd-linux/release-single/flatom.opp new file mode 100644 index 0000000000000000000000000000000000000000..d13d2923b101d4a47cfd4dbbd7d209b2b65d5622 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flatom.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flatom_part.opp b/externals/grill/trunk/flext/pd-linux/release-single/flatom_part.opp new file mode 100644 index 0000000000000000000000000000000000000000..9ca0d3639724fd3b41c416a2147f759aa2f68f92 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flatom_part.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flatom_pr.opp b/externals/grill/trunk/flext/pd-linux/release-single/flatom_pr.opp new file mode 100644 index 0000000000000000000000000000000000000000..0ff78422f7707390a310e1d213bf4f285d5c6ec5 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flatom_pr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flattr.opp b/externals/grill/trunk/flext/pd-linux/release-single/flattr.opp new file mode 100644 index 0000000000000000000000000000000000000000..eda7f077bae403a34d4089ba0ba13ae71011b55e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flattr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flattr_ed.opp b/externals/grill/trunk/flext/pd-linux/release-single/flattr_ed.opp new file mode 100644 index 0000000000000000000000000000000000000000..67e2fc3da0922abccc573f4c183819df19ea549a Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flattr_ed.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flbase.opp b/externals/grill/trunk/flext/pd-linux/release-single/flbase.opp new file mode 100644 index 0000000000000000000000000000000000000000..f8cdcd7c363bf5d3e255f4e6d0b2bd8e109735c9 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flbase.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flbind.opp b/externals/grill/trunk/flext/pd-linux/release-single/flbind.opp new file mode 100644 index 0000000000000000000000000000000000000000..2ab12675f78a6e87fa9ff890edfb0927ace39689 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flbind.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flbuf.opp b/externals/grill/trunk/flext/pd-linux/release-single/flbuf.opp new file mode 100644 index 0000000000000000000000000000000000000000..a6e04d2b671d3027036642f61d210b46c5368e0b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flbuf.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/fldsp.opp b/externals/grill/trunk/flext/pd-linux/release-single/fldsp.opp new file mode 100644 index 0000000000000000000000000000000000000000..7d130eb2dc4eaf8517a16d819698d459e90e3131 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/fldsp.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flext.opp b/externals/grill/trunk/flext/pd-linux/release-single/flext.opp new file mode 100644 index 0000000000000000000000000000000000000000..fc0d46b1511230e5ada35a4bb030e21d305c4160 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flext.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flitem.opp b/externals/grill/trunk/flext/pd-linux/release-single/flitem.opp new file mode 100644 index 0000000000000000000000000000000000000000..2aa640ab6e6c9191ac769bcd420a51b0d2c7f2fe Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flitem.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/fllib.opp b/externals/grill/trunk/flext/pd-linux/release-single/fllib.opp new file mode 100644 index 0000000000000000000000000000000000000000..35427dc25ebfc76de1f6581a6cf6e72b5af27492 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/fllib.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flmap.opp b/externals/grill/trunk/flext/pd-linux/release-single/flmap.opp new file mode 100644 index 0000000000000000000000000000000000000000..84afd15e90f2b1824863f7ef417043b50263161b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flmap.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flmeth.opp b/externals/grill/trunk/flext/pd-linux/release-single/flmeth.opp new file mode 100644 index 0000000000000000000000000000000000000000..23e076027636bc200730697aad6153b494bc20a3 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flmeth.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flmsg.opp b/externals/grill/trunk/flext/pd-linux/release-single/flmsg.opp new file mode 100644 index 0000000000000000000000000000000000000000..ca2ff752625bcf5d73d03ebc94bf2bc9d1c4918d Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flmsg.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flout.opp b/externals/grill/trunk/flext/pd-linux/release-single/flout.opp new file mode 100644 index 0000000000000000000000000000000000000000..8a65e0e86435b9725ee8b82c78f3487e2414dc3c Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flout.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flproxy.opp b/externals/grill/trunk/flext/pd-linux/release-single/flproxy.opp new file mode 100644 index 0000000000000000000000000000000000000000..bc40b8f049959031885460cc1ad8969bbf59b730 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flproxy.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flqueue.opp b/externals/grill/trunk/flext/pd-linux/release-single/flqueue.opp new file mode 100644 index 0000000000000000000000000000000000000000..f667812d91619e00841149c45cb65cd5fa0af48b Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flqueue.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flsimd.opp b/externals/grill/trunk/flext/pd-linux/release-single/flsimd.opp new file mode 100644 index 0000000000000000000000000000000000000000..622e48dcaa1a288cafa7c1bccd03dd82800902cc Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flsimd.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flsupport.opp b/externals/grill/trunk/flext/pd-linux/release-single/flsupport.opp new file mode 100644 index 0000000000000000000000000000000000000000..0441384d69b42a6d4f04efc2dc420db80de42c5e Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flsupport.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flthr.opp b/externals/grill/trunk/flext/pd-linux/release-single/flthr.opp new file mode 100644 index 0000000000000000000000000000000000000000..2eb270883cc53c731826e2c0a55cb7d777e25eac Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flthr.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/fltimer.opp b/externals/grill/trunk/flext/pd-linux/release-single/fltimer.opp new file mode 100644 index 0000000000000000000000000000000000000000..bd8d83347bfd86dd1c2742c058f8086eb26591e0 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/fltimer.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flutil.opp b/externals/grill/trunk/flext/pd-linux/release-single/flutil.opp new file mode 100644 index 0000000000000000000000000000000000000000..1e9bf04f4a9930f0f47d52418ff5c7e30d37015a Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flutil.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/flxlet.opp b/externals/grill/trunk/flext/pd-linux/release-single/flxlet.opp new file mode 100644 index 0000000000000000000000000000000000000000..92761d7055ea366d51dcea8ead95b7a16d737c54 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/flxlet.opp differ diff --git a/externals/grill/trunk/flext/pd-linux/release-single/libflext-pd_s.a.0.6.0 b/externals/grill/trunk/flext/pd-linux/release-single/libflext-pd_s.a.0.6.0 new file mode 100644 index 0000000000000000000000000000000000000000..baf8f2ed2b74366935b29b317b577f872717ee43 Binary files /dev/null and b/externals/grill/trunk/flext/pd-linux/release-single/libflext-pd_s.a.0.6.0 differ diff --git a/externals/grill/trunk/flext/readme.txt b/externals/grill/trunk/flext/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..fe488378978c3eebb3c476ed736811fea05c4626 --- /dev/null +++ b/externals/grill/trunk/flext/readme.txt @@ -0,0 +1,99 @@ +flext - C++ layer for Max/MSP and Pd (Pure Data) externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +This package seeks to encourage the development of open source software +for the pd and Max/MSP platforms. + +Donations for further development of the package are highly appreciated. +https://www.paypal.com/xclick/business=gr%40grrrr.org&item_name=flext&no_note=1&tax=0¤cy_code=EUR + +---------------------------------------------------------------------------- + +Abstract: + +flext seeks to represent a uniform programming interface for extending the most common +modular real-time audio systems Max/MSP and Pure Data (Pd) with external modules, or +short externals. These modules provide a way to tailor such a system for oneÃÂs +special needs and supply additional functionality. + +Source code based on flext is able to exploit most common features of the +respective real-time framework while staying completely independent of the +actual host system and platform (hardware and operating system). + +flext currently supports development for Pd under Linux, Windows and OSX as well as +Max/MSP under OS9, OSX and Windows with various programming environments. + +---------------------------------------------------------------------------- + +Goals/features of the package: + +pros: +- better readability of code compared to straight C externals +- faster development, more robust coding +- sharing of common methods and data by using base classes +- any input to any inlet (with the exception of signal streams) +- transparent use of threads for methods +- libraries of externals in Max/MSP +- more than 3 typed creation arguments possible for Max/MSP + +cons: +- introduces a small overhead to speed of message and signal handling +- larger memory footprint + +---------------------------------------------------------------------------- + +Prerequisites: + +--- Pd --- + You need the pd source code which is most likely part of the distribution. + Otherwise download from: http://msp.ucsd.edu/software.html + +--- Max/MSP --- + You will need the latest Max/MSP SDK + for Windows (http://synthesisters.com/pluggo3/downloadMaxWinSDK.php) + for OSX (http://www.synthesisters.com/sdk/max.php) + or for OS9 (ask Cycling'74 where to find that) + + For OS9 threading support you'll also need the Multiprocessing library + (download at http://developer.apple.com/sdk/) + +--- SndObj --- + If you choose to compile with SndObj support you will need the respective library + download from: http://www.may.ie/academic/music/musictec/SndObj/main.html + +--- STK --- + If you choose to compile with STK support you will need the respective package + and build a library. + download from: https://ccrma.stanford.edu/software/stk/ + For linking it may preferable to use a library of all the STK objects. + + Under linux you can create one from the STK directory with something like + > g++ -c -pipe -I include -D __LINUX_OSS__ src/*.cpp && ar r libstk.a *.o && rm -f *.o + + Under Windows you can build a static STK library with the following commands: + > cl src/*.c* /MT /D__OS_WINDOWS__ /EHsc /Ox /Iinclude /I../pthreads/include /c + > lib *.obj /out:stk.lib + Please note, that you have to have pthreads installed (../pthreads points to it in the command) + Also, the resulting stk.lib will be a multithreaded build, linked to a static C library. + Consequently you should also use multithreaded flext for your flext-based external. + +---------------------------------------------------------------------------- + +Building and installing of flext and flext-based externals: + + See the build.txt document + +---------------------------------------------------------------------------- + +Various notes / limitations / bug list: + + Read the notes.txt document + +---------------------------------------------------------------------------- + +History of changes: + + Read the changes.txt document diff --git a/externals/grill/trunk/flext/source/Makefile.am b/externals/grill/trunk/flext/source/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..e96528cd51530a9749d0bc72e2b6b28191f6777f --- /dev/null +++ b/externals/grill/trunk/flext/source/Makefile.am @@ -0,0 +1,111 @@ +# +# automake template +# added by tim blechmann +# added by Thomas Grill +# + +# static libraries +#lib_LIBRARIES = +# shared libraries +lib_LTLIBRARIES = libflext-@SYSTEM@_s.la libflext-@SYSTEM@_sd.la libflext-@SYSTEM@_t.la libflext-@SYSTEM@_td.la libflext-@SYSTEM@.la libflext-@SYSTEM@_d.la + +SRCS_FLEXT = \ + flbase.cpp \ + flext.cpp \ + flbuf.cpp \ + fldsp.cpp \ + fllib.cpp \ + flxlet.cpp \ + flattr.cpp \ + flattr_ed.cpp \ + flsupport.cpp \ + flutil.cpp \ + flthr.cpp \ + fltimer.cpp \ + flsimd.cpp \ + flout.cpp \ + flatom.cpp \ + flatom_pr.cpp \ + flatom_part.cpp \ + flitem.cpp \ + flmeth.cpp \ + flmsg.cpp \ + flproxy.cpp \ + flqueue.cpp \ + flbind.cpp \ + flmap.cpp + +nobase_pkginclude_HEADERS = \ + flprefix.h \ + flstdc.h \ + flbase.h \ + flclass.h \ + flext.h \ + flsupport.h \ + flmap.h \ + fldsp.h \ + flmspbuffer.h \ + flinternal.h \ + flcontainers.h \ + flpushns.h \ + flpopns.h \ + fldefs.h \ + fldefs_hdr.h \ + fldefs_setup.h \ + fldefs_methcb.h \ + fldefs_meththr.h \ + fldefs_methadd.h \ + fldefs_methbind.h \ + fldefs_methcall.h \ + fldefs_attrcb.h \ + fldefs_attrvar.h \ + fldefs_attradd.h \ + lockfree/prefix.hpp \ + lockfree/branch_hints.hpp \ + lockfree/cas.hpp \ + lockfree/atomic_int.hpp \ + lockfree/atomic_ptr.hpp \ + lockfree/fifo.hpp \ + lockfree/stack.hpp \ + $(SRCS_FLEXT) + + + +# handling for stk / sndobj +SRCS_STK = flstk.cpp +HDRS_STK = flstk.cpp + +SRCS_SNDOBJ = flsndobj.cpp +HDRS_SNDOBJ = flsndobj.cpp + +if SNDOBJ +SRCS_FLEXT += $(SRCS_SNDOBJ) +nobase_pkginclude_HEADERS += $(HDRS_SNDOBJ) +LIB_SNDOBJ = sndobj +endif + +if STK +SRCS_FLEXT += $(SRCS_STK) +nobase_pkginclude_HEADERS += $(HDRS_STK) +LIB_STK = stk +endif + +libflext_@SYSTEM@_s_la_SOURCES = $(SRCS_FLEXT) +libflext_@SYSTEM@_sd_la_SOURCES = $(SRCS_FLEXT) +libflext_@SYSTEM@_t_la_SOURCES = $(SRCS_FLEXT) +libflext_@SYSTEM@_td_la_SOURCES = $(SRCS_FLEXT) +libflext_@SYSTEM@_la_SOURCES = $(SRCS_FLEXT) +libflext_@SYSTEM@_d_la_SOURCES = $(SRCS_FLEXT) + +libflext_@SYSTEM@_s_la_CXXFLAGS = @OPT_FLAGS@ -static $(patsubst %,-I%,@INCLUDEDIRS@) +libflext_@SYSTEM@_sd_la_CXXFLAGS = @DBG_FLAGS@ -static $(patsubst %,-I%,@INCLUDEDIRS@) +libflext_@SYSTEM@_t_la_CXXFLAGS = @OPT_FLAGS@ -static $(patsubst %,-I%,@INCLUDEDIRS@) -DFLEXT_THREADS +libflext_@SYSTEM@_td_la_CXXFLAGS = @DBG_FLAGS@ -static $(patsubst %,-I%,@INCLUDEDIRS@) -DFLEXT_THREADS +libflext_@SYSTEM@_la_CXXFLAGS = @OPT_FLAGS@ $(patsubst %,-I%,@INCLUDEDIRS@) -DFLEXT_SHARED +libflext_@SYSTEM@_d_la_CXXFLAGS = @DBG_FLAGS@ $(patsubst %,-I%,@INCLUDEDIRS@) -DFLEXT_SHARED + +libflext_@SYSTEM@_la_LDFLAGS = @LD_FLAGS@ $(patsubst %,-L%,@LIBDIRS@) $(patsubst %,-l%,@libs@ $(LIB_SNDOBJ) $(LIB_STK)) $(patsubst %,-framework %,@FRAMEWORKS@) +libflext_@SYSTEM@_d_la_LDFLAGS = @LD_FLAGS@ $(patsubst %,-L%,@LIBDIRS@) $(patsubst %,-l%,@libs@ $(LIB_SNDOBJ) $(LIB_STK)) $(patsubst %,-framework %,@FRAMEWORKS@) + +#libflext_@SYSTEM@_la_LIBADD = @libs@ +#libflext_@SYSTEM@_d_la_LIBADD = @libs@ diff --git a/externals/grill/trunk/flext/source/flatom.cpp b/externals/grill/trunk/flext/source/flatom.cpp new file mode 100644 index 0000000000000000000000000000000000000000..366e101ceec1f6ec9634d2b0b3e2c084c2a1b03a --- /dev/null +++ b/externals/grill/trunk/flext/source/flatom.cpp @@ -0,0 +1,179 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flatom.cpp + \brief Definitions for handling the t_atom type and lists thereof. +*/ + +#ifndef __FLEXT_ATOM_CPP +#define __FLEXT_ATOM_CPP + +#include "flext.h" + +#include <cstring> // for memcpy + +#include "flpushns.h" + +#if FLEXT_SYS != FLEXT_SYS_JMAX +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::CmpAtom(const t_atom &a,const t_atom &b) +{ + if(GetType(a) == GetType(b)) { + switch(GetType(a)) { + case A_FLOAT: return GetFloat(a) == GetFloat(b)?0:(GetFloat(a) < GetFloat(b)?-1:1); +#if FLEXT_SYS == FLEXT_SYS_MAX + case A_INT: return GetInt(a) == GetInt(b)?0:(GetInt(a) < GetInt(b)?-1:1); +#endif + case A_SYMBOL: return GetSymbol(a) == GetSymbol(b)?0:strcmp(GetString(a),GetString(b)); +#if FLEXT_SYS == FLEXT_SYS_PD + case A_POINTER: return GetPointer(a) == GetPointer(b)?0:(GetPointer(a) < GetPointer(b)?-1:1); +#endif + default: + // can't be compared..... + FLEXT_ASSERT(false); + return 0; + } + } + else + return GetType(a) < GetType(b)?-1:1; +} +#else +#error Not implemented +#endif + +FLEXT_TEMPIMPL(t_atom *FLEXT_CLASSDEF(flext))::CopyList(int argc,const t_atom *argv) +{ + t_atom *dst = new t_atom[argc]; + memcpy(dst,argv,argc*sizeof(t_atom)); + return dst; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::CopyAtoms(int cnt,t_atom *dst,const t_atom *src) +{ + if(dst < src) + // forward + memcpy(dst,src,cnt*sizeof(t_atom)); + else + // backwards + while(cnt--) dst[cnt] = src[cnt]; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomList::Alloc(int sz,int keepix,int keeplen,int keepto) +{ + if(lst) { + if(cnt == sz) { + if(keepix >= 0 && keepix != keepto) { + int c = keeplen >= 0?keeplen:cnt; + FLEXT_ASSERT(c+keepto <= cnt); + FLEXT_ASSERT(c+keepix <= cnt); + CopyAtoms(c,lst+keepto,lst+keepix); + } + + return; // no change + } + + t_atom *l; + if(sz) { + l = new t_atom[sz]; + if(keepix >= 0) { + // keep contents + int c = keeplen >= 0?keeplen:(cnt > sz?sz:cnt); + FLEXT_ASSERT(c+keepto <= sz); + FLEXT_ASSERT(c+keepix <= cnt); + CopyAtoms(c,l+keepto,lst+keepix); + } + } + else + l = NULL; + + Free(); + lst = l,cnt = sz; + } + else { + FLEXT_ASSERT(cnt == 0); + if(sz) lst = new t_atom[cnt = sz]; + } +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::AtomList::~AtomList() { Free(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomList::Free() +{ + if(lst) { + delete[] lst; lst = NULL; + cnt = 0; + } + else + FLEXT_ASSERT(cnt == 0); +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext))::AtomList &FLEXT_CLASSDEF(flext))::AtomList::Set(int argc,const t_atom *argv,int offs,bool resize) +{ + int ncnt = argc+offs; + if(resize) Alloc(ncnt); + + // argv can be NULL independently from argc + if(argv) CopyAtoms(argc,lst+offs,argv); + + return *this; +} + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::AtomList::Compare(const AtomList &a) const +{ + if(Count() == a.Count()) { + for(int i = 0; i < Count(); ++i) { + int cmp = CmpAtom(lst[i],a[i]); + if(cmp) return cmp; + } + return 0; + } + else + return Count() < a.Count()?-1:1; +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::AtomListStaticBase::~AtomListStaticBase() { Free(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomListStaticBase::Alloc(int sz,int keepix,int keeplen,int keepto) +{ + if(sz <= precnt) { + // small enough for pre-allocated space + + if(AtomList::lst != predata && AtomList::lst) { + // currently allocated memory is larger than what we need + + if(keepix >= 0) { + // keep contents + int c = keeplen >= 0?keeplen:(AtomList::cnt > sz?sz:AtomList::cnt); + FLEXT_ASSERT(c+keepto <= precnt); + FLEXT_ASSERT(c+keepix <= AtomList::cnt); + CopyAtoms(c,predata+keepto,AtomList::lst+keepix); + } + + // free allocated memory + AtomList::Free(); + } + AtomList::lst = predata; + AtomList::cnt = sz; + } + else + AtomList::Alloc(sz,keepix,keeplen,keepto); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomListStaticBase::Free() +{ + if(AtomList::lst != predata) + AtomList::Free(); + else { + AtomList::lst = NULL; + AtomList::cnt = 0; + } +} + +#include "flpopns.h" + +#endif // __FLEXT_ATOM_CPP + diff --git a/externals/grill/trunk/flext/source/flatom_part.cpp b/externals/grill/trunk/flext/source/flatom_part.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d4a23f76480f9ff81a105686fe2cbd41b5472dd --- /dev/null +++ b/externals/grill/trunk/flext/source/flatom_part.cpp @@ -0,0 +1,44 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flatom_part.cpp + \brief Definitions for handling the t_atom type and lists thereof. +*/ + +#ifndef __FLEXT_ATOM_PART_CPP +#define __FLEXT_ATOM_PART_CPP + +#include "flext.h" + +#include "flpushns.h" + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::AtomList::Get(t_atom *argv,int mxsz) const +{ + int argc = Count(); + if(mxsz >= 0 && argc > mxsz) argc = mxsz; + + for(int i = 0; i < argc; ++i) SetAtom(argv[i],lst[i]); + + return argc; +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AtomList::GetPart(int offs,int len,AtomList &ret) const +{ + if(offs+len > Count()) { + len = Count()-offs; + if(len < 0) len = 0; + } + + ret(len,Atoms()+offs); +} + +#include "flpopns.h" + +#endif // __FLEXT_ATOM_PART_CPP + diff --git a/externals/grill/trunk/flext/source/flatom_pr.cpp b/externals/grill/trunk/flext/source/flatom_pr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..795f37ba0d7a313651050a593f2446f32294c5dd --- /dev/null +++ b/externals/grill/trunk/flext/source/flatom_pr.cpp @@ -0,0 +1,139 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flatom_pr.cpp + \brief Definitions for printing and scanning the t_atom type. +*/ + +#ifndef __FLEXT_ATOM_PR_CPP +#define __FLEXT_ATOM_PR_CPP + +#include "flext.h" + +#include <cctype> +#include <cstdlib> +#include <cstring> +#include <cstdio> + +#include "flpushns.h" + +#ifdef _MSC_VER +#define snprintf _snprintf +#endif + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::PrintAtom(const t_atom &a,char *buf,size_t bufsz) +{ + bool ok = true; + if(IsFloat(a)) { + ok = STD::snprintf(buf,bufsz,"%g",GetFloat(a)) > 0; + } + else if(IsInt(a)) { + ok = STD::snprintf(buf,bufsz,"%i",GetInt(a)) > 0; + } + else if(IsSymbol(a)) { + const char *c = GetString(a); + size_t len = strlen(c); + if(len < bufsz) { + memcpy(buf,c,len); buf[len] = 0; + ok = true; + } + else + ok = false; + } +#if FLEXT_SYS == FLEXT_SYS_PD +#ifndef FLEXT_COMPATIBLE + else if(IsPointer(a)) { + ok = STD::snprintf(buf,bufsz,"%p",GetPointer(a)) > 0; + } +#endif + else if(a.a_type == A_DOLLAR) { + ok = STD::snprintf(buf,bufsz,"$%d",a.a_w.w_index) > 0; + } + else if(a.a_type == A_DOLLSYM) { + ok = STD::snprintf(buf,bufsz,"$%s",GetString(a)) > 0; + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + else if(a.a_type == A_DOLLAR) { + ok = STD::snprintf(buf,bufsz,"$%ld",a.a_w.w_long) > 0; + } +#else +//#pragma message("Not implemented") +#endif + else { + error("flext: atom type unknown"); + ok = false; + } + return ok; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz) +{ + bool ok = true; + for(int i = 0; ok && i < argc && bufsz > 0; ++i) { + if(i) { *(buf++) = ' '; --bufsz; } // prepend space + + if(PrintAtom(argv[i],buf,bufsz)) { + size_t len = strlen(buf); + buf += len,bufsz -= len; + } + else + ok = false; + } + *buf = 0; + return ok; +} + + +FLEXT_TEMPIMPL(const char *FLEXT_CLASSDEF(flext))::ScanAtom(t_atom &a,const char *c) +{ + // skip leading whitespace + while(*c && isspace(*c)) ++c; + if(!*c) return NULL; + + // go to next space and save character + char *end = const_cast<char *>(c); + while(*end && !isspace(*end)) ++end; + char sv = *end; + + float fres; + // first try float + char *endp; + // see if it's a float - thanks to Frank Barknecht + fres = (float)strtod(c,&endp); + if(*c && endp != c) { + int ires = (int)fres; // try a cast + if(fres == ires) + SetInt(a,ires); + else + SetFloat(a,fres); + } + // no, it's a symbol + else + SetString(a,c); + + *end = sv; + + return end; +} + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::ScanList(int argc,t_atom *argv,const char *buf) +{ + int read; + for(read = 0; read < argc; ++read) + { + buf = ScanAtom(argv[read],buf); + if(!buf) break; + } + return read; +} + +#include "flpopns.h" + +#endif // __FLEXT_ATOM_PR_CPP + + diff --git a/externals/grill/trunk/flext/source/flattr.cpp b/externals/grill/trunk/flext/source/flattr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..84ad85afd1ef9f58a3960c6ac61a1ca7e407f4f2 --- /dev/null +++ b/externals/grill/trunk/flext/source/flattr.cpp @@ -0,0 +1,453 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flattr.cpp + \brief Attribute handling for the flext base class +*/ + +#ifndef __FLEXT_ATTR_CPP +#define __FLEXT_ATTR_CPP + +#include "flext.h" + +#include <cstring> +#include <cctype> +#include <set> + +#include "flpushns.h" + +#ifdef __MWERKS__ +#define STD std +#else +#define STD +#endif + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::AttrItem::AttrItem(const t_symbol *t,metharg tp,methfun f,int fl): + Item(NULL),index(0), + flags(fl|afl_shown), + argtp(tp),fun(f), + counter(NULL),tag(t) +{} + + +/* +FLEXT_CLASSDEF(flext_base)::AttrDataCont::AttrDataCont() {} + +FLEXT_CLASSDEF(flext_base)::AttrDataCont::~AttrDataCont() +{ + for(iterator it = begin(); it != end(); ++it) + if(it.data()) delete it.data(); +} +*/ + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::AttrDataCont::~AttrDataCont() { clear(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AttrDataCont::clear() +{ + for(FLEXT_TEMP_TYPENAME AttrDataCont::iterator it(*this); it; ++it) delete it.data(); + TablePtrMap<const t_symbol *,AttrData *,8>::clear(); +} + +//! Add get and set attributes +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddAttrib(ItemCont *aa,ItemCont *ma,const t_symbol *asym,metharg tp,methfun gfun,methfun sfun) +{ + AttrItem *a,*b; + + FLEXT_ASSERT(asym != sym__ && asym != sym_list && asym != sym_float && asym != sym_symbol && asym != sym_anything); + + if(sfun) // if commented out, there will be a warning at run-time (more user-friendly) + { + a = new AttrItem(asym,tp,sfun,AttrItem::afl_set); + a->index = aa->Members(); + aa->Add(a,asym); + + // bind attribute to a method + MethItem *mi = new MethItem(a); + mi->SetArgs(sfun,1,new metharg(tp)); + ma->Add(mi,asym); + } + else + a = NULL; + + if(gfun) // if commented out, there will be a warning at run-time (more user-friendly) + { + b = new AttrItem(asym,tp,gfun,AttrItem::afl_get); + b->index = aa->Members(); + aa->Add(b,asym); + + static char tmp[256] = "get"; + strcpy(tmp+3,GetString(asym)); + + // bind attribute to a method + MethItem *mi = new MethItem(b); + mi->SetArgs(gfun,0,NULL); + ma->Add(mi,MakeSymbol(tmp)); + } + else + b = NULL; + + if(a && b) { + a->counter = b; + b->counter = a; + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddAttrib(const t_symbol *attr,metharg tp,methfun gfun,methfun sfun) +{ + if(HasAttributes()) + AddAttrib(ThAttrs(),ThMeths(),attr,tp,gfun,sfun); + else + error("%s - attribute procession is not enabled!",thisName()); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddAttrib(t_classid c,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun) +{ + AddAttrib(ClAttrs(c),ClMeths(c),attr,tp,gfun,sfun); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ListAttrib(AtomList &la) const +{ + typedef TablePtrMap<int,const t_symbol *,32> AttrList; + AttrList list[2]; + ItemCont *clattrhead = ClAttrs(thisClassId()); + + int i; + for(i = 0; i <= 1; ++i) { + ItemCont *a = i?attrhead:clattrhead; + if(a && a->Contained(0)) { + ItemSet &ai = a->GetInlet(); + for(FLEXT_TEMP_TYPENAME ItemSet::iterator as(ai); as; ++as) { + for(Item *al = as.data(); al; al = al->nxt) { + AttrItem *aa = (AttrItem *)al; + list[i].insert(aa->index,as.key()); + break; + } + } + } + } + + la((int)(list[0].size()+list[1].size())); + int ix = 0; + for(i = 0; i <= 1; ++i) + for(AttrList::iterator it(list[i]); it; ++it) + SetSymbol(la[ix++],it.data()); +} + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext_base))::CheckAttrib(int argc,const t_atom *argv) +{ + int offs = 0; + for(; offs < argc; ++offs) + if(IsString(argv[offs]) && *GetString(argv[offs]) == '@') break; + return offs; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::InitAttrib(int argc,const t_atom *argv) +{ + int cur,nxt; + for(cur = 0; cur < argc; cur = nxt) { + // find next @symbol + for(nxt = cur+1; nxt < argc; ++nxt) + if(IsString(argv[nxt]) && *GetString(argv[nxt]) == '@') break; + + const t_symbol *tag = MakeSymbol(GetString(argv[cur])+1); + + // find puttable attribute + AttrItem *attr = FindAttrib(tag,false,true); + if(attr) { + // make an entry (there are none beforehand...) +/* + AttrDataCont::iterator it = attrdata->find(tag); + if(it == attrdata->end()) { + AttrDataCont::pair pair; + pair.key() = tag; + pair.data() = new AttrData; + it = attrdata->insert(attrdata->begin(),pair); + } + + AttrData &a = *it.data(); + a.SetInit(true); + a.SetInitValue(nxt-cur-1,argv+cur+1); + + // pass value to object + SetAttrib(tag,attr,a.GetInitValue()); +*/ + AttrData *a = attrdata->find(tag); + if(!a) { + AttrData *old = attrdata->insert(tag,a = new AttrData); + FLEXT_ASSERT(!old); + } + + a->SetInit(true); + a->SetInitValue(nxt-cur-1,argv+cur+1); + + // pass value to object + SetAttrib(tag,attr,a->GetInitValue()); + } + } + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::ListAttrib() const +{ + if(HasAttributes()) { + // defined in flsupport.cpp + AtomListStatic<32> la; + ListAttrib(la); + ToOutAnything(GetOutAttr(),sym_attributes,la.Count(),la.Atoms()); + return true; + } + else + return false; +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::AttrItem *FLEXT_CLASSDEF(flext_base))::FindAttrib(const t_symbol *tag,bool get,bool msg) const +{ + ItemCont *clattrhead = ClAttrs(thisClassId()); + + // first search within object scope + AttrItem *a = NULL; + { + for(Item *lst = attrhead->FindList(tag); lst; lst = lst->nxt) { + AttrItem *b = (AttrItem *)lst; + if(get?b->IsGet():b->IsSet()) { a = b; break; } + } + } + + // then (if nothing found) search within class scope + if(!a) { + for(Item *lst = clattrhead->FindList(tag); lst; lst = lst->nxt) { + AttrItem *b = (AttrItem *)lst; + if(get?b->IsGet():b->IsSet()) { a = b; break; } + } + } + + if(!a && msg) { + // print a message + error("%s - %s: attribute not found",thisName(),GetString(tag)); + } + return a; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::SetAttrib(const t_symbol *tag,int argc,const t_atom *argv) +{ + // search for matching attribute + AttrItem *a = FindAttrib(tag,false,true); + return a && SetAttrib(tag,a,argc,argv); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::SetAttrib(const t_symbol *tag,AttrItem *a,int argc,const t_atom *argv) +{ + if(a->fun) { + bool ok = true; + + t_any any; + switch(a->argtp) { + case a_float: + if(argc == 1 && CanbeFloat(argv[0])) { + any.ft = GetAFloat(argv[0]); + ((methfun_1)a->fun)(this,any); + } + else ok = false; + break; + case a_int: + if(argc == 1 && CanbeInt(argv[0])) { + any.it = GetAInt(argv[0]); + ((methfun_1)a->fun)(this,any); + } + else ok = false; + break; + case a_symbol: + if(argc == 1 && IsSymbol(argv[0])) { + t_atom at; + GetParamSym(at,GetSymbol(argv[0]),thisCanvas()); + any.st = const_cast<t_symbol *>(GetSymbol(at)); + ((methfun_1)a->fun)(this,any); + } + else ok = false; + break; + case a_bool: + if(argc == 1 && CanbeBool(argv[0])) { + any.bt = GetABool(argv[0]); + ((methfun_1)a->fun)(this,any); + } + else ok = false; + break; + case a_LIST: { + AtomListStatic<16> la(argc); + for(int i = 0; i < argc; ++i) + if(IsSymbol(argv[i])) + GetParamSym(la[i],GetSymbol(argv[i]),thisCanvas()); + else + la[i] = argv[i]; + + any.vt = &la; + ((methfun_1)a->fun)(this,any); + break; + } + default: + ERRINTERNAL(); + } + + if(!ok) + post("%s - wrong arguments for attribute %s",thisName(),GetString(tag)); + } + else + post("%s - attribute %s has no get method",thisName(),GetString(tag)); + return true; +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::GetAttrib(const t_symbol *tag,AttrItem *a,AtomList &la) const +{ + bool ok = true; + // main attribute tag + if(a) { + if(a->fun) { + t_any any; + switch(a->argtp) { + case a_float: { + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + la(1); + SetFloat(la[0],any.ft); + break; + } + case a_int: { + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + la(1); + SetInt(la[0],any.it); + break; + } + case a_bool: { + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + la(1); + SetBool(la[0],any.bt); + break; + } + case a_symbol: { + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + la(1); + SetSymbol(la[0],any.st); + break; + } + case a_LIST: { + any.vt = &la; + ((methfun_1)a->fun)(const_cast<flext_base *>(this),any); + break; + } + default: + ERRINTERNAL(); + ok = false; + } + } + else { + post("%s - attribute %s has no get method",thisName(),GetString(tag)); + ok = false; + } + } + else { + error("%s - %s: attribute not found",thisName(),GetString(tag)); + ok = false; + } + return ok; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::GetAttrib(const t_symbol *s,AtomList &a) const +{ + AttrItem *attr = FindAttrib(s,true); + return attr && GetAttrib(s,attr,a); +} + +//! \param tag symbol "get[attribute]" +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::DumpAttrib(const t_symbol *tag,AttrItem *a) const +{ + AtomListStatic<16> la; + bool ret = GetAttrib(tag,a,la); + if(ret) { + ToOutAnything(GetOutAttr(),a->tag,la.Count(),la.Atoms()); + } + return ret; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::DumpAttrib(const t_symbol *attr) const +{ + AttrItem *item = FindAttrib(attr,true); + return item && DumpAttrib(attr,item); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::BangAttrib(const t_symbol *attr,AttrItem *item) +{ + AtomListStatic<16> val; + AttrItem *item2; + if(!item->IsGet()) + item = item->Counterpart(); + if(item) { + item2 = item->Counterpart(); + return item2 && GetAttrib(attr,item,val) && SetAttrib(attr,item2,val); + } + else + return false; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::BangAttrib(const t_symbol *attr) +{ + AttrItem *item = FindAttrib(attr,true); + return item && BangAttrib(attr,item); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::BangAttribAll() +{ + ItemCont *clattrhead = ClAttrs(thisClassId()); + + for(int i = 0; i <= 1; ++i) { + ItemCont *a = i?attrhead:clattrhead; + if(a) { + ItemSet &ai = a->GetInlet(); // \todo need to check for presence of inlet 0? +/* + for(ItemSet::iterator as = ai.begin(); as != ai.end(); ++as) { + for(Item *al = as.data(); al; al = al->nxt) { + AttrItem *a = (AttrItem *)al; + if(a->IsGet() && a->BothExist()) BangAttrib(as.key(),a); + } + } +*/ + for(FLEXT_TEMP_TYPENAME ItemSet::iterator as(ai); as; ++as) { + for(Item *al = as.data(); al; al = al->nxt) { + AttrItem *a = (AttrItem *)al; + if(a->IsGet() && a->BothExist()) BangAttrib(as.key(),a); + } + } + } + } + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::ShowAttrib(AttrItem *a,bool show) const +{ + if(show) a->flags |= AttrItem::afl_shown; + else a->flags &= ~AttrItem::afl_shown; + + // also change counterpart, if present + AttrItem *ca = a->Counterpart(); + if(ca) { + if(show) ca->flags |= AttrItem::afl_shown; + else ca->flags &= ~AttrItem::afl_shown; + } + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::ShowAttrib(const t_symbol *attr,bool show) const +{ + AttrItem *item = FindAttrib(attr,true); + return item && ShowAttrib(item,show); +} + +#include "flpopns.h" + +#endif // __FLEXT_ATTR_CPP + + diff --git a/externals/grill/trunk/flext/source/flattr_ed.cpp b/externals/grill/trunk/flext/source/flattr_ed.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8e9568d75a2611017046181116de089a4aed45b --- /dev/null +++ b/externals/grill/trunk/flext/source/flattr_ed.cpp @@ -0,0 +1,884 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flattr_ed.cpp + \brief Attribute editor (property dialog) for PD +*/ + +#ifndef __FLEXT_ATTR_ED_CPP +#define __FLEXT_ATTR_ED_CPP + +#include "flext.h" + +#include "flpushns.h" + +#if FLEXT_SYS == FLEXT_SYS_PD + +#ifdef _MSC_VER +#pragma warning( disable : 4091 ) +#endif + + +#if defined(FLEXT_ATTRHIDE) || PD_MINOR_VERSION < 37 +#define __FLEXT_WIDGETBEHAVIOR +#endif + +////////////////////////////////////////////////////// +#ifdef __FLEXT_WIDGETBEHAVIOR +// we need non-public headers! +#pragma message("Attention: non-public headers used - binary is bound to a specific version") + +#include <g_canvas.h> + +/* +#ifdef PD_DEVEL_VERSION +#define __FLEXT_CLONEWIDGET +#endif +*/ + +#ifndef __FLEXT_CLONEWIDGET +#include <m_imp.h> +#endif + +#endif +////////////////////////////////////////////////////// + + +#include <string.h> +#include <stdio.h> + + +#ifdef FLEXT_ATTRHIDE +#ifndef __FLEXT_CLONEWIDGET +static t_visfn ori_vis = NULL; +static t_selectfn ori_select = NULL; +#endif +#endif + + +#ifdef FLEXT_ATTRHIDE +#define ST_DISABLED "" +#else +#define ST_DISABLED " -state disabled" +#endif + + +#ifndef FLEXT_NOATTREDIT + +//! generate the script for the property dialog +FLEXT_TEMPLATE +void tclscript() +{ + static bool havecode = false; + if(havecode) return; + else havecode = true; + + sys_vgui(const_cast<char *>( + "proc flext_escatoms {lst} {\n" + "set tmp {}\n" + "foreach a $lst {\n" +// "set a [regsub {\\\\} $a \\\\\\\\]\n" // replace \ with \\ ... must be first + "set a [regsub {\\$} $a \\\\$]\n" // replace $ with \$ +// "set a [regsub {\\{} $a \\\\\\{]\n" // replace { with \{ +// "set a [regsub {\\}} $a \\\\\\}]\n" // replace } with \} +// "set a [regsub {\\ } $a \\\\\\ ]\n" // replace space with \space + "set a [regsub {,} $a \\\\,]\n" // replace , with \, + "set a [regsub {;} $a \\\\\\;]\n" // replace ; with \; + "lappend tmp $a\n" + "}\n" + "return $tmp\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_makevalue {id ix} {\n" + // strip "." from the TK id to make a variable name suffix + "set vid [string trimleft $id .]\n" + + "set var_attr_name [concat [concat var_name_$ix]_$vid ]\n" + "set var_attr_init [concat [concat var_init_$ix]_$vid ]\n" + "set var_attr_val [concat [concat var_val_$ix]_$vid ]\n" + "set var_attr_save [concat [concat var_save_$ix]_$vid ]\n" + "set var_attr_type [concat [concat var_type_$ix]_$vid ]\n" + + "global $var_attr_name $var_attr_init $var_attr_val $var_attr_save $var_attr_type\n" + + "set lst {}\n" + + "if { [expr $$var_attr_type] != 0 } {\n" + // attribute is puttable + + "lappend lst [eval concat $$var_attr_name]\n" + + // process current value + "set tmp [flext_escatoms [eval concat $$var_attr_val]]\n" + "set lst [concat $lst [llength $tmp] $tmp]\n" + + // process init value + "set tmp [flext_escatoms [eval concat $$var_attr_init]]\n" + "set lst [concat $lst [llength $tmp] $tmp]\n" + + "lappend lst [eval concat $$var_attr_save]\n" + "}\n" + + // return list + "return $lst\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_apply {id ix} {\n" + "set lst [flext_makevalue $id $ix]\n" + "set lst [eval concat $lst]\n" // remove curly braces from character escaping + "pd [concat $id attributedialog $lst \\;]\n" + "}\n" + + "proc flext_applyall {id alen} {\n" + // make a list of the attribute values (including save flags) + + "set lst {}\n" + "for {set ix 1} {$ix <= $alen} {incr ix} {\n" + "set lst [concat $lst [flext_makevalue $id $ix]]\n" + "}\n" + "set lst [eval concat $lst]\n" // remove curly braces from character escaping + + "pd [concat $id attributedialog $lst \\;]\n" + "}\n" + + "proc flext_cancel {id} {\n" + "pd [concat $id cancel \\;]\n" + "}\n" + + "proc flext_ok {id alen} {\n" + "flext_applyall $id $alen\n" + "flext_cancel $id\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_help {id} {\n" + "toplevel $id.hw\n" + "wm title $id.hw \"Flext attribute editor help\"\n" + + "frame $id.hw.buttons\n" + "pack $id.hw.buttons -side bottom -fill x -pady 2m\n" + + "text $id.hw.text -relief sunken -bd 2 -yscrollcommand \"$id.hw.scroll set\" -setgrid 1 -width 80 -height 10 -wrap word\n" + "scrollbar $id.hw.scroll -command \"$id.hw.text yview\"\n" + "pack $id.hw.scroll -side right -fill y\n" + "pack $id.hw.text -expand yes -fill both\n" + + "button $id.hw.buttons.ok -text OK -command \"destroy $id.hw\"\n" + "pack $id.hw.buttons.ok -side left -expand 1\n" + "bind $id.hw {<KeyPress-Escape>} \"destroy $id.hw\"\n" + + "$id.hw.text tag configure big -font {Arial 10 bold}\n" + "$id.hw.text configure -font {Arial 8 bold}\n" + "$id.hw.text insert end \"" + "The flext attribute editor lets you query or change attribute values exposed by an external object. \" big \"\n\n" + "Local variable names ($-values) will only be saved as such for init values. " + "Alternatively, # can be used instead of $.\n" + "Ctrl-Button on a text field will open an editor window where text can be entered more comfortably.\n" + "\"\n" + "$id.hw.text configure -state disabled\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_copyval {dst src} {\n" + "global $src $dst\n" + "set $dst [expr $$src]\n" + "}\n" + + "proc flext_textcopy {id idtxt var} {\n" + "global $var\n" + "set txt [eval $idtxt get 0.0 end]\n" + // strip newline characters + "set tmp {}\n" + "foreach t $txt { lappend tmp [string trim $t] }\n" + "set $var $tmp\n" + "destroy $id\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc flext_textzoom {id var title attr edit} {\n" + "global $var\n" + "toplevel $id.w\n" + "wm title $id.w [concat $title \" @\" $attr]\n" +// "wm iconname $w \"text\"\n" +// "positionWindow $id.w\n" + + "frame $id.w.buttons\n" + "pack $id.w.buttons -side bottom -fill x -pady 2m\n" + + "text $id.w.text -relief sunken -bd 2 -yscrollcommand \"$id.w.scroll set\" -setgrid 1 -width 80 -height 20\n" + "scrollbar $id.w.scroll -command \"$id.w.text yview\"\n" + "pack $id.w.scroll -side right -fill y\n" + "pack $id.w.text -expand yes -fill both\n" + + // insert text with newlines + "set txt [split [expr $$var] ,]\n" + "set lines [llength $txt]\n" + "for {set ix 0} {$ix < ($lines-1)} {incr ix} {\n" + "$id.w.text insert end [string trim [lindex $txt $ix] ]\n" + "$id.w.text insert end \" ,\\n\"\n" + "}\n" + "$id.w.text insert end [string trim [lindex $txt end] ]\n" + + "$id.w.text mark set insert 0.0\n" + + "if { $edit != 0 } then {\n" + "button $id.w.buttons.ok -text OK -command \"flext_textcopy $id.w $id.w.text $var\"\n" + "pack $id.w.buttons.ok -side left -expand 1\n" +// "bind $id.w {<Shift-KeyPress-Return>} \"flext_textcopy $id.w $id.w.text $var\"\n" + "} " + "else { $id.w.text configure -state disabled }\n" + + "button $id.w.buttons.cancel -text Cancel -command \"destroy $id.w\"\n" + "pack $id.w.buttons.cancel -side left -expand 1\n" + "bind $id.w {<KeyPress-Escape>} \"destroy $id.w\"\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "proc pdtk_flext_dialog {id title attrlist} {\n" + "set vid [string trimleft $id .]\n" + "set alen [expr [llength $attrlist] / 6 ]\n" + + "toplevel $id\n" + "wm title $id $title\n" + "wm protocol $id WM_DELETE_WINDOW [concat flext_cancel $id]\n" + + "frame $id.frame\n" + "set row 0\n" + + // set grow parameters + "grid columnconfigure $id.frame 0 -weight 1\n" // label + "grid columnconfigure $id.frame {1 4} -weight 3\n" // value entry + "grid columnconfigure $id.frame {2 3} -weight 0\n" // copy buttons + "grid columnconfigure $id.frame 5 -weight 1\n" // apply button + "grid columnconfigure $id.frame {6 7 8} -weight 0\n" // radio buttons + + "grid rowconfigure $id.frame {0 1} -weight 0\n" + + // set column labels + "label $id.frame.label -text {attribute} -font {Helvetica 9 bold}\n" + "label $id.frame.init -text {initial value} -font {Helvetica 9 bold}\n" + "label $id.frame.copy -text {copy} -font {Helvetica 9 bold}\n" + "label $id.frame.val -text {current value} -font {Helvetica 9 bold}\n" + "label $id.frame.apply -text {} -font {Helvetica 9 bold}\n" // why must this be empty? + "foreach {i txt} {0 {don't\rsave} 1 {do\rinit} 2 {always\rsave} } {\n" + "label $id.frame.b$i -text $txt -font {Helvetica 7 bold}\n" + "}\n" + + "grid config $id.frame.label -column 0 -row $row \n" + "grid config $id.frame.init -column 1 -row $row \n" + "grid config $id.frame.copy -column 2 -columnspan 2 -row $row \n" + "grid config $id.frame.val -column 4 -row $row \n" + "grid config $id.frame.apply -column 5 -row $row \n" + "foreach i {0 1 2} { grid config $id.frame.b$i -column [expr $i + 6] -row $row }\n" + "incr row\n" + + // Separator + "frame $id.frame.sep -relief ridge -bd 1 -height 2\n" + "grid config $id.frame.sep -column 0 -columnspan 9 -row $row -pady 2 -sticky {snew}\n" + "incr row\n") + ); + sys_vgui(const_cast<char *>( + "set ix 1\n" + "foreach {an av ai atp asv afl} $attrlist {\n" + "grid rowconfigure $id.frame $row -weight 1\n" + + // get attribute name + "set var_attr_name [concat [concat var_name_$ix]_$vid ]\n" + "global $var_attr_name\n" + "set $var_attr_name $an\n" + + // get attribute init value (list) + "set var_attr_init [concat [concat var_init_$ix]_$vid ]\n" + "global $var_attr_init\n" + "set $var_attr_init $ai\n" + + // get attribute value (list) + "set var_attr_val [concat [concat var_val_$ix]_$vid ]\n" + "global $var_attr_val\n" + "set $var_attr_val $av\n" + + // get save flag + "set var_attr_save [concat [concat var_save_$ix]_$vid ]\n" + "global $var_attr_save\n" + "set $var_attr_save $asv\n" + + // get type flag + "set var_attr_type [concat [concat var_type_$ix]_$vid ]\n" + "global $var_attr_type\n" + "set $var_attr_type $afl\n" + + // add dialog elements to window + + // attribute label + "label $id.frame.label-$ix -text \"$an :\" -font {Helvetica 8 bold}\n" + "grid config $id.frame.label-$ix -column 0 -row $row -padx 5 -sticky {e}\n") + ); + sys_vgui(const_cast<char *>( + "if { $afl != 0 } {\n" + // attribute is puttable + + // entry field for initial value + // entry field for current value + + // choose entry field type + "switch $atp {\n" + "0 - 1 {\n" // int or float + "entry $id.frame.init-$ix -textvariable $var_attr_init" ST_DISABLED "\n" + "entry $id.frame.val-$ix -textvariable $var_attr_val\n" + "}\n" + "2 {\n" // boolean + "checkbutton $id.frame.init-$ix -variable $var_attr_init" ST_DISABLED "\n" + "checkbutton $id.frame.val-$ix -variable $var_attr_val\n" + "}\n" + "3 {\n" // symbol + "entry $id.frame.init-$ix -textvariable $var_attr_init" ST_DISABLED "\n" + "entry $id.frame.val-$ix -textvariable $var_attr_val\n" + "}\n" + "4 - 5 {\n" // list or unknown + "entry $id.frame.init-$ix -textvariable $var_attr_init" ST_DISABLED "\n" + "bind $id.frame.init-$ix {<Control-Button-1>} \" flext_textzoom $id.frame.init-$ix $var_attr_init { $title } $an 1\"\n" + "entry $id.frame.val-$ix -textvariable $var_attr_val\n" + "bind $id.frame.val-$ix {<Control-Button-1>} \" flext_textzoom $id.frame.val-$ix $var_attr_val { $title } $an 1\"\n" + "}\n" + "}\n" + + "grid config $id.frame.init-$ix -column 1 -row $row -padx 5 -sticky {ew}\n" + "grid config $id.frame.val-$ix -column 4 -row $row -padx 5 -sticky {ew}\n" + + // copy buttons + "button $id.frame.b2i-$ix -text {<-} -height 1 -command \" flext_copyval $var_attr_init $var_attr_val \"" ST_DISABLED "\n" + "grid config $id.frame.b2i-$ix -column 2 -row $row -sticky {ew}\n" + "button $id.frame.b2c-$ix -text {->} -height 1 -command \" flext_copyval $var_attr_val $var_attr_init \"\n" + "grid config $id.frame.b2c-$ix -column 3 -row $row -sticky {ew}\n" + + // apply button + "button $id.frame.apply-$ix -text {Apply} -height 1 -command \" flext_apply $id $ix \"\n" + "grid config $id.frame.apply-$ix -column 5 -row $row -sticky {ew}\n" + + // radiobuttons + "foreach {i c} {0 black 1 blue 2 red} {\n" + "radiobutton $id.frame.b$i-$ix -value $i -foreground $c -variable $var_attr_save" ST_DISABLED "\n" + "grid config $id.frame.b$i-$ix -column [expr $i + 6] -row $row\n" + "}\n") + ); + sys_vgui(const_cast<char *>( + "} else {\n" + // attribute is gettable only + + // entry field for current value (read-only) + + // choose display field type + "switch $atp {\n" + "0 - 1 {\n" // int or float + "entry $id.frame.val-$ix -textvariable $var_attr_val -state disabled\n" + "}\n" + "2 {\n" // boolean + "checkbutton $id.frame.val-$ix -variable $var_attr_val -state disabled\n" + "}\n" + "3 {\n" // symbol + "entry $id.frame.val-$ix -textvariable $var_attr_val -state disabled\n" + "}\n" + "4 - 5 {\n" // list or unknown + "entry $id.frame.val-$ix -textvariable $var_attr_val -state disabled\n" + "bind $id.frame.val-$ix {<Control-Button-1>} \" flext_textzoom $id.frame.val-$ix $var_attr_val { $title } $an 0\"\n" + "}\n" + "}\n" + +// "entry $id.fval.val-$ix -textvariable $var_attr_val -state disabled\n" + "grid config $id.frame.val-$ix -column 4 -row $row -padx 5 -sticky {ew}\n" + + "label $id.frame.readonly-$ix -text \"read-only\"\n" + "grid config $id.frame.readonly-$ix -column 6 -columnspan 3 -row $row -padx 5 -sticky {ew}\n" + "}\n" + + // increase counter + "incr ix\n" + "incr row\n" + "}\n" + + // empty space + "grid rowconfigure $id.frame $row -weight 1\n" + "frame $id.frame.dummy\n" + "grid config $id.frame.dummy -column 0 -columnspan 9 -row $row\n" + "incr row\n") + ); + sys_vgui(const_cast<char *>( + // Separator + "frame $id.sep2 -relief ridge -bd 1 -height 2\n" + + // Buttons + "frame $id.buttonframe\n" + + "button $id.buttonframe.cancel -text {Leave} -width 20 -command \" flext_cancel $id \"\n" + "button $id.buttonframe.apply -text {Apply all} -width 20 -command \" flext_applyall $id $alen \"\n" + "button $id.buttonframe.ok -text {Apply & Leave} -width 20 -command \" flext_ok $id $alen \"\n" + "button $id.buttonframe.help -text {Help} -width 10 -command \" flext_help $id \"\n" + + "grid columnconfigure $id.buttonframe {0 1 2 3} -weight 1\n" + "grid config $id.buttonframe.cancel $id.buttonframe.apply $id.buttonframe.ok $id.buttonframe.help -padx 2 -sticky {snew}\n" + +// "scrollbar $id.scroll -command \"$id.frame yview\"\n" + + "pack $id.buttonframe $id.sep2 -pady 2 -expand 0 -side bottom -fill x\n" +// "pack $id.scroll -side right -fill y\n" + "pack $id.frame -expand 1 -side top -fill both\n" + + // Key bindings + "bind $id {<KeyPress-Escape>} \" flext_cancel $id \"\n" + "bind $id {<KeyPress-Return>} \" flext_ok $id $alen \"\n" + "bind $id {<Shift-KeyPress-Return>} \" flext_applyall $id $alen \"\n" + "}\n") + ); +} + +#endif + + +#ifdef __FLEXT_WIDGETBEHAVIOR +static t_widgetbehavior widgetbehavior; +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::SetGfx(t_classid c) +{ + t_class *cl = getClass(c); + // widgetbehavior struct MUST be resident... (static is just ok here) + +#ifdef __FLEXT_WIDGETBEHAVIOR +#ifndef __FLEXT_CLONEWIDGET + widgetbehavior.w_visfn = cl->c_wb->w_visfn; + widgetbehavior.w_selectfn = cl->c_wb->w_selectfn; + widgetbehavior.w_getrectfn = cl->c_wb->w_getrectfn; + widgetbehavior.w_displacefn = cl->c_wb->w_displacefn; + widgetbehavior.w_activatefn = cl->c_wb->w_activatefn; + widgetbehavior.w_deletefn = cl->c_wb->w_deletefn; + widgetbehavior.w_selectfn = cl->c_wb->w_selectfn; + widgetbehavior.w_clickfn = cl->c_wb->w_clickfn; +#else + widgetbehavior.w_visfn = text_widgetbehavior.w_visfn; + widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn; + widgetbehavior.w_getrectfn = text_widgetbehavior.w_getrectfn; + widgetbehavior.w_displacefn = text_widgetbehavior.w_displacefn; + widgetbehavior.w_activatefn = text_widgetbehavior.w_activatefn; + widgetbehavior.w_deletefn = text_widgetbehavior.w_deletefn; + widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn; + widgetbehavior.w_clickfn = text_widgetbehavior.w_clickfn; +#endif +#endif + +#ifdef FLEXT_ATTRHIDE + +#ifndef __FLEXT_CLONEWIDGET + ori_vis = widgetbehavior.w_visfn; + ori_select = widgetbehavior.w_selectfn; +#endif + widgetbehavior.w_visfn = (t_visfn)cb_GfxVis; + widgetbehavior.w_selectfn = (t_selectfn)cb_GfxSelect; + +#if PD_MINOR_VERSION >= 37 + class_setsavefn(cl,(t_savefn)cb_GfxSave); +#else + widgetbehavior.w_savefn = (t_savefn)cb_GfxSave; +#endif + +#endif // FLEXT_ATTRHIDE + + +#ifndef FLEXT_NOATTREDIT + +#if PD_MINOR_VERSION >= 37 + class_setpropertiesfn(cl,(t_propertiesfn)cb_GfxProperties); +#else + widgetbehavior.w_propertiesfn = (t_propertiesfn)cb_GfxProperties; +#endif + + FLEXT_TEMPINST(tclscript)(); +#endif // FLEXT_NOATTREDIT + +#ifdef __FLEXT_WIDGETBEHAVIOR + class_setwidget(cl, &widgetbehavior); +#endif +} + + +#ifndef FLEXT_NOATTREDIT + +FLEXT_TEMPLATE +size_t escapeit(char *dst,size_t maxlen,const char *src) +{ + char *d; + for(d = dst; *src && (d-dst) < (int)maxlen; ++src) { + if(*src == '%') + *(d++) = '%',*(d++) = '%'; + else + *(d++) = *src; + } + *d = 0; + return d-dst; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_GfxProperties(flext_hdr *c, t_glist *) +{ + flext_base *th = thisObject(c); + char buf[1000]; + + // beginning of proc + sys_vgui(const_cast<char *>("proc pdtk_flext_dialog_%p {title} {\n"),th); + + sys_vgui(const_cast<char *>("pdtk_flext_dialog $title {\n")); + + // add title + t_text *x = (t_text *)c; + FLEXT_ASSERT(x->te_binbuf); + + int argc = binbuf_getnatom(x->te_binbuf); + t_atom *argv = binbuf_getvec(x->te_binbuf); + + PrintList(argc,argv,buf,sizeof(buf)); + sys_vgui(const_cast<char *>("%s } {\n"),buf); + + AtomListStatic<32> la; + th->ListAttrib(la); + int cnt = la.Count(); + + for(int i = 0; i < cnt; ++i) { + const t_symbol *sym = GetSymbol(la[i]); + + // get attribute + AttrItem *gattr = th->FindAttrib(sym,true); + // get puttable attribute + AttrItem *pattr = gattr?gattr->Counterpart():th->FindAttrib(sym,false); + + // get flags + int sv; + const AtomList *initdata; + const AttrData *a = th->attrdata->find(sym); +// AttrDataCont::iterator it = th->attrdata->find(sym); +// if(it == th->attrdata->end()) + if(!a) + sv = 0,initdata = NULL; + else { +// const AttrData &a = *it.data(); + if(a->IsSaved()) + sv = 2; + else if(a->IsInit()) + sv = 1; + else + sv = 0; + initdata = a->IsInitValue()?&a->GetInitValue():NULL; + } + + // get attribute type + int tp; + bool list; + switch((gattr?gattr:pattr)->argtp) { + case a_int: tp = 0; list = false; break; + case a_float: tp = 1; list = false; break; + case a_bool: tp = 2; list = false; break; + case a_symbol: tp = 3; list = true; break; + case a_list: + case a_LIST: tp = 4; list = true; break; + default: + tp = 5; list = true; + FLEXT_ASSERT(false); + } + + sys_vgui(const_cast<char *>(list?"%s {":"%s "),GetString(sym)); + + AtomListStatic<32> lv; + if(gattr) { // gettable attribute is present + // Retrieve attribute value + th->GetAttrib(sym,gattr,lv); + + char *b = buf; *b = 0; + for(int i = 0; i < lv.Count(); ++i) { + char tmp[100]; + PrintAtom(lv[i],tmp,sizeof tmp); + b += FLEXT_TEMPINST(escapeit)(b,sizeof(buf)+buf-b,tmp); + if(i < lv.Count()-1) { *(b++) = ' '; *b = 0; } + } + sys_vgui(const_cast<char *>("%s"),buf); + } + else + sys_vgui(const_cast<char *>("{}")); + + sys_vgui(const_cast<char *>(list?"} {":" ")); + + if(pattr) { + // if there is initialization data take this, otherwise take the current data + const AtomList &lp = initdata?*initdata:static_cast<const AtomList &>(lv); + + char *b = buf; *b = 0; + for(int i = 0; i < lp.Count(); ++i) { + char tmp[256]; + PrintAtom(lp[i],tmp,sizeof(tmp)); + b += FLEXT_TEMPINST(escapeit)(b,sizeof(buf)+buf-b,tmp); + if(i < lp.Count()-1) { *(b++) = ' '; *b = 0; } + } + sys_vgui(const_cast<char *>("%s"),buf); + } + else + sys_vgui(const_cast<char *>("{}")); + + + sys_vgui(const_cast<char *>(list?"} %i %i %i \n":" %i %i %i \n"),tp,sv,pattr?(pattr->BothExist()?2:1):0); + } + + sys_vgui(const_cast<char *>(" } }\n")); // end of proc + + STD::sprintf(buf,"pdtk_flext_dialog_%p %%s\n",th); + gfxstub_new((t_pd *)th->thisHdr(), th->thisHdr(),buf); + + //! \todo delete proc in TCL space +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::cb_AttrDialog(flext_base *th,int argc,const t_atom *argv) +{ + for(int i = 0; i < argc; ) { + FLEXT_ASSERT(IsSymbol(argv[i])); + + // get name + const t_symbol *aname = GetSymbol(argv[i]); + i++; + + // get current value + FLEXT_ASSERT(CanbeInt(argv[i])); + int ccnt,coffs; + ccnt = GetAInt(argv[i]); + coffs = ++i; + i += ccnt; + + // get init value + FLEXT_ASSERT(CanbeInt(argv[i])); + int icnt,ioffs; + icnt = GetAInt(argv[i]); + ioffs = ++i; + i += icnt; + + FLEXT_ASSERT(i < argc); + int sv = GetAInt(argv[i]); + ++i; + + // find puttable attribute + AttrItem *attr = th->FindAttrib(aname,false); + if(attr) { + bool ret = th->SetAttrib(aname,attr,ccnt,argv+coffs); + FLEXT_ASSERT(ret); + + AttrData *a = th->attrdata->find(aname); + if(sv >= 1) { + // if data not present create it + if(!a) { + AttrData *old = th->attrdata->insert(aname,a = new AttrData); + FLEXT_ASSERT(!old); + } + + a->SetSave(sv == 2); + a->SetInit(true); + a->SetInitValue(icnt,argv+ioffs); + } + else { + if(a) { + // if data is present reset flags + a->SetSave(false); + a->SetInit(false); + + // let init data as is + } + } + } + else { + post("%s - Attribute %s can't be set",th->thisName(),GetString(aname)); + } + } + return true; +} + +#endif // FLEXT_NOATTREDIT + + +#ifdef FLEXT_ATTRHIDE + +template<typename=void> +void BinbufAdd(t_binbuf *b,const t_atom &at,bool transdoll) +{ + if(transdoll && at.a_type == A_DOLLAR) { + char tbuf[MAXPDSTRING]; + sprintf(tbuf, "$%d", at.a_w.w_index); + binbuf_addv(b,"s",flext::MakeSymbol(tbuf)); + } + else if(transdoll && at.a_type == A_DOLLSYM) { + char tbuf[MAXPDSTRING]; + sprintf(tbuf, "$%s", at.a_w.w_symbol->s_name); + binbuf_addv(b,"s",flext::MakeSymbol(tbuf)); + } + else + binbuf_add(b,1,const_cast<t_atom *>(&at)); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::BinbufArgs(t_binbuf *b,t_binbuf *args,bool withname,bool transdoll) +{ + int argc = binbuf_getnatom(args); + t_atom *argv = binbuf_getvec(args); + int i,cnt = CheckAttrib(argc,argv); + // process the creation arguments + for(i = withname?0:1; i < cnt; ++i) BinbufAdd(b,argv[i],transdoll); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::BinbufAttr(t_binbuf *b,bool transdoll) +{ + // process the attributes + AtomListStatic<32> la,lv; + ListAttrib(la); + int i,cnt = la.Count(); + + for(i = 0; i < cnt; ++i) { + const t_symbol *sym = GetSymbol(la[i]); + const AtomList *lref = NULL; + + AttrData *a = attrdata->find(sym); + if(a) { + if(a->IsInit() && a->IsInitValue()) { + lref = &a->GetInitValue(); + +#if 0 ///////////////////////////////////////////////////////////// + // check for $-parameters + lv = lref->Count(); + for(int j = 0; j < lref->Count(); ++j) { + const char *s = IsSymbol((*lref)[j])?GetString((*lref)[j]):NULL; + if(s && s[0] == '$') { // TODO: More refined checking? + // prepend a "\" + char tmp[256]; *tmp = '\\'; + strcpy(tmp+1,s); + SetString(lv[j],tmp); + } + else + lv[i] = (*lref)[j]; + } + + lref = &lv; +#endif ///////////////////////////////////////////////////////////// + } +// else if(a.IsSaved()) { + else if(a->IsSaved()) { + AttrItem *attr = FindAttrib(sym,true); + + // attribute must be gettable (so that the data can be retrieved) and puttable (so that the data can be inited) + if(attr && attr->BothExist()) { + GetAttrib(sym,attr,lv); + lref = &lv; + } + } + } + + if(lref) { + char attrname[256]; *attrname= '@'; + // store name + strcpy(attrname+1,GetString(sym)); + binbuf_addv(b,"s",MakeSymbol(attrname)); + + // store value + for(int j = 0; j < lref->Count(); ++j) BinbufAdd(b,(*lref)[j],transdoll); + } + } +} + +//! Strip the attributes off the object command line +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_GfxVis(flext_hdr *c, t_glist *gl, int vis) +{ + if(!gl->gl_isgraph || gl->gl_havewindow) { + // show object if it's not inside a GOP + + flext_base *th = thisObject(c); + t_text *x = (t_text *)c; + FLEXT_ASSERT(x->te_binbuf); + + t_binbuf *b = binbuf_new(); + th->BinbufArgs(b,x->te_binbuf,true,false); + + // delete old object box text + binbuf_free(x->te_binbuf); + // set new one + x->te_binbuf = b; + + t_rtext *rt = glist_findrtext(gl,x); + rtext_retext(rt); + + // now display the changed text with the normal drawing function + #ifdef __FLEXT_CLONEWIDGET + text_widgetbehavior.w_visfn((t_gobj *)c,gl,vis); + #else + ori_vis((t_gobj *)c,gl,vis); + #endif + } + // else don't show +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_GfxSelect(flext_hdr *c,t_glist *gl,int state) +{ + t_text *x = (t_text *)c; + flext_base *th = thisObject(c); + + if(!gl->gl_isgraph || gl->gl_havewindow) { + if(state || !gl->gl_editor->e_textdirty) { + // change text only on selection + // OR if text has _not_ been changed + // -> since object will not be recreated we have to get rid + // of the attribute text + + FLEXT_ASSERT(x->te_binbuf); + + t_binbuf *b = binbuf_new(); + th->BinbufArgs(b,x->te_binbuf,true,false); + if(state) th->BinbufAttr(b,false); + + // delete old object box text + binbuf_free(x->te_binbuf); + // set new one + x->te_binbuf = b; + + t_rtext *rt = glist_findrtext(gl,x); + rtext_retext(rt); + + // fix lines + canvas_fixlinesfor(gl,x); + } + + // call original function + #ifdef __FLEXT_CLONEWIDGET + text_widgetbehavior.w_selectfn((t_gobj *)c,gl,state); + #else + ori_select((t_gobj *)c,gl,state); + #endif + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_GfxSave(flext_hdr *c, t_binbuf *b) +{ + flext_base *th = thisObject(c); + t_text *t = (t_text *)c; + binbuf_addv(b, "ssiis", gensym("#X"),gensym("obj"), t->te_xpix, t->te_ypix,MakeSymbol(th->thisName())); + + // process the object arguments + th->BinbufArgs(b,t->te_binbuf,false,true); + // process the attributes + th->BinbufAttr(b,true); + // add end sign + binbuf_addv(b, ";"); +} + +#endif // FLEXT_ATTRHIDE + +#endif // FLEXT_SYS_PD + +#include "flpopns.h" + +#endif // __FLEXT_ATTR_ED_CPP + + diff --git a/externals/grill/trunk/flext/source/flbase.cpp b/externals/grill/trunk/flext/source/flbase.cpp new file mode 100644 index 0000000000000000000000000000000000000000..beda80ae06f324b735d0b68ad1e172398587d484 --- /dev/null +++ b/externals/grill/trunk/flext/source/flbase.cpp @@ -0,0 +1,215 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flbase.cpp + \brief Implementation of the internal flext base classes. + + \remark This is all derived from GEM by Mark Danks +*/ + +#ifndef __FLEXT_BASE_CPP +#define __FLEXT_BASE_CPP + +#include "flext.h" + +#include "flinternal.h" +#include <cstring> +#include <cctype> +#include <cstdlib> + +#if FLEXT_SYS == FLEXT_SYS_PD +#ifdef _MSC_VER + #pragma warning (push) + #pragma warning (disable:4091) +#endif +// for canvas_realizedollar (should be non-critical) +#include <g_canvas.h> +#ifdef _MSC_VER + #pragma warning (pop) +#endif +#endif + +#include "flpushns.h" + +///////////////////////////////////////////////////////// +// +// flext_obj +// +///////////////////////////////////////////////////////// + +FLEXT_TEMPIMPL(flext_hdr *FLEXT_CLASSDEF(flext_obj))::m_holder = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext_obj))::m_holdname = NULL; +FLEXT_TEMPIMPL(FLEXT_TEMPINST(flext_class) *FLEXT_CLASSDEF(flext_obj))::m_holdclass = NULL; +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext_obj))::m_holdaargc = 0; +FLEXT_TEMPIMPL(const t_atom *FLEXT_CLASSDEF(flext_obj))::m_holdaargv = NULL; +//FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::process_attributes = false; + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::initing = false; +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::exiting = false; +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::init_ok; + +//FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::ProcessAttributes(bool attr) { process_attributes = attr; } + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext_obj))::sym__shP = NULL; +#endif + +///////////////////////////////////////////////////////// +// Constructor +// +///////////////////////////////////////////////////////// +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_obj))::FLEXT_CLASSDEF(flext_obj)() + : x_obj(m_holder) + , clss(m_holdclass) + , m_name(m_holdname) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + m_canvas = canvas_getcurrent(); +#elif FLEXT_SYS == FLEXT_SYS_MAX + m_canvas = (t_patcher *)sym__shP->s_thing; + x_obj->curinlet = 0; +#endif +} + +///////////////////////////////////////////////////////// +// Destructor +// +///////////////////////////////////////////////////////// +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_obj))::~FLEXT_CLASSDEF(flext_obj)() +{ + x_obj = NULL; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::__setup__(t_classid) +{ +#if FLEXT_SYS == FLEXT_SYS_MAX + sym__shP = MakeSymbol("#P"); +#endif + flext::Setup(); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::Init() { return true; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::Finalize() { return true; } +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::Exit() {} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::DefineHelp(t_classid c,const char *ref,const char *dir,bool addtilde) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + char tmp[256]; + if(dir && *dir) { + strcpy(tmp,dir); + char *last = tmp+strlen(tmp)-1; + if(*last != '/') strcat(last,"/"); + strcat(last,ref); + } + else + strcpy(tmp,ref); + if(addtilde) strcat(tmp,"~"); + + ::class_sethelpsymbol(getClass(c),gensym(const_cast<char *>(tmp))); +#else + // no solution for Max/MSP yet +#endif +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::GetParamSym(t_atom &dst,const t_symbol *sym,t_canvas *c) +{ +#if FLEXT_SYS == FLEXT_SYS_PD && defined(PD_MINOR_VERSION) && PD_MINOR_VERSION >= 37 + if(!c) c = canvas_getcurrent(); + + const char *s = GetString(sym); + if((s[0] == '$' || s[0] == '#') && isdigit(s[1])) { + const t_symbol *res; + // patcher parameter detected... get value! + if(s[0] != '$') { + char tmp[MAXPDSTRING]; + strcpy(tmp,s); + tmp[0] = '$'; + res = canvas_realizedollar(c,const_cast<t_symbol *>(MakeSymbol(tmp))); + } + else + res = canvas_realizedollar(c,const_cast<t_symbol *>(sym)); + + // check for number + const char *c = GetString(res); + while(*c && (isdigit(*c) || *c == '.')) ++c; + + if(!*c) + SetFloat(dst,(float)atof(GetString(res))); + else + SetSymbol(dst,res); + return true; + } + else +#else +// #pragma message("Not implemented") +#endif + SetSymbol(dst,sym); + return true; +} + + +#if FLEXT_SYS == FLEXT_SYS_PD +// this declaration is missing in m_pd.h (0.37-0 and -1) +// but it is there in 0.37-2 (but how to tell which micro-version?) +extern "C" +#ifdef _MSC_VER +__declspec(dllimport) +#endif +void canvas_getargs(int *argcp, t_atom **argvp); +#endif + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::GetCanvasArgs(AtomList &args) const +{ +#if FLEXT_SYS == FLEXT_SYS_PD + int argc; + t_atom *argv; + canvas_getargs(&argc,&argv); + args(argc,argv); +#else +// #pragma message("Not implemented") + args(0); +#endif +} + + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPLATE short patcher_myvol(t_patcher *x) +{ +#ifndef MM_UNIFIED // Max5 check... we don't know what to do yet + t_box *w; + if(x->p_vol) + return x->p_vol; + else if((w = (t_box *)x->p_vnewobj) != NULL) + return FLEXT_TEMPINST(patcher_myvol)(w->b_patcher); + else +#endif + return 0; +} +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::GetCanvasDir(char *buf,size_t bufsz) const +{ +#if FLEXT_SYS == FLEXT_SYS_PD + const char *c = GetString(canvas_getdir(thisCanvas())); + strncpy(buf,c,bufsz); +#elif FLEXT_SYS == FLEXT_SYS_MAX + short path = FLEXT_TEMPINST(patcher_myvol)(thisCanvas()); + // \TODO dangerous!! no check for path length (got to be long enough... like 1024 chars) + path_topathname(path,NULL,buf); +#else +#error Not implemented +#endif +} + +#include "flpopns.h" + +#endif // __FLEXT_BASE_CPP + + diff --git a/externals/grill/trunk/flext/source/flbase.h b/externals/grill/trunk/flext/source/flbase.h new file mode 100644 index 0000000000000000000000000000000000000000..448c035aa010f36be78b1c331f2ff550cc6c9f8b --- /dev/null +++ b/externals/grill/trunk/flext/source/flbase.h @@ -0,0 +1,624 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flbase.h + \brief Internal flext base classes + + \remark This uses some ideas of GEM invented by Mark Danks +*/ + +#ifndef __FLEXT_BASE_H +#define __FLEXT_BASE_H + +#include "flstdc.h" +#include "flsupport.h" +#include <map> + +#include "flpushns.h" + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj); + +typedef FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_obj)) flext_obj; + +// ---------------------------------------------------------------------------- +/*! \brief The obligatory PD or Max/MSP object header + \internal + + This is in a separate struct to assure that obj is the very first thing. + If it were the first thing in flext_obj, then there could be problems with + the virtual table of the C++ class. +*/ +// ---------------------------------------------------------------------------- + +struct FLEXT_SHARE flext_hdr +{ + /*! \defgroup FLEXT_OBJHEADER Actual PD or Max/MSP object + \internal + @{ + */ + + /*! \brief The obligatory object header + \note MUST reside at memory offset 0 (no virtual table possible) + */ + t_sigobj obj; + +#if FLEXT_SYS == FLEXT_SYS_PD + //! PD only: float signal holder for pd + float defsig; +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX + //! Max/MSP only: current inlet used by proxy objects + long curinlet; +#endif + + /*! \brief This points to the actual polymorphic C++ class + */ + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_obj)) *data; + + //! @} FLEXT_OBJHEADER +}; + + +FLEXT_TEMPLATE class flext_class; + +typedef std::map<const t_symbol *,FLEXT_TEMPINST(flext_class) *> LibMap; + +class flext_library; + +// ---------------------------------------------------------------------------- +/*! \brief The mother of base classes for all flext external objects + + Each extern which is written in C++ needs to use the #defines at the + end of this header file. + + The define + + FLEXT_HEADER(NEW_CLASS, PARENT_CLASS) + + should be somewhere in your header file. + One of the defines like + + FLEXT_NEW(NEW_CLASS) + or + FLEXT_NEW_2(NEW_CLASS, float, float) + + should be the first thing in your implementation file. + NEW_CLASS is the name of your class and PARENT_CLASS is the + parent of your class. +*/ +// ---------------------------------------------------------------------------- + +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj): + public flext +{ + public: + +// --- creation ------------------------------------------------------- + + /*! \defgroup FLEXT_OBJ_CREATION Object creation/destruction functionality + @{ + */ + + //! Constructor + FLEXT_CLASSDEF(flext_obj)(); + + //! Destructor + virtual ~FLEXT_CLASSDEF(flext_obj)(); + + /*! \brief Signal a construction problem + \note This should only be used in the constructor. Object creation will be aborted. + */ + static void InitProblem() { init_ok = false; } + + /*! \brief Enable/disable attribute procession (default = false) + \note Use that in the static class setup function (also library setup function) + */ +// static void ProcessAttributes(bool attr); //{ process_attributes = attr; } + + //! Virtual function called at creation time (but after the constructor) + // this also guarantees that there are no instances of flext_obj + virtual bool Init(); + + //! Virtual function called after Init() has succeeded + virtual bool Finalize(); + + //! Virtual function called at destruction (before the destructor) + virtual void Exit(); + + //! @} FLEXT_OBJ_CREATION + +// --- info ------------------------------------------------------- + + /*! \defgroup FLEXT_OBJ_INFO Get various information + @{ + */ + + //! Get the object's canvas + t_canvas *thisCanvas() const { return m_canvas; } + + //! Get the PD or Max/MSP object + t_sigobj *thisHdr() { FLEXT_ASSERT(x_obj); return &x_obj->obj; } + const t_sigobj *thisHdr() const { FLEXT_ASSERT(x_obj); return &x_obj->obj; } + //! Get the class name (as a string) + const char *thisName() const { return GetString(m_name); } + //! Get the class name (as a symbol) + const t_symbol *thisNameSym() const { return m_name; } + //! Get the class pointer + t_class *thisClass() const; + + //! Typedef for unique class identifier + typedef FLEXT_TEMPINST(flext_class) *t_classid; + + //! Get unique id for object class + t_classid thisClassId() const { return clss; } + + //! Get class pointer from class id + static t_class *getClass(t_classid id); + + static bool HasAttributes(t_classid id); + static bool IsDSP(t_classid id); + static bool HasDSPIn(t_classid id); + static bool IsLib(t_classid id); + + bool HasAttributes() const; + bool IsLib() const; + bool IsDSP() const; + bool HasDSPIn() const; + +#if FLEXT_SYS == FLEXT_SYS_MAX + // under Max/MSP it could be necessary to activate DSP also for message objects + // namely for those coexisting with DSP objects in a library + bool NeedDSP() const; +#endif + + //! @} FLEXT_OBJ_INFO + +// --- help ------------------------------------------------------- + + /*! \defgroup FLEXT_OBJ_HELP Help/assistance functionality + \remark This is still PD only + @{ + */ + + /*! Define the help reference symbol for a class + \internal + */ + static void DefineHelp(t_classid c,const char *ref,const char *dir = NULL,bool addtilde = false); + + //! Define the help reference symbol for a class + void DefineHelp(const char *ref,const char *dir = NULL,bool addtilde = false) { DefineHelp(thisClassId(),ref,dir,addtilde); } + + //! @} FLEXT_OBJ_HELP + + +// --- internal stuff ------------------------------------------------------- + + /*! \defgroup FLEXT_OBJ_INTERNAL Internal stuff + \internal + @{ + */ + + protected: + + //! backpointer to object header + mutable flext_hdr *x_obj; + + //! pointer to flext class definition + FLEXT_TEMPINST(flext_class) *clss; + +// static bool process_attributes; + +#if FLEXT_SYS == FLEXT_SYS_MAX + t_critical lock; + void Lock() { critical_enter(lock); } + void Unlock() { critical_exit(lock); } + static void SysLock() { critical_enter(0); } + static void SysUnlock() { critical_exit(0); } +#elif FLEXT_SYS == FLEXT_SYS_PD + void Lock() {} + void Unlock() {} + static void SysLock() {} + static void SysUnlock() {} +#else + #error +#endif + + class Locker + { + public: + Locker(flext_obj *o = NULL): obj(o) { if(obj) obj->Lock(); else SysLock(); } + Locker(flext_hdr *h): obj(h->data) { FLEXT_ASSERT(obj); obj->Lock(); } + ~Locker() { if(obj) obj->Unlock(); else SysUnlock(); } + protected: + flext_obj *obj; + }; + + private: + + //! The canvas (patcher) that the object is in + mutable t_canvas *m_canvas; + + //! Flag for successful object construction + static bool init_ok; + + // flags for init and exit procedure; + static bool initing; + static bool exiting; + + public: + + //! Creation callback + static void __setup__(t_classid); + + /*! \brief This is a temporary holder + \warning don't touch it! + */ + static flext_hdr *m_holder; + //! Hold object's class during construction + static FLEXT_TEMPINST(flext_class) *m_holdclass; + //! Hold object's name during construction + static const t_symbol *m_holdname; + + //! Holders for attribute procession flag + static int m_holdaargc; + static const t_atom *m_holdaargv; + + /*! The object's name in the patcher + \note objects of the same class can have various alias names! + */ + const t_symbol *m_name; + + /*! Return true if in object initialization phase + true when in constructor or Init, false when in Finalize + */ + static bool Initing() { return initing; } + + //! Return true if in object destruction phase (Exit or destructor) + static bool Exiting() { return exiting; } + + // Definitions for library objects + static void lib_init(const char *name,void setupfun()); + static void obj_add(bool lib,bool dsp,bool noi,bool attr,const char *idname,const char *names,void setupfun(t_classid),FLEXT_CLASSDEF(flext_obj) *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...); + +#if FLEXT_SYS == FLEXT_SYS_MAX + static flext_hdr *obj_new(const t_symbol *s,short argc,t_atom *argv); +#else + static flext_hdr *obj_new(const t_symbol *s,int argc,t_atom *argv); +#endif + static void obj_free(flext_hdr *o); + + //! Convert $0 or #0 symbol into appropriate value + static bool GetParamSym(t_atom &dst,const t_symbol *s,t_canvas *c); + + //! Get the canvas arguments + void GetCanvasArgs(AtomList &args) const; + + //! Get the canvas/patcher directory + void GetCanvasDir(char *buf,size_t bufsz) const; + + protected: + + // Current library class + static flext_library *curlib; + + // static initialization (with constructor) doesn't work for Codewarrior + static LibMap *libnames; + + static FLEXT_TEMPINST(flext_class) *FindName(const t_symbol *s,FLEXT_TEMPINST(flext_class) *o = NULL); + +#if FLEXT_SYS == FLEXT_SYS_PD + static t_class *buf_class; + static void cb_buffer_dsp(void *c,t_signal **sp); +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX + static const t_symbol *sym__shP; +#endif + + //! @} FLEXT_OBJ_INTERNAL +}; + + +// max. 4 creation args (see the following macros) +#define FLEXT_MAXNEWARGS 4 + +// max. 5 method args (see the following macros) +#define FLEXT_MAXMETHARGS 5 + +// prefixes for the macro generated handler functions +#define FLEXT_CALL_PRE(F) flext_c_##F +#define FLEXT_THR_PRE(F) flext_t_##F +#define FLEXT_GET_PRE(F) flext_g_##F +#define FLEXT_SET_PRE(F) flext_s_##F + + +#ifndef FLEXT_ATTRIBUTES +/*! \brief Switch for global attribute processing + \note Should be set to 1 or 0 (or not be defined) + \ingroup FLEXT_DEFS +*/ +#define FLEXT_ATTRIBUTES \ +\ +0 + + +#elif FLEXT_ATTRIBUTES != 0 && FLEXT_ATTRIBUTES != 1 +#error "FLEXT_ATTRIBUTES must be 0 or 1" +#endif + +// ---------------------------------------- +// These should be used in the header +// ---------------------------------------- + + +#define FLEXT_REALHDR(NEW_CLASS, PARENT_CLASS) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { delete hdr->data; } \ +static void __setup__(t_classid classid) { thisParent::__setup__(classid); } + + +#define FLEXT_REALHDR_S(NEW_CLASS, PARENT_CLASS,SETUPFUN) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { delete hdr->data; } \ +static void __setup__(t_classid classid) { \ + thisParent::__setup__(classid); \ + thisType::SETUPFUN(classid); \ +} + +#define FLEXT_REALHDR_T(NEW_CLASS, PARENT_CLASS) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +typedef typename thisParent::t_classid t_classid; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { delete hdr->data; } \ +static void __setup__(t_classid classid) { thisParent::__setup__(classid); } + + +#define FLEXT_REALHDR_TS(NEW_CLASS, PARENT_CLASS,SETUPFUN) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +typedef typename thisParent::t_classid t_classid; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { delete hdr->data; } \ +static void __setup__(t_classid classid) { \ + thisParent::__setup__(classid); \ + thisType::SETUPFUN(classid); \ +} + + +// generate name of dsp/non-dsp setup function +#if defined(FLEXT_USE_HEX_SETUP_NAME) && defined(FLEXT_SYS_PD) + #define FLEXT_STPF_0(NAME) setup_##NAME + #define FLEXT_STPF_1(NAME) setup_##NAME +#elif FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + #define FLEXT_STPF_0(NAME) NAME##_setup + #define FLEXT_STPF_1(NAME) NAME##_tilde_setup +#else +#error Platform not supported +#endif + +#define FLEXT_STPF_(DSP) FLEXT_STPF_##DSP +#define FLEXT_STPF(NAME,DSP) FLEXT_STPF_(DSP)(NAME) + + +// -------------------------------------------------------------------------------------- + + +// used in library setup functions to register the individual objects in the library +#define REAL_SETUP(cl,DSP) extern void FLEXT_STPF(cl,DSP)(); FLEXT_STPF(cl,DSP)(); + +#ifdef FLEXT_USE_NAMESPACE + #define _FLEXT_REAL_SETUP_NAME(NAME) ::##NAME##_setup +#else + #define _FLEXT_REAL_SETUP_NAME(NAME) NAME##_setup +#endif + +// specify that to define the library itself +#if FLEXT_SYS == FLEXT_SYS_PD +# define REAL_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT void _FLEXT_REAL_SETUP_NAME(NAME)() { flext_obj::lib_init(#NAME,SETUPFUN); } +#elif FLEXT_SYS == FLEXT_SYS_MAX +# define REAL_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT int main() { flext_obj::lib_init(#NAME,SETUPFUN); return 0; } +#else +# error Platform not supported +#endif + + +// -------------------------------------------------- + + +#define FLEXT_EXP_0 extern "C" FLEXT_EXT +#define FLEXT_EXP_1 +#define FLEXT_EXP(LIB) FLEXT_EXP_##LIB + +#if FLEXT_SYS == FLEXT_SYS_PD +#define FLEXT_OBJ_SETUP_0(NEW_CLASS,DSP) +#elif FLEXT_SYS == FLEXT_SYS_MAX +#define FLEXT_OBJ_SETUP_0(NEW_CLASS,DSP) extern "C" FLEXT_EXT int main() { FLEXT_STPF(NEW_CLASS,DSP)(); return 0; } +#else +#error not implemented +#endif + +#define FLEXT_OBJ_SETUP_1(NEW_CLASS,DSP) + +#define FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) FLEXT_OBJ_SETUP_##LIB(NEW_CLASS,DSP) + + + +// ---------------------------------------- +// These definitions are used below +// ---------------------------------------- + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + // maybe that's not necessary + #define FLEXTTPN_NULL A_NULL + #if FLEXT_SYS == FLEXT_SYS_PD + #define FLEXTTPN_PTR A_POINTER + #else + #define FLEXTTPN_INT A_INT + #define FLEXTTPN_DEFINT A_DEFINT + #endif + #define FLEXTTPN_FLOAT A_FLOAT + #define FLEXTTPN_DEFFLOAT A_DEFFLOAT + #define FLEXTTPN_SYM A_SYMBOL + #define FLEXTTPN_DEFSYM A_DEFSYMBOL + #define FLEXTTPN_VAR A_GIMME +#else + #define FLEXTTPN_NULL 0 + #define FLEXTTPN_PTR 1 + #define FLEXTTPN_INT 2 + #define FLEXTTPN_FLOAT 3 + #define FLEXTTPN_SYM 4 + #define FLEXTTPN_VAR 5 + #define FLEXTTPN_DEFINT 6 + #define FLEXTTPN_DEFFLOAT 7 + #define FLEXTTPN_DEFSYM 8 +#endif + +// Shortcuts for PD/Max type arguments +#define FLEXTTYPE_void FLEXTTPN_NULL +#define CALLBTYPE_void void +#define FLEXTTYPE_float FLEXTTPN_FLOAT +#define FLEXTTYPE_float0 FLEXTTPN_DEFFLOAT +#define CALLBTYPE_float float +#define FLEXTTYPE_t_float FLEXTTPN_FLOAT +#define CALLBTYPE_t_float t_float + +#if FLEXT_SYS == FLEXT_SYS_PD +#define FLEXTTYPE_int FLEXTTPN_FLOAT +#define FLEXTTYPE_int0 FLEXTTPN_DEFFLOAT +#define CALLBTYPE_int float +#define FLEXTTYPE_bool FLEXTTPN_FLOAT +#define FLEXTTYPE_bool0 FLEXTTPN_DEFFLOAT +#define CALLBTYPE_bool float +#elif FLEXT_SYS == FLEXT_SYS_MAX +#define FLEXTTYPE_int FLEXTTPN_INT +#define FLEXTTYPE_int0 FLEXTTPN_DEFINT +#define CALLBTYPE_int int +#define FLEXTTYPE_bool FLEXTTPN_INT +#define FLEXTTYPE_bool0 FLEXTTPN_DEFINT +#define CALLBTYPE_bool int +#else +#error Platform not supported +#endif + +#define FLEXTTYPE_t_symptr FLEXTTPN_SYM +#define FLEXTTYPE_t_symptr0 FLEXTTPN_DEFSYM +#define CALLBTYPE_t_symptr t_symptr +#define FLEXTTYPE_t_symtype FLEXTTYPE_t_symptr +#define FLEXTTYPE_t_symtype0 FLEXTTYPE_t_symptr0 +#define CALLBTYPE_t_symtype t_symptr +#define FLEXTTYPE_t_ptrtype FLEXTTPN_PTR +#define CALLBTYPE_t_ptrtype t_ptrtype + +#define FLEXTTP(TP) FLEXTTYPE_ ## TP +#define CALLBTP(TP) CALLBTYPE_ ## TP + + +#define ARGMEMBER_bool(a) GetBool(a) +#define ARGMEMBER_bool0(a) ARGMEMBER_bool(a) +#define ARGMEMBER_int(a) GetInt(a) +#define ARGMEMBER_int0(a) ARGMEMBER_int(a) +#define ARGMEMBER_float(a) GetFloat(a) +#define ARGMEMBER_float0(a) ARGMEMBER_float(a) +#define ARGMEMBER_t_symptr(a) GetSymbol(a) +#define ARGMEMBER_t_symptr0(a) ARGMEMBER_t_symptr(a) +#define ARGMEMBER_t_symtype(a) ARGMEMBER_t_symptr(a) +#define ARGMEMBER_t_symtype0(a) ARGMEMBER_t_symptr0(a) +#define ARGCAST(a,tp) ARGMEMBER_##tp(a) + +#define REAL_NEW(NAME,NEW_CLASS,DSP,NOI,LIB) \ +flext_obj *NEW_CLASS::__init__(int ,t_atom *) \ +{ \ + return new NEW_CLASS; \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_V(NAME,NEW_CLASS,DSP,NOI,LIB) \ +flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \ +{ \ + return new NEW_CLASS(argc,argv); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,FLEXTTPN_VAR,FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_1(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1) \ +flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \ +{ \ + return new NEW_CLASS(ARGCAST(argv[0],TYPE1)); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_2(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1,TYPE2) \ +flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \ +{ \ + return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2)); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_3(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1, TYPE2, TYPE3) \ +flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \ +{ \ + return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2),ARGCAST(argv[2],TYPE3)); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + +#define REAL_NEW_4(NAME,NEW_CLASS,DSP,NOI,LIB, TYPE1,TYPE2, TYPE3, TYPE4) \ +flext_obj *NEW_CLASS::__init__(int,t_atom *argv) \ +{ \ + return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2),ARGCAST(argv[2],TYPE3),ARGCAST(argv[3],TYPE4)); \ +} \ +FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \ +{ \ + flext_obj::obj_add(LIB,DSP,NOI,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTP(TYPE4),FLEXTTPN_NULL); \ +} \ +FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) + + +// Shortcuts for method arguments: +#define FLEXTARG_float a_float +#define FLEXTARG_int a_int +#define FLEXTARG_bool a_int +#define FLEXTARG_t_float a_float +#define FLEXTARG_t_symtype a_symbol +#define FLEXTARG_t_symptr a_symbol +#define FLEXTARG_t_ptrtype a_pointer + +#define FLEXTARG(TP) FLEXTARG_ ## TP + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flbind.cpp b/externals/grill/trunk/flext/source/flbind.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a53d5c4fd81ba15e1b652c7c7f7a2722755059b --- /dev/null +++ b/externals/grill/trunk/flext/source/flbind.cpp @@ -0,0 +1,279 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flbind.cpp + \brief Functionality for symbol-bound methods. +*/ + +#ifndef __FLEXT_BIND_CPP +#define __FLEXT_BIND_CPP + +#include "flext.h" +#include "flinternal.h" + +#include "flpushns.h" + +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_base))::pxbnd_class = NULL; + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPLATE +struct ProxyVars { + static t_object *px_freelist; + static t_messlist px_messlist[3]; +}; + +FLEXT_TEMPIMPL(t_object *ProxyVars)::px_freelist = NULL; +FLEXT_TEMPIMPL(t_messlist ProxyVars)::px_messlist[3]; +#endif + +/*! \brief Set up the proxy class for symbol-bound methods +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::SetupBindProxy() +{ + // already initialized? + if(!pxbnd_class) { +#if FLEXT_SYS == FLEXT_SYS_PD + pxbnd_class = class_new(gensym(const_cast<char *>("flext_base bind proxy")),NULL,NULL,sizeof(pxbnd_object),CLASS_PD|CLASS_NOINLET, A_NULL); + add_anything(pxbnd_class,pxbnd_object::px_method); // for symbol-bound methods +#elif FLEXT_SYS == FLEXT_SYS_MAX + pxbnd_class = new t_class; + + pxbnd_class->c_sym = const_cast<t_symbol *>(sym__); + pxbnd_class->c_freelist = &FLEXT_TEMPINST(ProxyVars)::px_freelist; + pxbnd_class->c_freefun = NULL; + pxbnd_class->c_size = sizeof(pxbnd_object); + pxbnd_class->c_tiny = 0; + pxbnd_class->c_noinlet = 1; + FLEXT_TEMPINST(ProxyVars)::px_messlist[0].m_sym = (t_symbol *)pxbnd_class; + + FLEXT_TEMPINST(ProxyVars)::px_messlist[1].m_sym = const_cast<t_symbol *>(sym_anything); + FLEXT_TEMPINST(ProxyVars)::px_messlist[1].m_fun = (method)pxbnd_object::px_method; + FLEXT_TEMPINST(ProxyVars)::px_messlist[1].m_type[0] = A_GIMME; + FLEXT_TEMPINST(ProxyVars)::px_messlist[1].m_type[1] = 0; + + FLEXT_TEMPINST(ProxyVars)::px_messlist[2].m_sym = 0; +#else +#pragma warning("Not implemented!") +#endif + } +} + + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::BindItem::BindItem(bool (*f)(flext_base *,t_symbol *s,int,t_atom *,void *data),pxbnd_object *p): + Item(NULL),fun(f),px(p) +{} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::BindItem::~BindItem() +{ + if(px) { + FLEXT_ASSERT(!fun); // check if already unbound + object_free(&px->obj); + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::BindItem::Unbind(const t_symbol *tag) +{ + if(px) { + FLEXT_ASSERT(fun); + +#if FLEXT_SYS == FLEXT_SYS_PD + pd_unbind(&px->obj.ob_pd,const_cast<t_symbol *>(tag)); +#elif FLEXT_SYS == FLEXT_SYS_MAX + if(tag->s_thing == (t_object *)px) + const_cast<t_symbol *>(tag)->s_thing = NULL; + else + error("flext - Binding to symbol %s not found",tag->s_name); +#else +# pragma warning("Not implemented") +#endif + + fun = NULL; + } +} + +#if FLEXT_SYS == FLEXT_SYS_PD + //! Bind object to a symbol + FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Bind(const t_symbol *sym) { pd_bind(&thisHdr()->ob_pd,const_cast<t_symbol *>(sym)); return true; } + //! Unbind object from a symbol + FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Unbind(const t_symbol *sym) { pd_unbind(&thisHdr()->ob_pd,const_cast<t_symbol *>(sym)); return true; } +#elif FLEXT_SYS == FLEXT_SYS_MAX + //! Bind object to a symbol + FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Bind(const t_symbol *sym) { if(sym->s_thing) return false; else { const_cast<t_symbol *>(sym)->s_thing = (t_object *)thisHdr(); return true; } } + //! Unbind object from a symbol + FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Unbind(const t_symbol *sym) { if(sym->s_thing != (t_object *)thisHdr()) return false; else { const_cast<t_symbol *>(sym)->s_thing = NULL; return true; } } +#endif + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::BindMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void *data) +{ + if(!bindhead) + bindhead = new ItemCont; + else { + // Search for symbol + for(Item *it = bindhead->FindList(sym); it; it = it->nxt) { + BindItem *item = (BindItem *)it; + + // go through all items with matching tag + if(item->fun == fun) { + // function already registered -> bail out! + post("%s - Symbol already bound with this method",thisName()); + return false; + } + } + } + + SetupBindProxy(); + +#if FLEXT_SYS == FLEXT_SYS_PD + pxbnd_object *px = (pxbnd_object *)object_new(pxbnd_class); +#elif FLEXT_SYS == FLEXT_SYS_MAX + pxbnd_object *px = (pxbnd_object *)newobject(FLEXT_TEMPINST(ProxyVars)::px_messlist); +#else +#pragma warning("Not implemented!") +#endif + + if(px) { + BindItem *mi = new BindItem(fun,px); + bindhead->Add(mi,sym); + + px->init(this,mi,data); + +#if FLEXT_SYS == FLEXT_SYS_PD + pd_bind(&px->obj.ob_pd,const_cast<t_symbol *>(sym)); +#elif FLEXT_SYS == FLEXT_SYS_MAX + #if 1 // old code + if(!sym->s_thing) + const_cast<t_symbol *>(sym)->s_thing = (t_object *)px; + else + error("%s - Symbol is already bound",thisName()); + #else + void *binding = object_register(gensym("flext"),const_cast<t_symbol *>(sym),(t_object *)px); + #endif +#else +# pragma warning("Not implemented") +#endif + } + else + error("%s - Symbol proxy could not be created",thisName()); + + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::UnbindMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void **data) +{ + bool ok = false; + + if(bindhead && bindhead->Contained(0)) { + ItemSet &set = bindhead->GetInlet(); + +/* + ItemSet::iterator it1,it2; + if(sym) { + // specific tag + it1 = it2 = set.find(sym); it2++; + } + else { + // any tag + it1 = set.begin(),it2 = set.end(); + } + + BindItem *it = NULL; + for(ItemSet::iterator si = it1; si != it2 && !it; ++si) { + for(Item *i = si.data(); i; i = i->nxt) { + BindItem *item = (BindItem *)i; + if(!fun || item->fun == fun) + { + it = item; + if(!sym) sym = si.key(); + break; + } + } + } +*/ + BindItem *item = NULL; + if(sym) { + // symbol is given + Item *it = set.find(sym); + if(fun) { + // check if function matches + for(; it && static_cast<BindItem *>(it)->fun != fun; it = it->nxt) {} + } + item = static_cast<BindItem *>(it); + } + else { + // take any entry that matches + for(FLEXT_TEMP_TYPENAME ItemSet::iterator si(set); si && !item; ++si) { + for(Item *i = si.data(); i; i = i->nxt) { + BindItem *bit = (BindItem *)i; + if(!fun || bit->fun == fun) { + item = bit; + if(!sym) sym = si.key(); + break; + } + } + } + } + + if(item) { + if(data) *data = item->px->data; + ok = bindhead->Remove(item,sym,0,false); + if(ok) { + item->Unbind(sym); + delete item; + } + } + } + return ok; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::GetBoundMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void *&data) +{ + if(bindhead) { + // Search for symbol + for(Item *it = bindhead->FindList(sym); it; it = it->nxt) { + BindItem *item = (BindItem *)it; + + // go through all items with matching tag + if(item->fun == fun) { + data = item->px->data; + return true; + } + } + } + return false; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::UnbindAll() +{ + if(bindhead && bindhead->Contained(0)) { + ItemSet &set = bindhead->GetInlet(); +// for(ItemSet::iterator si = set.begin(); si != set.end(); ++si) { + for(FLEXT_TEMP_TYPENAME ItemSet::iterator si(set); si; ++si) { + Item *lst = si.data(); + while(lst) { + Item *nxt = lst->nxt; + BindItem *it = (BindItem *)lst; + it->Unbind(si.key()); + delete it; + lst = nxt; + } + } + set.clear(); + } + return true; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::pxbnd_object::px_method(pxbnd_object *c,const t_symbol *s,int argc,t_atom *argv) +{ + c->item->fun(c->base,(t_symbol *)s,argc,(t_atom *)argv,c->data); +} + +#include "flpopns.h" + +#endif // __FLEXT_BIND_CPP + + diff --git a/externals/grill/trunk/flext/source/flbuf.cpp b/externals/grill/trunk/flext/source/flbuf.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee34c28588925436263e5cd336c181a36730c313 --- /dev/null +++ b/externals/grill/trunk/flext/source/flbuf.cpp @@ -0,0 +1,398 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flbuf.cpp + \brief Implementation of the buffer abstraction class. +*/ + +#ifndef __FLEXT_BUF_CPP +#define __FLEXT_BUF_CPP + +#include "flext.h" +#include "flfeatures.h" +#include <set> + +#include "flpushns.h" + +#if FLEXT_SYS != FLEXT_SYS_JMAX + +#if FLEXT_SYS == FLEXT_SYS_PD +#define DIRTY_INTERVAL 0 // buffer dirty check in msec + +FLEXT_TEMPLATE +class Buffers: + public std::set<flext::buffer *> +{ +public: + static FLEXT_TEMPINST(Buffers) buffers; +}; + +FLEXT_TEMPIMPL(FLEXT_TEMPINST(Buffers) Buffers)::buffers; + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::cb_buffer_dsp(void *c,t_signal **sp) +{ + for(FLEXT_TEMPINST(Buffers)::iterator it = FLEXT_TEMPINST(Buffers)::buffers.begin(); it != FLEXT_TEMPINST(Buffers)::buffers.end(); ++it) + (*it)->Set(); +} +#endif + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::buffer::buffer(const t_symbol *bn,bool delayed): + sym(NULL),data(NULL), + chns(0),frames(0) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + arr = NULL; + interval = DIRTY_INTERVAL; + isdirty = false; + ticking = false; + + // we probably should make this global... work on the set of registered buffers + tick = clock_new(this,(t_method)cb_tick); +#endif + + if(bn) Set(bn,delayed); + + ClearDirty(); + +#if FLEXT_SYS == FLEXT_SYS_PD + // register buffer + FLEXT_ASSERT(FLEXT_TEMPINST(Buffers)::buffers.find(this) == FLEXT_TEMPINST(Buffers)::buffers.end()); + FLEXT_TEMPINST(Buffers)::buffers.insert(this); +#endif +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::buffer::~buffer() +{ +#if FLEXT_SYS == FLEXT_SYS_PD + if(tick) clock_free(tick); +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD + // unregister buffer + FLEXT_ASSERT(FLEXT_TEMPINST(Buffers)::buffers.find(this) != FLEXT_TEMPINST(Buffers)::buffers.end()); + FLEXT_TEMPINST(Buffers)::buffers.erase(this); +#endif +} + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::buffer::Set(const t_symbol *s,bool nameonly) +{ + int ret = 0; + bool valid = data != NULL; // valid now? (before change) + + if(s && sym != s) { + ret = 1; + data = NULL; + frames = 0; + chns = 0; + } + + if(s && *GetString(s)) sym = s; + + if(!sym) { + if(valid) ret = -1; + } + else if(!nameonly) { +#if FLEXT_SYS == FLEXT_SYS_PD + arr = (t_garray *)pd_findbyclass(const_cast<t_symbol *>(sym), garray_class); + if(!arr) + { + if (*GetString(sym)) FLEXT_LOG1("buffer: no such array '%s'",GetString(sym)); +// sym = NULL; + if(valid) ret = -1; + } + else { + int frames1; + FLEXT_ARRAYTYPE *data1; + if(!FLEXT_PD_ARRAYGRAB(arr, &frames1, &data1)) + { + error("buffer: bad template '%s'",GetString(sym)); + data = NULL; + frames = 0; + if(valid) ret = -1; + } + else { + ret = 0; + garray_usedindsp(arr); + if(frames != frames1) { frames = frames1; if(!ret) ret = 1; } + Element *data2 = reinterpret_cast<Element *>(data1); + if(data != data2) { data = data2; if(!ret) ret = 1; } + chns = 1; + } + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + if(sym->s_thing) { + const t_buffer *p = (const t_buffer *)sym->s_thing; + + FLEXT_ASSERT(!NOGOOD(p)); + + if(ob_sym(p) != sym_buffer) { + post("buffer: object '%s' not valid (type %s)",GetString(sym),GetString(ob_sym(p))); + if(valid) ret = -2; + } + else { +#ifdef FLEXT_DEBUG +// post("flext: buffer object '%s' - valid:%i samples:%i channels:%i frames:%i",GetString(sym),p->b_valid,p->b_frames,p->b_nchans,p->b_frames); +#endif + Element *data1 = reinterpret_cast<Element *>(p->b_samples); + if(data != data1) { data = data1; if(!ret) ret = 1; } + if(chns != p->b_nchans) { chns = p->b_nchans; if(!ret) ret = 1; } + if(frames != p->b_frames) { frames = p->b_frames; if(!ret) ret = 1; } + } + } + else { + FLEXT_LOG1("buffer: symbol '%s' not defined", GetString(sym)); + /*if(valid)*/ ret = -1; + } +#else +#error not implemented +#endif + } + + return ret; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::buffer::Update() +{ + FLEXT_ASSERT(sym); + + bool upd = false; + +#if FLEXT_SYS == FLEXT_SYS_PD + if(!arr) return data == NULL; + + int frames1; + FLEXT_ARRAYTYPE *data1; + if(!FLEXT_PD_ARRAYGRAB(arr, &frames1, &data1)) { + data = NULL; + chns = 0; + frames = 0; + upd = true; + } + else { + Element *data2 = reinterpret_cast<Element *>(data1); + if(data != data2 || frames != frames1) { + data = data2; + frames = frames1; + upd = true; + } + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + const t_buffer *p = (const t_buffer *)sym->s_thing; + if(p) { + FLEXT_ASSERT(!NOGOOD(p) && ob_sym(p) == sym_buffer); + + Element *data1 = reinterpret_cast<Element *>(p->b_samples); + if(data != data1 || chns != p->b_nchans || frames != p->b_frames) { + data = data1; + chns = p->b_nchans; + frames = p->b_frames; + upd = true; + } + } + else { + // buffer~ has e.g. been renamed + data = NULL; + chns = 0; + frames = 0; + upd = true; + } +#else +#error not implemented +#endif + return upd; +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext))::buffer::lock_t FLEXT_CLASSDEF(flext))::buffer::Lock() +{ + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + FLEXT_ASSERT(arr); +#ifdef _FLEXT_HAVE_PD_GARRAYLOCKS + garray_lock(arr); +#endif + return false; +#elif FLEXT_SYS == FLEXT_SYS_MAX + t_buffer *p = (t_buffer *)sym->s_thing; + FLEXT_ASSERT(p); +#ifdef _FLEXT_HAVE_MAX_INUSEFLAG + long old = p->b_inuse; +#ifdef ATOMIC_INCREMENT + ATOMIC_INCREMENT(&p->b_inuse); +#else + p->b_inuse = 1; +#endif + return old; +#else + return 0; +#endif +#else +#error not implemented +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::Unlock(flext::buffer::lock_t prv) +{ + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + FLEXT_ASSERT(arr); +#ifdef _FLEXT_HAVE_PD_GARRAYLOCKS + garray_unlock(arr); +#endif +#elif FLEXT_SYS == FLEXT_SYS_MAX + t_buffer *p = (t_buffer *)sym->s_thing; + FLEXT_ASSERT(p); +#ifdef _FLEXT_HAVE_MAX_INUSEFLAG +#ifdef ATOMIC_INCREMENT + ATOMIC_DECREMENT(&p->b_inuse); +#else + p->b_inuse = prv; +#endif +#endif +#else +#error not implemented +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::Frames(int fr,bool keep,bool zero) +{ + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + // is this function guaranteed to keep memory and set rest to zero? + ::garray_resize(arr,(float)fr); + Update(); +#elif FLEXT_SYS == FLEXT_SYS_MAX + Element *tmp = NULL; + int sz = frames; + if(fr < sz) sz = fr; + + if(keep) { + // copy buffer data to tmp storage + tmp = (Element *)NewAligned(sz*sizeof(Element)); + FLEXT_ASSERT(tmp); + CopySamples(tmp,data,sz); + } + + t_atom msg; + t_buffer *buf = (t_buffer *)sym->s_thing; + // b_msr reflects buffer sample rate... is this what we want? + // Max bug: adding half a sample to prevent roundoff errors.... + float ms = (fr+0.5)/buf->b_msr; + + SetFloat(msg,ms); + ::typedmess((object *)buf,(t_symbol *)sym_size,1,&msg); + + Update(); + + if(tmp) { + // copy data back + CopySamples(data,tmp,sz); + FreeAligned(tmp); + if(zero && sz < fr) ZeroSamples(data+sz,fr-sz); + } + else + if(zero) ZeroSamples(data,fr); +#else +#error +#endif +} + + +#if FLEXT_SYS == FLEXT_SYS_PD +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::SetRefrIntv(float intv) +{ + interval = intv; + if(interval == 0 && ticking) { + clock_unset(tick); + ticking = false; + } +} +#elif FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::SetRefrIntv(float) {} +#else +#error +#endif + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::Dirty(bool force) +{ + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + if((!ticking) && (interval || force)) { + ticking = true; + cb_tick(this); // immediately redraw + } + else { + if(force) clock_delay(tick,0); + isdirty = true; + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + t_buffer *p = (t_buffer *)sym->s_thing; + FLEXT_ASSERT(p && !NOGOOD(p)); + ::object_method((t_object *)p,(t_symbol *)sym_dirty); +// p->b_modtime = gettime(); +#else +#error Not implemented +#endif +} + +#if FLEXT_SYS == FLEXT_SYS_PD +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::cb_tick(buffer *b) +{ + if(b->arr) garray_redraw(b->arr); +#ifdef FLEXT_DEBUG + else error("buffer: array is NULL"); +#endif + + if(b->isdirty && b->interval) { + b->isdirty = false; + b->ticking = true; + clock_delay(b->tick,b->interval); + } + else + b->ticking = false; +} +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::buffer::ClearDirty() +{ +#if FLEXT_SYS == FLEXT_SYS_PD + cleantime = clock_getlogicaltime(); +#elif FLEXT_SYS == FLEXT_SYS_MAX + cleantime = gettime(); +#else +#error Not implemented +#endif +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::buffer::IsDirty() const +{ + if(!sym) return false; +#if FLEXT_SYS == FLEXT_SYS_PD + #ifdef _FLEXT_HAVE_PD_GARRAYUPDATETIME + return arr && (isdirty || garray_updatetime(arr) > cleantime); + #else + // Don't know.... (no method in PD judging whether buffer has been changed from outside flext...) + return true; + #endif +#elif FLEXT_SYS == FLEXT_SYS_MAX + t_buffer *p = (t_buffer *)sym->s_thing; + FLEXT_ASSERT(p && !NOGOOD(p)); + return p->b_modtime > cleantime; +#else +#error Not implemented +#endif +} + +#endif // Jmax + +#include "flpopns.h" + +#endif // __FLEXT_BUF_CPP + + diff --git a/externals/grill/trunk/flext/source/flclass.h b/externals/grill/trunk/flext/source/flclass.h new file mode 100644 index 0000000000000000000000000000000000000000..c519ae3270496b07a96ecf22d2aaf6c38d11a414 --- /dev/null +++ b/externals/grill/trunk/flext/source/flclass.h @@ -0,0 +1,1131 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flclass.h + \brief User accessible flext base classes + +*/ + +#ifndef __FLCLASS_H +#define __FLCLASS_H + +// include the header file declaring the base classes +#include "flbase.h" +#include "flsupport.h" +#include "flmap.h" +#include "flinternal.h" + +#ifdef _MSC_VER +#pragma warning(disable: 4786) +#endif + +#ifdef __BORLANDC__ +#pragma warn -8008 // Condition is always false +#pragma warn -8057 // Parameter is never used +#pragma warn -8066 // Unreachable code +#endif + + +#include "flpushns.h" + +// === flext_base ================================================== + +/*! \brief Flext message only base object + + This is the base class from which typical external objects derive. + DSP objects should use the flext_dsp class which inherits from flext_base and + provides the necessary functionality. + + For a valid external object class you would also need FLEXT_HEADER, also if it's only + a base class without instantiated objects again. + To make an instance of an object class you would typically use FLEXT_NEW or + its companions. + + See the flext_obj class for additional information. +*/ + + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_base); + +typedef class FLEXT_SHARE FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) flext_base; + +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext_base): + public flext_obj +{ + FLEXT_HEADER_S(FLEXT_CLASSDEF(flext_base),flext_obj,Setup) + + friend class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj); + +public: + +// --- inheritable virtual methods -------------------------------- + + /*! \defgroup FLEXT_C_VIRTUAL Virtual base class functions + + @{ + */ + + //! called on patcher load (not on mere object creation!) + virtual void CbLoadbang(); + virtual void m_loadbang(); + + //! called on (double-)click into object box + virtual void CbClick(); + + /*! \brief Called for every incoming message. + All method handling is done in there + \return True if a handler was found and called + */ + virtual bool CbMethodHandler(int inlet,const t_symbol *s,int argc,const t_atom *argv); + + /*! \brief Called for every unhandled message (by CbMethodHandler) + */ + virtual bool CbMethodResort(int inlet,const t_symbol *s,int argc,const t_atom *argv); + virtual bool m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv); + + virtual bool CbIdle(); + +//! @} FLEXT_C_VIRTUAL + + +// --- inlet/outlet stuff ----------------------------------------- + + /*! \defgroup FLEXT_C_INOUT Flext in-/outlet functions + \note These must be called in the class' constructor + \note All (also default) inlets must be defined + @{ + */ + + /*! \defgroup FLEXT_C_IO_ADD Announce in-/outlet functions + @{ + */ + + // argument m specifies multiple inlet/outlet count + +// void AddInDef() { AddInlet(xlet_def,1); } + + /*! \brief Add inlet(s) for anythings + \remark That's the one to choose for the left-most (first) inlet unless it's a signal inlet. + */ + void AddInAnything(int m = 1) { AddInlet(xlet_any,m); } + /*! \brief Add inlet(s) for anythings (with description) + \remark That's the one to choose for the left-most (first) inlet unless it's a signal inlet. + */ + void AddInAnything(const char *desc,int m = 1) { AddInlet(xlet_any,m,desc); } + //! Add inlet(s) for floats + void AddInFloat(int m = 1) { AddInlet(xlet_float,m); } + //! Add inlet(s) for floats (with description) + void AddInFloat(const char *desc,int m = 1) { AddInlet(xlet_float,m,desc); } + //! Add inlet(s) for integers + void AddInInt(int m = 1) { AddInlet(xlet_int,m); } + //! Add inlet(s) for integers (with description) + void AddInInt(const char *desc,int m = 1) { AddInlet(xlet_int,m,desc); } + //! Add inlet(s) for symbols + void AddInSymbol(int m = 1) { AddInlet(xlet_sym,m); } + //! Add inlet(s) for symbol (with description) + void AddInSymbol(const char *desc,int m = 1) { AddInlet(xlet_sym,m,desc); } + //! Add inlet(s) for bang + void AddInBang(int m = 1) { AddInlet(xlet_sym,m); } + //! Add inlet(s) for bangs (with description) + void AddInBang(const char *desc,int m = 1) { AddInlet(xlet_sym,m,desc); } + //! Add inlet(s) for lists + void AddInList(int m = 1) { AddInlet(xlet_list,m); } + //! Add inlet(s) for lists (with description) + void AddInList(const char *desc,int m = 1) { AddInlet(xlet_list,m,desc); } + + //! Add outlet(s) for anythings + void AddOutAnything(int m = 1) { AddOutlet(xlet_any,m); } + //! Add outlet(s) for anythings (with description) + void AddOutAnything(const char *desc,int m = 1) { AddOutlet(xlet_any,m,desc); } + //! Add outlet(s) for floats + void AddOutFloat(int m = 1) { AddOutlet(xlet_float,m); } + //! Add outlet(s) for floats (with description) + void AddOutFloat(const char *desc,int m = 1) { AddOutlet(xlet_float,m,desc); } + //! Add outlet(s) for integers + void AddOutInt(int m = 1) { AddOutlet(xlet_int,m); } + //! Add outlet(s) for integers (with description) + void AddOutInt(const char *desc,int m = 1) { AddOutlet(xlet_int,m,desc); } + //! Add outlet(s) for symbols + void AddOutSymbol(int m = 1) { AddOutlet(xlet_sym,m); } + //! Add outlet(s) for symbols (with description) + void AddOutSymbol(const char *desc,int m = 1) { AddOutlet(xlet_sym,m,desc); } + //! Add outlet(s) for bangs + void AddOutBang(int m = 1) { AddOutlet(xlet_sym,m); } + //! Add outlet(s) for bangs (with description) + void AddOutBang(const char *desc,int m = 1) { AddOutlet(xlet_sym,m,desc); } + //! Add outlet(s) for lists + void AddOutList(int m = 1) { AddOutlet(xlet_list,m); } + //! Add outlet(s) for lists (with description) + void AddOutList(const char *desc,int m = 1) { AddOutlet(xlet_list,m,desc); } + + //! \deprecated inlets and outlets are now set up automatically + bool SetupInOut() { return true; } + + //! @} FLEXT_C_IO_ADD + + /*! \defgroup FLEXT_C_IO_MISC Miscellanous in-/outlet functionality + @{ + */ + + //! Get number of inlets + int CntIn() const { return incnt; } + //! Get number of outlets + int CntOut() const { return outcnt; } + //! Get number of signal inlets + int CntInSig() const { return insigs; } + //! Get number of signal outlets + int CntOutSig() const { return outsigs; } + + + //! Retrieve currently processed message tag (NULL if no message processing) + static const t_symbol *thisTag() { return curtag; } + + class outlet; + + //! Get pointer to outlet (not in the constructor!) + outlet *GetOut(int ix) const { return outlets[ix]; } + + int GetOutAttr() const { return HasAttributes()?CntOut():0; } + + //! @} FLEXT_C_IO_MISC + + /*! \defgroup FLEXT_C_IO_OUT Output data to inlets/outlets + @{ + */ + + // output messages + + //! Output bang (index n starts with 0) + void ToOutBang(int n) const; + + //! Output float (index n starts with 0) + void ToOutFloat(int n,float f) const; + + //! Output integer (index n starts with 0) + void ToOutInt(int n,int f) const; + + //! Output boolean (index n starts with 0) + void ToOutBool(int n,bool f) const { ToOutInt(n,f?1:0); } + + //! Output double (index n starts with 0) + void ToOutDouble(int n,double d) const { t_atom dbl[2]; ToOutList(n,2,SetDouble(dbl,d)); } + + //! Output symbol (index n starts with 0) + void ToOutSymbol(int n,const t_symbol *s) const; + //! Output string aka symbol (index n starts with 0) + void ToOutString(int n,const char *s) const { ToOutSymbol(n,MakeSymbol(s)); } + + //! Output atom (index n starts with 0) + void ToOutAtom(int n,const t_atom &at) const; + + //! Output list (index n starts with 0) + void ToOutList(int n,int argc,const t_atom *argv) const; + //! Output list (index n starts with 0) + void ToOutList(int n,const AtomList &list) const { ToOutList(n,list.Count(),list.Atoms()); } + + //! Output anything (index n starts with 0) + void ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const; + //! Output anything (index n starts with 0) + void ToOutAnything(int n,const AtomAnything &any) const { ToOutAnything(n,any.Header(),any.Count(),any.Atoms()); } + //! Output anything (index n starts with 0) + void ToOutAnything(int n,const t_symbol *s,const AtomList &list) const { ToOutAnything(n,s,list.Count(),list.Atoms()); } + + //! @} FLEXT_C_IO_OUT + + /*! \defgroup FLEXT_C_IO_QUEUE Low-priority output of data to inlets/outlets + @{ + */ + + //! Output low priority bang (index n starts with 0) + void ToQueueBang(int n) const; + + //! Output low priority float (index n starts with 0) + void ToQueueFloat(int n,float f) const; + + //! Output low priority integer (index n starts with 0) + void ToQueueInt(int n,int f) const; + + //! Output low priority boolean (index n starts with 0) + void ToQueueBool(int n,bool f) const { ToQueueInt(n,f?1:0); } + + //! Output double (index n starts with 0) + void ToQueueDouble(int n,double d) const { t_atom dbl[2]; ToQueueList(n,2,SetDouble(dbl,d)); } + + //! Output low priority symbol (index n starts with 0) + void ToQueueSymbol(int n,const t_symbol *s) const; + //! Output low priority string aka symbol (to appointed outlet) + void ToQueueString(int n,const char *s) const { ToQueueSymbol(n,MakeSymbol(s)); } + + //! Output low priority atom (index n starts with 0) + void ToQueueAtom(int n,const t_atom &at) const; + + //! Output low priority list (index n starts with 0) + void ToQueueList(int n,int argc,const t_atom *argv) const; + //! Output low priority list (index n starts with 0) + void ToQueueList(int n,const AtomList &list) const { ToQueueList(n,list.Count(),list.Atoms()); } + + //! Output low priority anything (index n starts with 0) + void ToQueueAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const; + //! Output low priority anything (index n starts with 0) + void ToQueueAnything(int n,const AtomAnything &any) const { ToQueueAnything(n,any.Header(),any.Count(),any.Atoms()); } + + //! @} FLEXT_C_IO_QUEUE + + + /*! \defgroup FLEXT_C_IO_SELF Output of data to inlets/outlets of this object + @{ + */ + + //! Send bang to self (inlet n) + void ToSelfBang(int n) const { ToQueueBang(-1-n); } + + //! Send float to self (inlet n) + void ToSelfFloat(int n,float f) const { ToQueueFloat(-1-n,f); } + + //! Send integer to self (inlet n) + void ToSelfInt(int n,int f) const { ToQueueInt(-1-n,f); } + + //! Send boolean to self (inlet n) + void ToSelfBool(int n,bool f) const { ToSelfInt(n,f?1:0); } + + //! Send double to self (index n starts with 0) + void ToSelfDouble(int n,double d) const { t_atom dbl[2]; ToSelfList(n,2,SetDouble(dbl,d)); } + + //! Send symbol to self (inlet n) + void ToSelfSymbol(int n,const t_symbol *s) const { ToQueueSymbol(-1-n,s); } + //! Send string aka symbol to self (inlet 0) + void ToSelfString(int n,const char *s) const { ToSelfSymbol(n,MakeSymbol(s)); } + + //! Output atom (index n starts with 0) + void ToSelfAtom(int n,const t_atom &at) const { ToQueueAtom(-1-n,at); } + + //! Send list to self (inlet n) + void ToSelfList(int n,int argc,const t_atom *argv) const { ToQueueList(-1-n,argc,argv); } + //! Send list to self (inlet n) + void ToSelfList(int n,const AtomList &list) const { ToSelfList(n,list.Count(),list.Atoms()); } + + //! Send anything to self (inlet n) + void ToSelfAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { ToQueueAnything(-1-n,s,argc,argv); } + //! Send anything to self (inlet n) + void ToSelfAnything(int n,const AtomAnything &any) const { ToSelfAnything(n,any.Header(),any.Count(),any.Atoms()); } + + //! @} FLEXT_C_IO_SELF + + + /*! \defgroup FLEXT_C_IO_MESSAGEBUNDLE Output of data via message bundles + + These are used to assure the sending of several messages from a second thread to the same logical time + + @{ + */ + + //! Output bang (index n starts with 0) + void MsgAddBang(MsgBundle *mb,int n) const; + + //! Output float (index n starts with 0) + void MsgAddFloat(MsgBundle *mb,int n,float f) const; + + //! Output integer (index n starts with 0) + void MsgAddInt(MsgBundle *mb,int n,int f) const; + + //! Output boolean (index n starts with 0) + void MsgAddBool(MsgBundle *mb,int n,bool f) const { MsgAddInt(mb,n,f?1:0); } + + //! Output double (index n starts with 0) + void MsgAddDouble(MsgBundle *mb,int n,double d) const { t_atom dbl[2]; MsgAddList(mb,n,2,SetDouble(dbl,d)); } + + //! Output symbol (index n starts with 0) + void MsgAddSymbol(MsgBundle *mb,int n,const t_symbol *s) const; + //! Output string aka symbol (to appointed outlet) + void MsgAddString(MsgBundle *mb,int n,const char *s) const { MsgAddSymbol(mb,n,MakeSymbol(s)); } + + //! Output atom (index n starts with 0) + void MsgAddAtom(MsgBundle *mb,int n,const t_atom &at) const; + + //! Output list (index n starts with 0) + void MsgAddList(MsgBundle *mb,int n,int argc,const t_atom *argv) const; + + //! Output list (index n starts with 0) + void MsgAddList(MsgBundle *mb,int n,const AtomList &list) const { MsgAddList(mb,n,list.Count(),list.Atoms()); } + + //! Output anything (index n starts with 0) + void MsgAddAnything(MsgBundle *mb,int n,const t_symbol *s,int argc,const t_atom *argv) const; + //! Output anything (index n starts with 0) + void MsgAddAnything(MsgBundle *mb,int n,const AtomAnything &any) const { MsgAddAnything(mb,n,any.Header(),any.Count(),any.Atoms()); } + + void MsgSelfBang(MsgBundle *mb,int n) const { MsgAddBang(mb,-1-n); } + + //! Send float to self (inlet n) + void MsgSelfFloat(MsgBundle *mb,int n,float f) const { MsgAddFloat(mb,-1-n,f); } + + //! Send integer to self (inlet n) + void MsgSelfInt(MsgBundle *mb,int n,int f) const { MsgAddInt(mb,-1-n,f); } + + //! Send boolean to self (inlet n) + void MsgSelfBool(MsgBundle *mb,int n,bool f) const { MsgSelfInt(mb,n,f?1:0); } + + //! Output double (index n starts with 0) + void MsgSelfDouble(MsgBundle *mb,int n,double d) const { t_atom dbl[2]; MsgSelfList(mb,n,2,SetDouble(dbl,d)); } + + //! Send symbol to self (inlet n) + void MsgSelfSymbol(MsgBundle *mb,int n,const t_symbol *s) const { MsgAddSymbol(mb,-1-n,s); } + //! Send string aka symbol to self (inlet 0) + void MsgSelfString(MsgBundle *mb,int n,const char *s) const { MsgSelfSymbol(mb,n,MakeSymbol(s)); } + + //! Output atom (index n starts with 0) + void MsgSelfAtom(MsgBundle *mb,int n,const t_atom &at) const { MsgAddAtom(mb,-1-n,at); } + + //! Send list to self (inlet n) + void MsgSelfList(MsgBundle *mb,int n,int argc,const t_atom *argv) const { MsgAddList(mb,-1-n,argc,argv); } + //! Send list to self (inlet n) + void MsgSelfList(MsgBundle *mb,int n,const AtomList &list) const { MsgSelfList(mb,n,list.Count(),list.Atoms()); } + + //! Send anything to self (inlet n) + void MsgSelfAnything(MsgBundle *mb,int n,const t_symbol *s,int argc,const t_atom *argv) const { MsgAddAnything(mb,-1-n,s,argc,argv); } + //! Send anything to self (inlet n) + void MsgSelfAnything(MsgBundle *mb,int n,const AtomAnything &any) const { MsgSelfAnything(mb,n,any.Header(),any.Count(),any.Atoms()); } + + //! @} FLEXT_C_IO_MESSAGEBUNDLE + +//! @} FLEXT_C_INOUT + + +// --- message handling ------------------------------------------- + + enum metharg { + a_null = 0, + a_float,a_int,a_bool, + a_symbol,a_pointer, + a_list,a_any, // (t_symbol *) / int / t_atom * + a_LIST,a_ANY // AtomList, AtomAnything + }; + + typedef bool (*methfun)(flext_base *c); + + /*! \defgroup FLEXT_C_ADDMETHOD Method handling (object scope) + \internal + @{ + */ + + void AddMethodDef(int inlet,const t_symbol *tag = NULL) { ThMeths()->Add(new MethItem,tag,inlet); } + void AddMethodDef(int inlet,const char *tag = NULL) { AddMethodDef(inlet,MakeSymbol(tag)); } + + void AddMethod(int inlet,bool (*m)(flext_base *)) { AddMethod(ThMeths(),inlet,sym_bang,(methfun)m,a_null); } + void AddMethod(int inlet,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_list,a_null); } + void AddMethod(int inlet,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_list,a_null); } + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_null); } // pure method + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ThMeths(),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything + void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything + void AddMethod(int inlet,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ThMeths(),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol + void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ThMeths(),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol + void AddMethod(int inlet,bool (*m)(flext_base *,float &)) { AddMethod(ThMeths(),inlet,sym_float,(methfun)m,a_float,a_null); } // single float + void AddMethod(int inlet,bool (*m)(flext_base *,float &,float &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_float,a_float,a_null); } // list of 2 floats + void AddMethod(int inlet,bool (*m)(flext_base *,float &,float &,float &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_float,a_float,a_float,a_null); } // list of 3 floats +#if FLEXT_SYS == FLEXT_SYS_PD + void AddMethod(int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,sym_float,(methfun)m,a_int,a_null); } // single float +#else + void AddMethod(int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,sym_int,(methfun)m,a_int,a_null); } // single float +#endif + void AddMethod(int inlet,bool (*m)(flext_base *,int &,int &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_int,a_int,a_null); } // list of 2 floats + void AddMethod(int inlet,bool (*m)(flext_base *,int &,int &,int &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_int,a_int,a_int,a_null); } // list of 3 floats + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,float &)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_float,a_null); } // method+float + void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_int,a_null); } // method+int + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,float &)) { AddMethod(inlet,MakeSymbol(tag),m); } + void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int &)) { AddMethod(inlet,MakeSymbol(tag),m); } + + // Â¥schedule call of the CbIdle method during the next idle cycle + void AddIdle(); + + //! Set Max/MSP style of distributing list elements over (message) inlets + static void SetDist(t_classid c,bool d = true); + //! Query whether lists are distributed + bool DoDist() const; + + +//! @} FLEXT_C_ADDMETHOD + + /*! \defgroup FLEXT_C_CADDMETHOD Method handling (class scope) + \internal + @{ + */ + + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *)) { AddMethod(ClMeths(c),inlet,sym_bang,(methfun)m,a_null); } + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_list,a_null); } + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_list,a_null); } + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_null); } // pure method + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ClMeths(c),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ClMeths(c),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &)) { AddMethod(ClMeths(c),inlet,sym_float,(methfun)m,a_float,a_null); } // single float + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &,float &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_float,a_float,a_null); } // list of 2 floats + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &,float &,float &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_float,a_float,a_float,a_null); } // list of 3 floats +#if FLEXT_SYS == FLEXT_SYS_PD + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,sym_float,(methfun)m,a_int,a_null); } // single integer +#else + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,sym_int,(methfun)m,a_int,a_null); } // single integer +#endif + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &,int &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_int,a_int,a_null); } // list of 2 floats + static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &,int &,int &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_int,a_int,a_int,a_null); } // list of 3 floats + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,float &)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_float,a_null); } // method+float + static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_int,a_null); } // method+int + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,float &)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int &)) { AddMethod(c,inlet,MakeSymbol(tag),m); } + + // Â¥schedule call of the given idlefun during the next idle cycle + static void AddIdle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv); + +//! @} FLEXT_C_CADDMETHOD + +// --- bind/unbind --------------------------------------- + + /*! \defgroup FLEXT_C_BIND Methods for binding a flext class to a symbol + + @{ + */ + + //! Bind object to a symbol + bool Bind(const t_symbol *sym); + //! Unbind object from a symbol + bool Unbind(const t_symbol *sym); + + //! Bind object to a symbol (as string) + bool Bind(const char *sym) { return Bind(MakeSymbol(sym)); } + //! Unbind object from a symbol (as string) + bool Unbind(const char *sym) { return Unbind(MakeSymbol(sym)); } + + /*! \brief Bind a method to a symbol + \param sym Symbol to bind to + \param meth Function to bind + \param data User data that is passed to the function + \return true on success + */ + bool BindMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *data = NULL); + /*! \brief Unbind a method from a symbol + \param sym Symbol to unbind from (if NULL... unbind all functions) + \param meth Method to unbind (if NULL ... unbind all functions bound to symbol) + \param data returns data pointer specified with BindMethod + \return true on success + */ + bool UnbindMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data) = NULL,void **data = NULL); + /*! \brief Get data of bound method of a symbol + \param sym Symbol to bind to + \param meth Function to bind + \param data Reference to returned user data + \return true on success (symbol/method combination was found) + */ + bool GetBoundMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *&data); + + //! \brief Bind a method to a symbol (as string) + bool BindMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *data = NULL) { return BindMethod(MakeSymbol(sym),meth,data); } + //! \brief Unbind a method from a symbol (as string) + bool UnbindMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data) = NULL,void **data = NULL) { return UnbindMethod(MakeSymbol(sym),meth,data); } + //! \brief Get data of bound method of a symbol (as string) + bool GetBoundMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *&data) { return GetBoundMethod(MakeSymbol(sym),meth,data); } + + /*! Unbind all symbol bindings + \note Memory associated to data pointers passed by BindMethod will not be freed! + */ + bool UnbindAll(); + +//! @} FLEXT_C_BIND + + // --- thread stuff ----------------------------------------------- + +#ifdef FLEXT_THREADS + /*! \defgroup FLEXT_C_THREAD Thread handling + + @{ + */ + + //! Start a thread for this object + bool StartThread(void (*meth)(thr_params *p),thr_params *p,const char * = NULL) { p->cl = this; return flext::LaunchThread(meth,p); } + + //! Terminate all threads of this object + bool StopThreads(); +#endif // FLEXT_THREADS + +//! @} FLEXT_C_THREAD + +// xxx internal stuff xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +public: // needed by VC++ 6 + + enum xlettype { + xlet_none = 0, + xlet_float,xlet_int,xlet_sym,xlet_list,xlet_any, + xlet_LIST,xlet_ANY, // use AtomList and AtomAnything + xlet_sig + }; + +protected: + + FLEXT_CLASSDEF(flext_base)(); + + /*! \brief Set up inlets and outlets, method and attribute lists + */ + virtual bool Init(); + + /*! \brief Deallocate all kinds of stuff + */ + virtual void Exit(); + + + /*! \defgroup FLEXT_C_ATTR Attribute handling methods (object scope) + @{ + */ + + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(attr,a_float,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(attr,a_int,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(attr,a_bool,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(attr,a_LIST,(methfun)get,(methfun)set); } + void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(attr,a_ANY,(methfun)get,(methfun)set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(MakeSymbol(attr),get,set); } + void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(MakeSymbol(attr),get,set); } + +//! @} FLEXT_C_ATTR + + /*! \defgroup FLEXT_C_CATTR Attribute handling methods (class scope) + @{ + */ + + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(c,attr,a_float,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(c,attr,a_int,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(c,attr,a_bool,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(c,attr,a_symbol,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(c,attr,a_symbol,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(c,attr,a_LIST,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(c,attr,a_ANY,(methfun)get,(methfun)set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(c,MakeSymbol(attr),get,set); } + static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(c,MakeSymbol(attr),get,set); } + +//! @} FLEXT_C_CATTR + + //! Dump an attribute to the attribute outlet + bool DumpAttrib(const t_symbol *attr) const; + //! Dump an attribute to the attribute outlet + bool DumpAttrib(const char *attr) const { return DumpAttrib(MakeSymbol(attr)); } + + // check for attribute symbol @ + static int CheckAttrib(int argc,const t_atom *argv); + // check for attribute symbol @ + static int CheckAttrib(const AtomList &args,int offset = 0) { return CheckAttrib(args.Count()-offset,args.Atoms()+offset)+offset; } + + //! List attributes + bool ListAttrib() const; + //! List attributes + void ListAttrib(AtomList &a) const; + //! Get an attribute value + bool GetAttrib(const t_symbol *s,AtomList &a) const; + //! Set an attribute value + bool SetAttrib(const t_symbol *s,int argc,const t_atom *argv); + //! Set an attribute value + bool SetAttrib(const t_symbol *s,const AtomList &a) { return SetAttrib(s,a.Count(),a.Atoms()); } + + // get and set the attribute + bool BangAttrib(const t_symbol *a); + // get and set the attribute + bool BangAttrib(const char *a) { return BangAttrib(MakeSymbol(a)); } + // get and set all (both get- and settables) + bool BangAttribAll(); + // show/hide the attribute + bool ShowAttrib(const t_symbol *a,bool show) const; + // show/hide the attribute + bool ShowAttrib(const char *a,bool show) { return ShowAttrib(MakeSymbol(a),show); } + + //! List methods + void ListMethods(AtomList &a,int inlet = 0) const; + +/*! \addtogroup FLEXT_C_INOUT + @{ +*/ + + //! \brief get a code for a list of inlets or outlets + unsigned long XletCode(xlettype tp = xlet_none,...); // end list with 0 (= tp_none) !! + + /*! \brief Add some inlets by a special code representing the types + \remark use XletCode function to get code value + */ + void AddInlets(unsigned long code); + + //! \brief Add one or more inlet(s) + void AddInlet(xlettype tp,int mult = 1,const char *desc = NULL); + + /*! \brief Add some inlets by a special code representing the types + \remark use XletCode function to get code value + */ + void AddOutlets(unsigned long code); + + //! \brief Add one or more outlet(s) + void AddOutlet(xlettype tp,int mult = 1,const char *desc = NULL); + + //! \brief Set the description of an indexed inlet + void DescInlet(int ix,const char *desc); + + //! \brief Set the description of an indexed outlet + void DescOutlet(int ix,const char *desc); + +//! @} FLEXT_C_INOUT + + +// method handling + + public: + + class AttrItem; + + class Item + { + public: + Item(AttrItem *a): attr(a),nxt(NULL) {} + virtual ~Item(); + + bool IsAttr() const { return attr != NULL; } + + AttrItem *attr; + Item *nxt; + }; + + typedef TablePtrMap<const t_symbol *,Item *,8> TablePtrMapDef; + + class ItemSet + :public TablePtrMapDef + { + public: + virtual ~ItemSet(); + virtual void clear(); + }; + + /*! This class holds hashed item entries + \note not thread-safe! + */ + class FLEXT_SHARE ItemCont + { + public: + ItemCont(); + ~ItemCont(); + + int Min() const { return -1; } + int Max() const { return size-2; } + + bool Contained(int i) const { return i+1 < size; } + + //! Add an entry + void Add(Item *it,const t_symbol *tag,int inlet = 0); + //! Remove an entry + bool Remove(Item *it,const t_symbol *tag,int inlet,bool free); + //! Find an entry list in the Item array + Item *FindList(const t_symbol *tag,int inlet = 0); + + //! Get list for an inlet + ItemSet &GetInlet(int inlet = 0) + { + FLEXT_ASSERT(inlet >= Min() && inlet <= Max()); + return *cont[inlet+1]; + } + + //! Get counter for total members (for index of new item) + int Members() const { return members; } + + protected: + + void Resize(int nsz); + + int members; + int memsize,size; + ItemSet **cont; + }; + + //! \brief This represents an item of the method list + class MethItem: + public Item + { + public: + MethItem(AttrItem *conn = NULL); + virtual ~MethItem(); + + void SetArgs(methfun fun,int argc,metharg *args); + + int index; + int argc; + metharg *args; + methfun fun; + }; + + //! \brief This represents an item of the attribute list + class AttrItem: + public Item + { + public: + AttrItem(const t_symbol *tag,metharg tp,methfun fun,int flags); + + enum { + afl_get = 0x01, afl_set = 0x02, + afl_getset = afl_get|afl_set, + afl_shown = 0x08 + }; + + bool IsGet() const { return (flags&afl_getset) == afl_get; } + bool IsSet() const { return (flags&afl_getset) == afl_set; } + bool IsShown() const { return (flags&afl_shown) != 0; } + bool BothExist() const { return counter != NULL; } + AttrItem *Counterpart() { return counter; } + + int index; + int flags; + metharg argtp; + methfun fun; + AttrItem *counter; + const t_symbol *tag; + }; + + //! Represent a data value of an attribute + class AttrData: + public flext_root + { + public: + AttrData(): flags(0) {} + + enum { afl_save = 0x01,afl_init = 0x02,afl_inited = 0x04 }; + + void SetSave(bool s) { if(s) flags |= afl_save; else flags &= ~afl_save; } + bool IsSaved() const { return (flags&afl_save) != 0; } + void SetInit(bool s) { if(s) flags |= afl_init; else flags &= ~afl_init; } + bool IsInit() const { return (flags&afl_init) != 0; } + void SetInitValue(int argc,const t_atom *argv) { init(argc,argv); flags |= afl_inited; } + void SetInitValue(const AtomList &l) { SetInitValue(l.Count(),l.Atoms()); } + bool IsInitValue() const { return (flags&afl_inited) != 0; } + const AtomList &GetInitValue() const { return init; } + + AtomList init; + int flags; + }; + + class AttrDataCont + :public TablePtrMap<const t_symbol *,AttrData *,8> + { + public: + virtual ~AttrDataCont(); + virtual void clear(); + }; + + // these outlet functions don't check for thread but send directly to the real-time system + void ToSysBang(int n) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_bang((t_outlet *)o); CRITOFF(); } } + void ToSysFloat(int n,float f) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_float((t_outlet *)o,f); CRITOFF(); } } + void ToSysInt(int n,int f) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_flint((t_outlet *)o,f); CRITOFF(); } } + void ToSysSymbol(int n,const t_symbol *s) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(s)); CRITOFF(); } } + void ToSysString(int n,const char *s) const { ToSysSymbol(n,MakeSymbol(s)); } + void ToSysList(int n,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_list((t_outlet *)o,const_cast<t_symbol *>(sym_list),argc,(t_atom *)argv); CRITOFF(); } } + void ToSysList(int n,const AtomList &list) const { ToSysList(n,list.Count(),list.Atoms()); } + void ToSysAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_anything((t_outlet *)o,const_cast<t_symbol *>(s),argc,(t_atom *)argv); CRITOFF(); } } + void ToSysAnything(int n,const AtomAnything &any) const { ToSysAnything(n,any.Header(),any.Count(),any.Atoms()); } + void ToSysAnything(int n,const t_symbol *s,const AtomList &list) const { ToSysAnything(n,s,list.Count(),list.Atoms()); } + + void ToSysBool(int n,bool f) const { ToSysInt(n,f?1:0); } + void ToSysAtom(int n,const t_atom &at) const; + void ToSysDouble(int n,double d) const { t_atom dbl[2]; ToSysList(n,2,SetDouble(dbl,d)); } + + static void ToSysMsg(MsgBundle *mb); + + // add class method handlers + static void AddMessageMethods(t_class *c,bool dsp,bool dspin); + +private: + class pxbnd_object; +public: + + //! \brief This represents an item of the symbol-bound method list + class BindItem: + public Item + { + public: + BindItem(bool (*f)(flext_base *,t_symbol *s,int,t_atom *,void *),pxbnd_object *px); + virtual ~BindItem(); + + void Unbind(const t_symbol *s); + + bool (*fun)(flext_base *,t_symbol *s,int,t_atom *,void *); + pxbnd_object *px; + }; + + ItemCont *ThMeths() { if(!methhead) methhead = new ItemCont; return methhead; } + static ItemCont *ClMeths(t_classid c); + + //! \brief This is the central function to add message handlers. It is used by all other AddMethod incarnations. + static void AddMethod(ItemCont *ma,int inlet,const t_symbol *tag,methfun fun,metharg tp,...); + + ItemCont *ThAttrs() { return attrhead; } + static ItemCont *ClAttrs(t_classid c); + + static void AddAttrib(ItemCont *aa,ItemCont *ma,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun); + void AddAttrib(const t_symbol *attr,metharg tp,methfun gfun,methfun sfun); + static void AddAttrib(t_classid c,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun); + +private: + + static inline flext_base *thisObject(flext_hdr *c) { return FLEXT_CAST<flext_base *>(c->data); } + + static void Setup(t_classid c); + + //! \brief This represents either an inlet or outlet during construction + class FLEXT_SHARE xlet { + public: + xlet(); + ~xlet(); + + xlettype tp; + char *desc; + + void Desc(const char *c); + }; + + static xlet inlist[]; + static xlet outlist[]; + + //! current message tag + static const t_symbol *curtag; + //! number of message and signal inlets/outlets + unsigned char incnt,outcnt,insigs,outsigs; + + outlet **outlets; + + union t_any { + float ft; + int it; + bool bt; + const t_symbol *st; +#if FLEXT_SYS == FLEXT_SYS_PD + t_gpointer *pt; +#endif + void *vt; + }; + + typedef bool (*methfun_V)(flext_base *c,int argc,t_atom *argv); + typedef bool (*methfun_A)(flext_base *c,const t_symbol *s,int argc,t_atom *argv); + typedef bool (*methfun_0)(flext_base *c); + typedef bool (*methfun_1)(flext_base *c,t_any &); + typedef bool (*methfun_2)(flext_base *c,t_any &,t_any &); + typedef bool (*methfun_3)(flext_base *c,t_any &,t_any &,t_any &); + typedef bool (*methfun_4)(flext_base *c,t_any &,t_any &,t_any &,t_any &); + typedef bool (*methfun_5)(flext_base *c,t_any &,t_any &,t_any &,t_any &,t_any &); + + mutable ItemCont *methhead; + mutable ItemCont *bindhead; + + bool FindMeth(int inlet,const t_symbol *s,int argc,const t_atom *argv); + bool FindMethAny(int inlet,const t_symbol *s,int argc,const t_atom *argv); + bool TryMethTag(Item *lst,const t_symbol *tag,int argc,const t_atom *argv); + bool TryMethSym(Item *lst,const t_symbol *s); + bool TryMethAny(Item *lst,const t_symbol *s,int argc,const t_atom *argv); + + mutable ItemCont *attrhead; + mutable AttrDataCont *attrdata; + + AttrItem *FindAttrib(const t_symbol *tag,bool get,bool msg = false) const; + + bool InitAttrib(int argc,const t_atom *argv); + + bool DumpAttrib(const t_symbol *tag,AttrItem *a) const; + bool GetAttrib(const t_symbol *tag,AttrItem *a,AtomList &l) const; + bool SetAttrib(const t_symbol *tag,AttrItem *a,int argc,const t_atom *argv); + bool SetAttrib(const t_symbol *tag,AttrItem *a,const AtomList &l) { return SetAttrib(tag,a,l.Count(),l.Atoms()); } + // get and set the attribute + bool BangAttrib(const t_symbol *tag,AttrItem *a); + // show/hide the attribute + bool ShowAttrib(AttrItem *a,bool show) const; + + static bool cb_ListMethods(flext_base *c,int argc,const t_atom *argv); + static bool cb_ListAttrib(flext_base *c) { Locker lock(c); return c->ListAttrib(); } + + // queue stuff + + //! Start message queue + static void StartQueue(); +#if FLEXT_QMODE == 2 + //! Queue worker function + static void QWorker(thr_params *); +#endif + //! Flush messages in the queue + static void QFlush(flext_base *th = NULL); + + static bool qustarted; + +#if FLEXT_SYS == FLEXT_SYS_PD + + static void SetGfx(t_classid c); + +#ifndef FLEXT_NOATTREDIT + // attribute editor + static bool cb_AttrDialog(flext_base *c,int argc,const t_atom *argv); + static void cb_GfxProperties(flext_hdr *c, t_glist *); +#endif + +#ifdef FLEXT_ATTRHIDE + static void cb_GfxVis(flext_hdr *c, t_glist *gl, int vis); + static void cb_GfxSave(flext_hdr *c, t_binbuf *b); + static void cb_GfxSelect(flext_hdr *x, struct _glist *glist, int state); + + void BinbufArgs(t_binbuf *b,t_binbuf *args,bool withname,bool transdoll); + void BinbufAttr(t_binbuf *b,bool transdoll); +#endif + + static void cb_bang(flext_hdr *c); + static void cb_float(flext_hdr *c,t_float f); + static void cb_symbol(flext_hdr *c,const t_symbol *s); +// static void cb_pointer(fltext_hdr *c,const t_gpointer *p); + static void cb_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv); + + // proxy object (for additional inlets) + static t_class *px_class; + + struct px_object // no virtual table! + { + t_object obj; // MUST reside at memory offset 0 + flext_base *base; + int index; + + void init(flext_base *b,int ix) { base = b; index = ix; } + static void px_bang(px_object *c); + static void px_float(px_object *c,t_float f); + static void px_symbol(px_object *c,const t_symbol *s); +// static void px_pointer(px_object *c,const t_gpointer *p); + static void px_anything(px_object *c,const t_symbol *s,int argc,t_atom *argv); + }; + + static void cb_px_ft1(flext_hdr *c,t_float f); + static void cb_px_ft2(flext_hdr *c,t_float f); + static void cb_px_ft3(flext_hdr *c,t_float f); + static void cb_px_ft4(flext_hdr *c,t_float f); + static void cb_px_ft5(flext_hdr *c,t_float f); + static void cb_px_ft6(flext_hdr *c,t_float f); + static void cb_px_ft7(flext_hdr *c,t_float f); + static void cb_px_ft8(flext_hdr *c,t_float f); + static void cb_px_ft9(flext_hdr *c,t_float f); + +#elif FLEXT_SYS == FLEXT_SYS_MAX + typedef object px_object; + static void cb_bang(flext_hdr *c); + static void cb_float(flext_hdr *c,double f); + static void cb_int(flext_hdr *c,long v); + static void cb_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv); + + static void cb_px_in1(flext_hdr *c,long v); + static void cb_px_in2(flext_hdr *c,long v); + static void cb_px_in3(flext_hdr *c,long v); + static void cb_px_in4(flext_hdr *c,long v); + static void cb_px_in5(flext_hdr *c,long v); + static void cb_px_in6(flext_hdr *c,long v); + static void cb_px_in7(flext_hdr *c,long v); + static void cb_px_in8(flext_hdr *c,long v); + static void cb_px_in9(flext_hdr *c,long v); + + static void cb_px_ft1(flext_hdr *c,double f); + static void cb_px_ft2(flext_hdr *c,double f); + static void cb_px_ft3(flext_hdr *c,double f); + static void cb_px_ft4(flext_hdr *c,double f); + static void cb_px_ft5(flext_hdr *c,double f); + static void cb_px_ft6(flext_hdr *c,double f); + static void cb_px_ft7(flext_hdr *c,double f); + static void cb_px_ft8(flext_hdr *c,double f); + static void cb_px_ft9(flext_hdr *c,double f); +#endif + + px_object **inlets; + + // --------- symbol-bound proxy + + static t_class *pxbnd_class; + + class pxbnd_object: + public flext_root + // no virtual table! + { + public: + t_object obj; // MUST reside at memory offset 0 + flext_base *base; + BindItem *item; + void *data; + + void init(flext_base *b,BindItem *it,void *d) { base = b; item = it; data = d; } + static void px_method(pxbnd_object *c,const t_symbol *s,int argc,t_atom *argv); + }; + + //! create proxy class for symbol binding + static void SetupBindProxy(); + + // --------- + + //! set up inlet proxies + static void SetProxies(t_class *c,bool dsp); + + //! initialize inlets (according to class or object constructor definitions) + bool InitInlets(); + + //! initialize outlets (according to class or object constructor definitions) + bool InitOutlets(); + + // callback functions + + static void cb_loadbang(flext_hdr *c); + +#if FLEXT_SYS == FLEXT_SYS_MAX + char **indesc,**outdesc; + + static void cb_assist(flext_hdr *c,void *b,long msg,long arg,char *s); + static void cb_click (flext_hdr *c, Point pt, short mods); + + static void cb_dsp(flext_hdr *c,t_signal **s,short *count); +#elif FLEXT_SYS == FLEXT_SYS_PD + static void cb_click(flext_hdr *z,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt); + + static void cb_dsp(flext_hdr *c,t_signal **s); +#endif +}; + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flcontainers.h b/externals/grill/trunk/flext/source/flcontainers.h new file mode 100644 index 0000000000000000000000000000000000000000..7fe3e16379b243a7751f269d6da49bf37710fe69 --- /dev/null +++ b/externals/grill/trunk/flext/source/flcontainers.h @@ -0,0 +1,171 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flcontainers.h + \brief Lock-free container classes +*/ + +#ifndef __FLCONTAINERS_H +#define __FLCONTAINERS_H + +#include "flprefix.h" + +#include "lockfree/stack.hpp" +#include "lockfree/fifo.hpp" + +#include "flpushns.h" + +class LifoCell: public lockfree::stack_node {}; + +class Lifo + : public lockfree::intrusive_stack<LifoCell> +{ +public: + inline void Push(LifoCell *cell) { this->push(cell); } + inline LifoCell *Pop() { return this->pop(); } + inline bool Avail() const { return !this->empty(); } +}; + +template <typename T> +class TypedLifo + : public Lifo +{ +public: + inline void Push(T *c) { Lifo::Push(static_cast<T *>(c)); } + inline T *Pop() { return static_cast<T *>(Lifo::Pop()); } +}; + +template <typename T> +class ValueLifoCell + : public LifoCell +{ +public: + ValueLifoCell(T v): value(v) {} + T value; +}; + +template <typename T> +class ValueLifo + : public TypedLifo<ValueLifoCell<T> > +{ +public: + inline void Push(T v) + { + TypedLifo<ValueLifoCell<T> >::Push(new ValueLifoCell<T>(v)); + } + + inline T Pop() + { + ValueLifoCell<T> *p = TypedLifo<ValueLifoCell<T> >::Pop(); + T v = p->value; + delete p; + return v; + } +}; + +template <typename T,int M = 2,int O = 1> +class PooledLifo + : public TypedLifo<T> +{ +public: + PooledLifo(): sz(0),resz(0) {} + + void Push(T *c) { TypedLifo<T>::Push(c); ++sz; } + T *Pop() { T *r = TypedLifo<T>::Pop(); if(r) --sz; return r; } + + T *New() + { + T *n = reuse.Pop(); + if(n) { + --resz; + return n; + } + else + return new T; + } + + inline void Free(T *p) + { + if(resz < sz*M+O) { reuse.Push(p); ++resz; } + else delete p; + } +private: + TypedLifo<T> reuse; + size_t sz,resz; +}; + + +class FifoCell: public lockfree::fifo_node {}; + +class Fifo + : public lockfree::intrusive_fifo<FifoCell> +{ +public: + inline void Put(FifoCell *cl) { this->enqueue(cl); } + inline FifoCell *Get() { return this->dequeue(); } + inline bool Avail() const { return !this->empty(); } +}; + + +template <typename T> +class TypedFifo + : public Fifo +{ +public: + inline void Put(T *c) { Fifo::Put(static_cast<T *>(c)); } + inline T *Get() { return static_cast<T *>(Fifo::Get()); } +}; + + +template <typename T> +class ValueFifoCell + : public FifoCell +{ +public: + ValueFifoCell(T v): value(v) {} + T value; +}; + +template <typename T> +class ValueFifo + : public TypedFifo<ValueFifoCell<T> > +{ +public: + inline void Put(T v) + { + TypedFifo<ValueFifoCell<T> >::Put(new ValueFifoCell<T>(v)); + } + + inline T Get() + { + ValueFifoCell<T> *p = TypedFifo<ValueFifoCell<T> >::Get(); + T v = p->value; + delete p; + return v; + } +}; + + +template <typename T,int M = 2,int O = 1> +class PooledFifo + : public TypedFifo<T> +{ +public: + ~PooledFifo() { T *n; while((n = reuse.Get()) != NULL) delete n; } + + inline T *New() { T *n = reuse.Get(); return n?n:new T; } + inline void Free(T *p) { if(resz < sz*M+O) reuse.Put(p); else delete p; } +private: + TypedFifo<T> reuse; + size_t sz,resz; +}; + +#include "flpopns.h" + +#endif + diff --git a/externals/grill/trunk/flext/source/flcwmax-thr.h b/externals/grill/trunk/flext/source/flcwmax-thr.h new file mode 100644 index 0000000000000000000000000000000000000000..4167be9f10dd2be6faf479469fa7d5be596c0549 --- /dev/null +++ b/externals/grill/trunk/flext/source/flcwmax-thr.h @@ -0,0 +1,31 @@ +/* + +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2003 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. + +*/ + +/*! \file flcwmax-thr.h + \brief Prefix file for CodeWarrior projects - OS 9 threaded version. +*/ + +#ifndef _FLEXT_CW_MAX_THR_H +#define _FLEXT_CW_MAX_THR_H + +#define FLEXT_THREADS + +/* + old CodeWarrior version (<= 6) don't have sigset_t defined which + is needed for pthreads +*/ +#if defined(__MWERKS__) && (__MWERKS__ == 1) // read __MWERKS__ numbering starts with CW7 + typedef unsigned int sigset_t; + #define _CW_NOPRECOMP // no precompiled headers +#endif + +#include "flcwmax.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flcwmax-x-thr.h b/externals/grill/trunk/flext/source/flcwmax-x-thr.h new file mode 100644 index 0000000000000000000000000000000000000000..93b782895b941e89d5247164301a365f0b548293 --- /dev/null +++ b/externals/grill/trunk/flext/source/flcwmax-x-thr.h @@ -0,0 +1,31 @@ +/* + +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2003 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. + +*/ + +/*! \file flcwmax-x-thr.h + \brief Prefix file for CodeWarrior projects - OS X threaded version. +*/ + +#ifndef _FLEXT_CW_MAX_X_THR_H +#define _FLEXT_CW_MAX_X_THR_H + +#define FLEXT_THREADS + +/* + old CodeWarrior version (<= 6) don't have sigset_t defined which + is needed for pthreads +*/ +#if defined(__MWERKS__) && (__MWERKS__ == 1) // read __MWERKS__ numbering starts with CW7 + typedef unsigned int sigset_t; + #define _CW_NOPRECOMP // no precompiled headers +#endif + +#include "flcwmax-x.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flcwmax-x.h b/externals/grill/trunk/flext/source/flcwmax-x.h new file mode 100644 index 0000000000000000000000000000000000000000..e1e340d26e36db6878e3a7e7404658f16c3cf57f --- /dev/null +++ b/externals/grill/trunk/flext/source/flcwmax-x.h @@ -0,0 +1,24 @@ +/* + +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2003 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. + +*/ + +/*! \file flcwmax-x.h + \brief Prefix file for CodeWarrior projects - OS X version. +*/ + +#ifndef _FLEXT_CW_MAX_X_H +#define _FLEXT_CW_MAX_X_H + +//#define TARGET_API_MAC_CARBON 1 +#define _POSIX_C_SOURCE +#define _POSIX_SOURCE + +#include "flcwmax.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flcwmax.h b/externals/grill/trunk/flext/source/flcwmax.h new file mode 100644 index 0000000000000000000000000000000000000000..4d108e2e8d8f8925ea0e11ca7802d24db190a314 --- /dev/null +++ b/externals/grill/trunk/flext/source/flcwmax.h @@ -0,0 +1,36 @@ +/* + +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2003 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. + +*/ + +/*! \file flcwmax.h + \brief Prefix file for CodeWarrior projects - OS 9 version. +*/ + +#ifndef _FLEXT_CW_MAX_H +#define _FLEXT_CW_MAX_H + +#ifndef __MWERKS__ + #error "This header file is for CodeWarrior only." +#endif + +#define FLEXT_SYS 1 +#define FLEXT_USE_SIMD + +#ifndef _CW_NOPRECOMP + #include <MacHeaders.h> +#endif + +#if /*__option(sym) ||*/ !__option(opt_dead_code) + #pragma message("Optimization disabled -> Compiling a debug version (with FLEXT_DEBUG)") + #define FLEXT_DEBUG +#endif + +/* #define _LOG */ + +#endif diff --git a/externals/grill/trunk/flext/source/flcwpd-x-thr.h b/externals/grill/trunk/flext/source/flcwpd-x-thr.h new file mode 100644 index 0000000000000000000000000000000000000000..d307506916c029894f0a9938a640077187d81ae0 --- /dev/null +++ b/externals/grill/trunk/flext/source/flcwpd-x-thr.h @@ -0,0 +1,31 @@ +/* + +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2003 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. + +*/ + +/* This is the prefix file for CodeWarrior projects - OS X version */ + +#ifndef _FLEXT_CW_PD_X_THR_H +#define _FLEXT_CW_PD_X_THR_H + +#define FLEXT_THREADS + +#if 0 +/* + old CodeWarrior version (<= 6) don't have sigset_t defined which + is needed for pthreads +*/ +#if defined(__MWERKS__) && (__MWERKS__ <= 0x6000) + typedef unsigned int sigset_t; + #define _CW_NOPRECOMP // no precompiled headers +#endif +#endif + +#include "flcwpd-x.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flcwpd-x.h b/externals/grill/trunk/flext/source/flcwpd-x.h new file mode 100644 index 0000000000000000000000000000000000000000..f6b5192ba2ab265b5a00a9d07923a93857ed2434 --- /dev/null +++ b/externals/grill/trunk/flext/source/flcwpd-x.h @@ -0,0 +1,37 @@ +/* + +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001-2003 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. + +*/ + +/* This is the prefix file for CodeWarrior projects - OS X version */ + +#ifndef _FLEXT_CW_PD_X_H +#define _FLEXT_CW_PD_X_H + +#ifndef __MWERKS__ + #error "This header file is for CodeWarrior only." +#endif + +#define FLEXT_SYS 2 +#define FLEXT_USE_SIMD + +#define TARGET_API_MAC_CARBON 1 +#define _POSIX_C_SOURCE + +#ifndef _CW_NOPRECOMP +// #include <MacHeadersMach-O.h> +// #include <MSL MacHeadersMach-O.h> +#endif + +#if __option(sym) || !__option(opt_dead_code) + #define FLEXT_DEBUG +#endif + +/* #define _LOG */ + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs.h b/externals/grill/trunk/flext/source/fldefs.h new file mode 100644 index 0000000000000000000000000000000000000000..36adcf842b774dc2687cef66993ac59432e34529 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs.h @@ -0,0 +1,68 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs.h + \brief This file includes all the #define header files +*/ + +#ifndef __FLEXT_DEFS_H +#define __FLEXT_DEFS_H + +/*! \defgroup FLEXT_DEFS Definitions for basic flext functionality + @{ +*/ + +/*! \brief Switch for compilation of derived virtual classes + \remark These need dynamic type casts (and RTTI, naturally) + \ingroup FLEXT_GLOBALS +*/ +#ifdef FLEXT_VIRT +#define FLEXT_CAST dynamic_cast +#else +#define FLEXT_CAST static_cast +#endif + +//! @} FLEXT_DEFS + +#include "fldefs_hdr.h" + +#include "fldefs_setup.h" + + +// ==================================================================================== + +/*! \defgroup FLEXT_D_METHOD Declarations for flext methods + @{ +*/ + +#include "fldefs_methcb.h" +#include "fldefs_meththr.h" +#include "fldefs_methadd.h" +#include "fldefs_methbind.h" +#include "fldefs_methcall.h" + +//! @} FLEXT_D_METHOD + + + +#ifdef FLEXT_ATTRIBUTES + +/*! \defgroup FLEXT_D_ATTRIB Attribute definition + \note These have to reside inside the class declaration + @{ +*/ + +#include "fldefs_attrcb.h" +#include "fldefs_attrvar.h" +#include "fldefs_attradd.h" + +//! @} FLEXT_D_ATTRIB + +#endif // FLEXT_ATTRIBUTES + +#endif // __FLEXT_DEFS_H diff --git a/externals/grill/trunk/flext/source/fldefs_attradd.h b/externals/grill/trunk/flext/source/fldefs_attradd.h new file mode 100644 index 0000000000000000000000000000000000000000..a6982bb29570e7d29b009fd3337d9c9517f1f242 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_attradd.h @@ -0,0 +1,119 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_attradd.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_ATTRADD_H +#define __FLEXT_DEFS_ATTRADD_H + + +/*! \defgroup FLEXT_D_CADDATTR Announce object attributes at class scope + \ingroup FLEXT_D_ATTRIB + \note These can only be used at class construction time + @{ +*/ + +//! Add handler for a gettable attribute +#define FLEXT_CADDATTR_GET(CL,NAME,GFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL) + +//! Add handler for a settable attribute +#define FLEXT_CADDATTR_SET(CL,NAME,SFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),NULL,(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable attribute +#define FLEXT_CADDATTR_VAR(CL,NAME,GFUN,SFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable attribute +#define FLEXT_CADDATTR_VAR1(CL,NAME,FUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN))) + + +//! Add handler for a gettable enum attribute +#define FLEXT_CADDATTR_GET_E(CL,NAME,GFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL) + +//! Add handler for a settable enum attribute +#define FLEXT_CADDATTR_SET_E(CL,NAME,SFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable enum attribute +#define FLEXT_CADDATTR_VAR_E(CL,NAME,GFUN,SFUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable enum attribute +#define FLEXT_CADDATTR_VAR1_E(CL,NAME,FUN) \ +\ +AddAttrib(CL,flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN))) + +//! @} FLEXT_D_CADDATTR + + +/*! \defgroup FLEXT_D_ADDATTR Announce object attributes + \ingroup FLEXT_D_ATTRIB + \note These can only be used at object construction time + \note (in constructor or in Init() function before call to parent's Init()) + @{ +*/ + +//! Add handler for a gettable attribute +#define FLEXT_ADDATTR_GET(NAME,GFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),NULL) + +//! Add handler for a settable attribute +#define FLEXT_ADDATTR_SET(NAME,SFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),NULL,(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable attribute +#define FLEXT_ADDATTR_VAR(NAME,GFUN,SFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable attribute +#define FLEXT_ADDATTR_VAR1(NAME,FUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN))) + + +//! Add handler for a gettable enum attribute +#define FLEXT_ADDATTR_GET_E(NAME,GFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL) + +//! Add handler for a settable enum attribute +#define FLEXT_ADDATTR_SET_E(NAME,SFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable enum attribute +#define FLEXT_ADDATTR_VAR_E(NAME,GFUN,SFUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN))) + +//! Add handlers for a both get- and settable enum attribute +#define FLEXT_ADDATTR_VAR1_E(NAME,FUN) \ +\ +AddAttrib(flext::MakeSymbol(NAME),(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN))) + +//! @} FLEXT_D_ADDATTR + + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_attrcb.h b/externals/grill/trunk/flext/source/fldefs_attrcb.h new file mode 100644 index 0000000000000000000000000000000000000000..0584d16dc08043548c1898ecede381511e76faf2 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_attrcb.h @@ -0,0 +1,156 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_attrcb.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_ATTRCB_H +#define __FLEXT_DEFS_ATTRCB_H + + + +/*! \brief Declare a attribute set function + \internal +*/ +#define FLEXT_CALLSET_(FUN,TP) \ +static bool FLEXT_SET_PRE(FUN)(flext_base *c,TP &arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; } + +/*! \brief Declare a attribute get function + \internal +*/ +#define FLEXT_CALLGET_(FUN,TP) \ +static bool FLEXT_GET_PRE(FUN)(flext_base *c,TP &arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; } + + + +/*! \defgroup FLEXT_DA_CALLSET Definition of attribute set handlers + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare a set function for a float attribute +#define FLEXT_CALLSET_F(SFUN) \ +\ +FLEXT_CALLSET_(SFUN,float) + +//! Declare a set function for an integer attribute +#define FLEXT_CALLSET_I(SFUN) \ +\ +FLEXT_CALLSET_(SFUN,int) + +//! Declare a set function for a boolean attribute +#define FLEXT_CALLSET_B(SFUN) \ +\ +FLEXT_CALLSET_(SFUN,bool) +/* +static bool FLEXT_SET_PRE(FUN)(flext_base *c,int &arg) \ +{ bool b = arg != 0; FLEXT_CAST<thisType *>(c)->FUN(b); return true; } +*/ + +//! Declare a set function for an enum attribute +#define FLEXT_CALLSET_E(SFUN,TP) \ +\ +FLEXT_CALLSET_(SFUN,TP) + +//! Declare a set function for a symbol attribute +#define FLEXT_CALLSET_S(FUN) \ +static bool FLEXT_SET_PRE(FUN)(flext_base *c,const t_symbol *&arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; } + +//! Declare a set function for a variable list attribute +#define FLEXT_CALLSET_V(FUN) \ +static bool FLEXT_SET_PRE(FUN)(flext_base *c,AtomList *&arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(*arg); return true; } + +//! @} FLEXT_DA_CALLSET + +/*! \defgroup FLEXT_DA_CALLGET Definition of attribute get handlers + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare a get function for a float attribute +#define FLEXT_CALLGET_F(GFUN) \ +\ +FLEXT_CALLGET_(GFUN,float) + +//! Declare a get function for an integer attribute +#define FLEXT_CALLGET_I(GFUN) \ +\ +FLEXT_CALLGET_(GFUN,int) + +//! Declare a get function for a boolean attribute +#define FLEXT_CALLGET_B(GFUN) \ +\ +FLEXT_CALLGET_(GFUN,bool) +/* +static bool FLEXT_GET_PRE(FUN)(flext_base *c,int &arg) \ +{ bool b; FLEXT_CAST<thisType *>(c)->FUN(b); arg = b?1:0; return true; } +*/ + +//! Declare a get function for an enum attribute +#define FLEXT_CALLGET_E(GFUN,TP) \ +\ +FLEXT_CALLGET_(GFUN,TP) + +//! Declare a get function for a symbol attribute +#define FLEXT_CALLGET_S(FUN) \ +static bool FLEXT_GET_PRE(FUN)(flext_base *c,const t_symbol *&arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; } + +//! Declare a get function for a variable list attribute +#define FLEXT_CALLGET_V(FUN) \ +static bool FLEXT_GET_PRE(FUN)(flext_base *c,AtomList *&arg) \ +{ FLEXT_CAST<thisType *>(c)->FUN(*arg); return true; } + +//! @} FLEXT_DA_CALLGET + + +/*! \defgroup FLEXT_DA_CALLVAR Definition of attribute transfer handlers (both get and set) + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare both get and set functions for a float attribute +#define FLEXT_CALLVAR_F(GFUN,SFUN) \ +\ +FLEXT_CALLGET_F(GFUN) FLEXT_CALLSET_F(SFUN) + +//! Declare both get and set functions for an integer attribute +#define FLEXT_CALLVAR_I(GFUN,SFUN) \ +\ +FLEXT_CALLGET_I(GFUN) FLEXT_CALLSET_I(SFUN) + +//! Declare both get and set functions for a symbol attribute +#define FLEXT_CALLVAR_S(GFUN,SFUN) \ +\ +FLEXT_CALLGET_S(GFUN) FLEXT_CALLSET_S(SFUN) + +//! Declare both get and set functions for a boolean attribute +#define FLEXT_CALLVAR_B(GFUN,SFUN) \ +\ +FLEXT_CALLGET_B(GFUN) FLEXT_CALLSET_B(SFUN) + +//! Declare both get and set functions for an enum attribute +#define FLEXT_CALLVAR_E(GFUN,SFUN,TP) \ +\ +FLEXT_CALLGET_E(GFUN,TP) FLEXT_CALLSET_E(SFUN,TP) + +//! Declare both get and set functions for a variable list attribute +#define FLEXT_CALLVAR_V(GFUN,SFUN) \ +\ +FLEXT_CALLGET_V(GFUN) FLEXT_CALLSET_V(SFUN) + +//! @} FLEXT_DA_CALLVAR + + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_attrvar.h b/externals/grill/trunk/flext/source/fldefs_attrvar.h new file mode 100644 index 0000000000000000000000000000000000000000..aa2fb412517254ec2fa15ec785f09bac508d9b30 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_attrvar.h @@ -0,0 +1,156 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_attrvar.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_ATTRVAR_H +#define __FLEXT_DEFS_ATTRVAR_H + + +/*! \brief Declare an implicit attribute set function + \internal +*/ +#define FLEXT_ATTRSET_(VAR,TP) \ +static bool FLEXT_SET_PRE(VAR)(flext_base *c,TP &arg) \ +{ FLEXT_CAST<thisType *>(c)->VAR = arg; return true; } + +/*! \brief Declare an implicit attribute get function + \internal +*/ +#define FLEXT_ATTRGET_(VAR,TP) \ +static bool FLEXT_GET_PRE(VAR)(flext_base *c,TP &arg) \ +{ arg = (TP)FLEXT_CAST<thisType *>(c)->VAR; return true; } + + + +/*! \defgroup FLEXT_DA_ATTRSET Definition of implicit attribute set handlers + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare an implicit set function for a float attribute +#define FLEXT_ATTRSET_F(VAR) \ +\ +FLEXT_ATTRSET_(VAR,float) + +//! Declare an implicit set function for an integer attribute +#define FLEXT_ATTRSET_I(VAR) \ +\ +FLEXT_ATTRSET_(VAR,int) + +//! Declare an implicit set function for a symbol attribute +#define FLEXT_ATTRSET_S(VAR) \ +\ +FLEXT_ATTRSET_(VAR,const t_symbol *) + +//! Declare an implicit set function for a boolean attribute +#define FLEXT_ATTRSET_B(VAR) \ +\ +FLEXT_ATTRSET_(VAR,bool) +/* +static bool FLEXT_SET_PRE(VAR)(flext_base *c,int &arg) \ +{ FLEXT_CAST<thisType *>(c)->VAR = arg != 0; return true; } +*/ + +//! Declare an implicit set function for an enum attribute +#define FLEXT_ATTRSET_E(VAR,TP) \ +\ +FLEXT_ATTRSET_(VAR,TP) + +//! Declare an implicit set function for a variable list attribute +#define FLEXT_ATTRSET_V(VAR) \ +static bool FLEXT_SET_PRE(VAR)(flext_base *c,AtomList *&arg) \ +{ FLEXT_CAST<thisType *>(c)->VAR = *arg; return true; } + +//! @} FLEXT_DA_ATTRSET + +/*! \defgroup FLEXT_DA_ATTRGET Definition of implicit attribute get handlers + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare an implicit get function for a float attribute +#define FLEXT_ATTRGET_F(VAR) \ +\ +FLEXT_ATTRGET_(VAR,float) + +//! Declare an implicit get function for an integer attribute +#define FLEXT_ATTRGET_I(VAR) \ +\ +FLEXT_ATTRGET_(VAR,int) + +//! Declare an implicit get function for a symbol attribute +#define FLEXT_ATTRGET_S(VAR) \ +\ +FLEXT_ATTRGET_(VAR,const t_symbol *) + +//! Declare an implicit get function for a boolean attribute +#define FLEXT_ATTRGET_B(VAR) \ +\ +FLEXT_ATTRGET_(VAR,bool) +/* +static bool FLEXT_GET_PRE(VAR)(flext_base *c,int &arg) \ +{ arg = FLEXT_CAST<thisType *>(c)->VAR?1:0; return true; } +*/ + +//! Declare an implicit get function for an enum attribute +#define FLEXT_ATTRGET_E(VAR,TP) \ +\ +FLEXT_ATTRGET_(VAR,TP) + +//! Declare an implicit get function for a variable list attribute +#define FLEXT_ATTRGET_V(VAR) \ +static bool FLEXT_GET_PRE(VAR)(flext_base *c,AtomList *&arg) \ +{ *arg = FLEXT_CAST<thisType *>(c)->VAR; return true; } + +//! @} FLEXT_DA_ATTRGET + + +/*! \defgroup FLEXT_DA_ATTRVAR Definition of implicit attribute transfer handlers (both get and set) + \ingroup FLEXT_D_ATTRIB + @{ +*/ + +//! Declare both implicit get and set functions for a float attribute +#define FLEXT_ATTRVAR_F(VAR) \ +\ +FLEXT_ATTRGET_F(VAR) FLEXT_ATTRSET_F(VAR) + +//! Declare both implicit get and set functions for an integer attribute +#define FLEXT_ATTRVAR_I(VAR) \ +\ +FLEXT_ATTRGET_I(VAR) FLEXT_ATTRSET_I(VAR) + +//! Declare both implicit get and set functions for a symbol attribute +#define FLEXT_ATTRVAR_S(VAR) \ +\ +FLEXT_ATTRGET_S(VAR) FLEXT_ATTRSET_S(VAR) + +//! Declare both implicit get and set functions for a boolean attribute +#define FLEXT_ATTRVAR_B(VAR) \ +\ +FLEXT_ATTRGET_B(VAR) FLEXT_ATTRSET_B(VAR) + +//! Declare both implicit get and set functions for an enum attribute +#define FLEXT_ATTRVAR_E(VAR,TP) \ +\ +FLEXT_ATTRGET_(VAR,TP) FLEXT_ATTRSET_(VAR,TP) + +//! Declare both implicit get and set functions for a variable list attribute +#define FLEXT_ATTRVAR_V(VAR) \ +\ +FLEXT_ATTRGET_V(VAR) FLEXT_ATTRSET_V(VAR) + + +//! @} FLEXT_DA_ATTRVAR + + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_hdr.h b/externals/grill/trunk/flext/source/fldefs_hdr.h new file mode 100644 index 0000000000000000000000000000000000000000..78bd8e659a686fb4dc0588325fd30de71855054b --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_hdr.h @@ -0,0 +1,59 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_hdr.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_HEADER_H +#define __FLEXT_DEFS_HEADER_H + + +/*! \defgroup FLEXT_D_HEADER Flext class header + \note One (and only one!) of these definitions is compulsory for the class declaration. + \note It has to be placed somewhere in the class definition (not necessarily in a public section). + + @{ +*/ + +/*! \brief Plain flext class header + \param NEW_CLASS name of the current C++ class + \param PARENT_CLASS name of the base C++ class (e.g. flext_base or flext_dsp) +*/ +#define FLEXT_HEADER(NEW_CLASS,PARENT_CLASS) \ +\ +FLEXT_REALHDR(NEW_CLASS, PARENT_CLASS) + +#define FLEXT_HEADER_T(NEW_CLASS,PARENT_CLASS) \ +\ +FLEXT_REALHDR_T(NEW_CLASS, PARENT_CLASS) + +/*! \brief Flext class header with setup function + \param NEW_CLASS name of the current C++ class + \param PARENT_CLASS name of the base C++ class (e.g. flext_base or flext_dsp) + \param SETUPFUN setup function, of type "void (*setupfn)(t_class *)" + + The setup function is called after class creation. It corresponds to the + original PD "[object]_setup" function, apart from the + fact that all necessary class initializations have already been taken care of by flext. + The setup function can e.g. be used for a message to the console upon first creation of an object. +*/ +#define FLEXT_HEADER_S(NEW_CLASS, PARENT_CLASS, SETUPFUN)\ +\ +FLEXT_REALHDR_S(NEW_CLASS, PARENT_CLASS, SETUPFUN) + +#define FLEXT_HEADER_TS(NEW_CLASS, PARENT_CLASS, SETUPFUN)\ +\ +FLEXT_REALHDR_TS(NEW_CLASS, PARENT_CLASS, SETUPFUN) + + +//! @} FLEXT_D_HEADER + + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_methadd.h b/externals/grill/trunk/flext/source/fldefs_methadd.h new file mode 100644 index 0000000000000000000000000000000000000000..0dff4dfb02ddc981a2adcf04c4f0a13d8a181177 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_methadd.h @@ -0,0 +1,231 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_methadd.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHADD_H +#define __FLEXT_DEFS_METHADD_H + + +/*! \defgroup FLEXT_D_CADDMETHOD Add flext methods within class scope + \ingroup FLEXT_D_METHOD + \note These can only be used at class construction time + @{ +*/ + +/*! Add a method handler for bang + \note This is for compatibility - better use the method below +*/ +#define FLEXT_CADDBANG(CL,IX,M_FUN) \ +\ +AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN)) + +//! Add a handler for a method with either no, list or anything arguments +#define FLEXT_CADDMETHOD(CL,IX,M_FUN) \ +\ +AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN)) + +//! Add a a handler for a method with implicit arguments +#define FLEXT_CADDMETHOD_(CL,IX,M_TAG,M_FUN) \ +\ +AddMethod(CL,IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN)) + +//! Add a handler for a method with 1 enum type argument +#define FLEXT_CADDMETHOD_E(CL,IX,M_TAG,M_FUN) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null) + +//! Add a handler for a method with 1 argument +#define FLEXT_CADDMETHOD_1(CL,IX,M_TAG,M_FUN,TP1) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null) + +//! Add a handler for a method with 2 arguments +#define FLEXT_CADDMETHOD_2(CL,IX,M_TAG,M_FUN,TP1,TP2) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null) + +//! Add a handler for a method with 3 arguments +#define FLEXT_CADDMETHOD_3(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null) + +//! Add a handler for a method with 4 arguments +#define FLEXT_CADDMETHOD_4(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null) + +//! Add a handler for a method with 5 arguments +#define FLEXT_CADDMETHOD_5(CL,IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \ +\ +AddMethod(ClMeths(CL),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null) + + +// Shortcuts + +//! Add a handler for a method with a boolean argument +#define FLEXT_CADDMETHOD_B(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,bool) + +//! Add a handler for a method with 1 float argument +#define FLEXT_CADDMETHOD_F(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float) + +//! Add a handler for a method with 2 float arguments +#define FLEXT_CADDMETHOD_FF(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_2(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float,float) + +//! Add a handler for a method with 3 float arguments +#define FLEXT_CADDMETHOD_FFF(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_3(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,float,float,float) + +//! Add a handler for a method with 1 integer argument +#define FLEXT_CADDMETHOD_I(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_1(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int) + +//! Add a handler for a method with 2 integer arguments +#define FLEXT_CADDMETHOD_II(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_2(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int,int) + +//! Add a handler for a method with 3 integer arguments +#define FLEXT_CADDMETHOD_III(CL,IX,M_TAG,M_FUN) \ +\ +FLEXT_CADDMETHOD_3(CL,IX,flext::MakeSymbol(M_TAG),M_FUN,int,int,int) + +//! @} FLEXT_D_CADDMETHOD + + +/*! \defgroup FLEXT_D_ADDMETHOD Add flext methods + \ingroup FLEXT_D_METHOD + \note These can only be used at object construction time + \note (in constructor or in Init() function before call to parent's Init()) + @{ +*/ + +//! Set timer callback +#define FLEXT_ADDTIMER(TMR,M_FUN) \ +\ +TMR.SetCallback(*this,FLEXT_CALL_PRE(M_FUN)) + +//! Enable list element distribution over inlets (if no better handler found) +#define FLEXT_ADDDIST() \ +\ +SetDist(true) + +//! Add a method handler for bang +#define FLEXT_ADDBANG(IX,M_FUN) \ +\ +AddMethod(IX,"bang",FLEXT_CALL_PRE(M_FUN)) + +//! Add a handler for a method with either no, list or anything arguments +#define FLEXT_ADDMETHOD(IX,M_FUN) \ +\ +AddMethod(IX,FLEXT_CALL_PRE(M_FUN)) + +/*! \brief Add a handler for a method with a (variable argument) list + \deprecated This definition obscures that _ indicates the usage of a message tag - use FLEXT_ADDMETHOD instead + \note This is already covered by FLEXT_ADDMETHOD, but here for the sake of clarity +*/ +#define FLEXT_ADDMETHOD_V(IX,M_FUN) \ +\ +AddMethod(IX,FLEXT_CALL_PRE(M_FUN)) + +/*! \brief Add a handler for a method with an anything argument + \deprecated This definition obscures that _ indicates the usage of a message tag - use FLEXT_ADDMETHOD instead + \note This is already covered by FLEXT_ADDMETHOD, but here for the sake of clarity +*/ +#define FLEXT_ADDMETHOD_A(IX,M_FUN) \ +\ +AddMethod(IX,FLEXT_CALL_PRE(M_FUN)) + +//! Add a a handler for a tagged method with implicit arguments +#define FLEXT_ADDMETHOD_(IX,M_TAG,M_FUN) \ +\ +AddMethod(IX,flext::MakeSymbol(M_TAG),FLEXT_CALL_PRE(M_FUN)) + +//! Add a handler for a method with 1 enum type argument +#define FLEXT_ADDMETHOD_E(IX,M_TAG,M_FUN) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),a_int,a_null) + +//! Add a handler for a method with 1 argument +#define FLEXT_ADDMETHOD_1(IX,M_TAG,M_FUN,TP1) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),a_null) + +//! Add a handler for a method with 2 arguments +#define FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,TP1,TP2) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),a_null) + +//! Add a handler for a method with 3 arguments +#define FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,TP1,TP2,TP3) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),a_null) + +//! Add a handler for a method with 4 arguments +#define FLEXT_ADDMETHOD_4(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),a_null) + +//! Add a handler for a method with 5 arguments +#define FLEXT_ADDMETHOD_5(IX,M_TAG,M_FUN,TP1,TP2,TP3,TP4,TP5) \ +\ +AddMethod(ThMeths(),IX,flext::MakeSymbol(M_TAG),(methfun)(FLEXT_CALL_PRE(M_FUN)),FLEXTARG(TP1),FLEXTARG(TP2),FLEXTARG(TP3),FLEXTARG(TP4),FLEXTARG(TP5),a_null) + + +// Shortcuts + +//! Add a handler for a method with a boolean argument +#define FLEXT_ADDMETHOD_B(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,bool) + +//! Add a handler for a method with 1 float argument +#define FLEXT_ADDMETHOD_F(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,float) + +//! Add a handler for a method with 2 float arguments +#define FLEXT_ADDMETHOD_FF(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_2(IX,flext::MakeSymbol(M_TAG),M_FUN,float,float) + +//! Add a handler for a method with 3 float arguments +#define FLEXT_ADDMETHOD_FFF(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_3(IX,flext::MakeSymbol(M_TAG),M_FUN,float,float,float) + +//! Add a handler for a method with 1 integer argument +#define FLEXT_ADDMETHOD_I(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_1(IX,flext::MakeSymbol(M_TAG),M_FUN,int) + +//! Add a handler for a method with 2 integer arguments +#define FLEXT_ADDMETHOD_II(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_2(IX,flext::MakeSymbol(M_TAG),M_FUN,int,int) + +//! Add a handler for a method with 3 integer arguments +#define FLEXT_ADDMETHOD_III(IX,M_TAG,M_FUN) \ +\ +FLEXT_ADDMETHOD_3(IX,flext::MakeSymbol(M_TAG),M_FUN,int,int,int) + + +//! @} FLEXT_D_ADDMETHOD + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_methbind.h b/externals/grill/trunk/flext/source/fldefs_methbind.h new file mode 100644 index 0000000000000000000000000000000000000000..8f8d48363b36b98b019633da6b6e8be24b7b8428 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_methbind.h @@ -0,0 +1,46 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_methbind.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHBIND_H +#define __FLEXT_DEFS_METHBIND_H + + +/*! \defgroup FLEXT_D_BINDMETHOD Bind flext methods to symbols + @{ +*/ + +/*! \brief Bind a handler for a method with an anything argument to a symbol +*/ +#define FLEXT_BINDMETHOD(SYM,M_FUN,DATA) \ +\ +BindMethod(SYM,FLEXT_CALL_PRE(M_FUN),DATA) + +/*! \brief Unbind any handler for a method from a symbol + \note Memory associated to the DATA parameter of FLEXT_BINDMETHOD will *not* be freed here. +*/ +#define FLEXT_UNBINDMETHOD(SYM) \ +\ +UnbindMethod(SYM) + +/*! \brief Unbind any handler for a method from a symbol and return user data pointer by DATA + \note Memory associated to the DATA parameter of FLEXT_BINDMETHOD will *not* be freed here. +*/ +#define FLEXT_UNBINDMETHOD_X(SYM,DATA) \ +\ +UnbindMethod(SYM,&DATA) + + +//! @} FLEXT_D_BINDMETHOD + + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_methcall.h b/externals/grill/trunk/flext/source/fldefs_methcall.h new file mode 100644 index 0000000000000000000000000000000000000000..2f24fb9d35c653f61161b69d7ee36f2b621582a1 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_methcall.h @@ -0,0 +1,76 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_methbind.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHCALL_H +#define __FLEXT_DEFS_METHCALL_H + + +/*! \defgroup FLEXT_D_CALLMETHOD Call flext methods manually + \ingroup FLEXT_D_METHOD + @{ +*/ + +//! Call a (already defined) method with no arguments +#define FLEXT_CALLMETHOD(M_FUN) \ +\ +FLEXT_CALL_PRE(M_FUN)(this) + +//! Call a (already defined) method with variable list arguments +#define FLEXT_CALLMETHOD_V(M_FUN,ARGC,ARGV) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARGC,(t_atom *)(ARGV)) + +//! Call a (already defined) method with anything arguments +#define FLEXT_CALLMETHOD_A(M_FUN,HDR,ARGC,ARGV) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,(t_symbol *)(HDR),ARGC,(t_atom *)(ARGV)) + +//! Call a (already defined) method with a data package (void *) +#define FLEXT_CALLMETHOD_X(M_FUN,DATA) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,DATA) + +//! Call a (already defined) method with 1 enum type argument +#define FLEXT_CALLMETHOD_E(M_FUN,ARG) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG) + +//! Call a (already defined) method with 1 argument +#define FLEXT_CALLMETHOD_1(M_FUN,ARG) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG) + +//! Call a (already defined) method with 2 arguments +#define FLEXT_CALLMETHOD_2(M_FUN,ARG1,ARG2) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2) + +//! Call a (already defined) method with 3 arguments +#define FLEXT_CALLMETHOD_3(M_FUN,ARG1,ARG2,ARG3) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3) + +//! Call a (already defined) method with 4 arguments +#define FLEXT_CALLMETHOD_4(M_FUN,ARG1,ARG2,ARG3,ARG4) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3,ARG4) + +//! Call a (already defined) method with 5 arguments +#define FLEXT_CALLMETHOD_5(M_FUN,ARG1,ARG2,ARG3,ARG4,ARG5) \ +\ +FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3,ARG4,ARG5) + +//! @} FLEXT_D_CALLMETHOD + + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_methcb.h b/externals/grill/trunk/flext/source/fldefs_methcb.h new file mode 100644 index 0000000000000000000000000000000000000000..79aa7c1a5819b5418d32a8fc1cc5b5fb8028e39e --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_methcb.h @@ -0,0 +1,127 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_methcb.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHCB_H +#define __FLEXT_DEFS_METHCB_H + + +/*! \defgroup FLEXT_D_CALLBACK Declare callbacks for class methods + \ingroup FLEXT_D_METHOD + @{ +*/ + +//! Set up a method callback with no arguments +#define FLEXT_CALLBACK(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(); return true; } + +//! Set up a method callback for an anything argument +#define FLEXT_CALLBACK_A(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(s,argc,argv); return true; } + +//! Set up a method callback for a variable argument list +#define FLEXT_CALLBACK_V(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int argc,t_atom *argv) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(argc,argv); return true; } + +//! Set up a method callback for a data package (void *) argument +#define FLEXT_CALLBACK_X(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,void *data) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(data); return true; } + +//! Set up a method callback for an anything argument and a data package (e.g. for symbol-bound methods). +#define FLEXT_CALLBACK_AX(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv,void *data) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(s,argc,argv,data); return true; } + +//! Set up a timer callback +#define FLEXT_CALLBACK_T(M_FUN) \ +\ +FLEXT_CALLBACK_X(M_FUN) + +//! Set up a method callback for a boolean argument +#define FLEXT_CALLBACK_B(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int &arg1) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1 != 0); return true; } + +//! Set up a method callback for 1 argument +#define FLEXT_CALLBACK_1(M_FUN,TP1) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1); return true; } + +//! Set up a method callback for 2 arguments +#define FLEXT_CALLBACK_2(M_FUN,TP1,TP2) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2); return true; } + +//! Set up a method callback for 3 arguments +#define FLEXT_CALLBACK_3(M_FUN,TP1,TP2,TP3) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3); return true; } + +//! Set up a method callback for 4 arguments +#define FLEXT_CALLBACK_4(M_FUN,TP1,TP2,TP3,TP4) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3,arg4); return true; } + +//! Set up a method callback for 5 arguments +#define FLEXT_CALLBACK_5(M_FUN,TP1,TP2,TP3,TP4,TP5) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,TP5 &arg5) \ +{ FLEXT_CAST<thisType *>(c)->M_FUN(arg1,arg2,arg3,arg4,arg5); return true; } + + +// Shortcuts + +//! Set up a method callback for 1 float argument +#define FLEXT_CALLBACK_F(M_FUN) \ +\ +FLEXT_CALLBACK_1(M_FUN,float) + +//! Set up a method callback for 2 float arguments +#define FLEXT_CALLBACK_FF(M_FUN) \ +\ +FLEXT_CALLBACK_2(M_FUN,float,float) + +//! Set up a method callback for 3 float arguments +#define FLEXT_CALLBACK_FFF(M_FUN) \ +\ +FLEXT_CALLBACK_3(M_FUN,float,float,float) + +//! Set up a method callback for 1 integer argument +#define FLEXT_CALLBACK_I(M_FUN) \ +\ +FLEXT_CALLBACK_1(M_FUN,int) + +//! Set up a method callback for 2 integer arguments +#define FLEXT_CALLBACK_II(M_FUN) \ +\ +FLEXT_CALLBACK_2(M_FUN,int,int) + +//! Set up a method callback for 3 integer arguments +#define FLEXT_CALLBACK_III(M_FUN) \ +\ +FLEXT_CALLBACK_3(M_FUN,int,int,int) + +//! Set up a method callback for 1 symbol argument +#define FLEXT_CALLBACK_S(M_FUN) \ +\ +FLEXT_CALLBACK_1(M_FUN,t_symptr) + + +//! \deprecated +#define FLEXT_CALLBACK_G FLEXT_CALLBACK_V + +//! @} FLEXT_D_CALLBACK + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_meththr.h b/externals/grill/trunk/flext/source/fldefs_meththr.h new file mode 100644 index 0000000000000000000000000000000000000000..4d6a607679b97ee218c2aeea242a2090630366c4 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_meththr.h @@ -0,0 +1,271 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_meththr.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_METHTHR_H +#define __FLEXT_DEFS_METHTHR_H + + +#ifdef FLEXT_THREADS + + +/*! \defgroup FLEXT_D_THREAD Declare threaded method callbacks + @{ +*/ + +//! Set up a threaded method callback with no arguments +#define FLEXT_THREAD(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c) { \ + thr_params *p = new thr_params; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + delete p; \ + if(ok) { \ + th->M_FUN(); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for an anything argument +#define FLEXT_THREAD_A(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv) { \ + thr_params *p = new thr_params; p->set_any(s,argc,argv); \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + AtomAnything *args = p->var[0]._any; \ + delete p; \ + if(ok) { \ + th->M_FUN(args->Header(),args->Count(),args->Atoms()); \ + th->PopThread(); \ + } \ + delete args; \ +} + +//! Set up a threaded method callback for a variable argument list +#define FLEXT_THREAD_V(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int argc,t_atom *argv) { \ + thr_params *p = new thr_params; p->set_list(argc,argv); \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + AtomList *args = p->var[0]._list; \ + delete p; \ + if(ok) { \ + th->M_FUN(args->Count(),args->Atoms()); \ + th->PopThread(); \ + } \ + delete args; \ +} + +/*! \brief Set up a threaded method callback for an arbitrary data struct. + \note Data is pure... no destructor is called upon delete +*/ +#define FLEXT_THREAD_X(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,void *data) { \ + thr_params *p = new thr_params; p->var[0]._ext = data; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + void *data = p->var[0]._ext; \ + delete p; \ + if(ok) { \ + th->M_FUN(data); \ + th->PopThread(); \ + } \ + /* delete (char *)data; */ \ +} + +//! Set up a threaded method callback for a boolean argument +#define FLEXT_THREAD_B(M_FUN) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,int &arg1) { \ + thr_params *p = new thr_params; p->var[0]._bool = arg1 != 0; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + bool b = p->var[0]._bool; \ + delete p; \ + if(ok) { \ + th->M_FUN(b); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 1 argument +#define FLEXT_THREAD_1(M_FUN,TP1) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1) { \ + thr_params *p = new thr_params(1); \ + p->var[0]._ ## TP1 = arg1; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 2 arguments +#define FLEXT_THREAD_2(M_FUN,TP1,TP2) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2) { \ + thr_params *p = new thr_params(2); \ + p->var[0]._ ## TP1 = arg1; \ + p->var[1]._ ## TP2 = arg2; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + const TP1 v2 = p->var[1]._ ## TP2; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1,v2); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 3 arguments +#define FLEXT_THREAD_3(M_FUN,TP1,TP2,TP3) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3) { \ + thr_params *p = new thr_params(3); \ + p->var[0]._ ## TP1 = arg1; \ + p->var[1]._ ## TP2 = arg2; \ + p->var[2]._ ## TP3 = arg3; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + const TP2 v2 = p->var[1]._ ## TP2; \ + const TP3 v3 = p->var[2]._ ## TP3; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1,v2,v3); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 4 arguments +#define FLEXT_THREAD_4(M_FUN,TP1,TP2,TP3,TP4) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4) { \ + thr_params *p = new thr_params(4); \ + p->var[0]._ ## TP1 = arg1; \ + p->var[1]._ ## TP2 = arg2; \ + p->var[2]._ ## TP3 = arg3; \ + p->var[3]._ ## TP4 = arg4; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + const TP2 v2 = p->var[1]._ ## TP2; \ + const TP3 v3 = p->var[2]._ ## TP3; \ + const TP4 v4 = p->var[3]._ ## TP4; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1,v2,v3,v4); \ + th->PopThread(); \ + } \ +} + +//! Set up a threaded method callback for 5 arguments +#define FLEXT_THREAD_5(M_FUN,TP1,TP2,TP3,TP4,TP5) \ +static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,TP5 &arg5) { \ + thr_params *p = new thr_params(5); \ + p->var[0]._ ## TP1 = arg1; \ + p->var[1]._ ## TP2 = arg2; \ + p->var[2]._ ## TP3 = arg3; \ + p->var[3]._ ## TP4 = arg4; \ + p->var[4]._ ## TP5 = arg5; \ + return c->StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \ +} \ +static void FLEXT_THR_PRE(M_FUN)(thr_params *p) { \ + thisType *th = FLEXT_CAST<thisType *>(p->cl); \ + bool ok = th->PushThread(); \ + const TP1 v1 = p->var[0]._ ## TP1; \ + const TP2 v2 = p->var[1]._ ## TP2; \ + const TP3 v3 = p->var[2]._ ## TP3; \ + const TP4 v4 = p->var[3]._ ## TP4; \ + const TP5 v5 = p->var[4]._ ## TP5; \ + delete p; \ + if(ok) { \ + th->M_FUN(v1,v2,v3,v4,v5); \ + th->PopThread(); \ + } \ +} + + +//! Shortcuts + +//! Set up a threaded method callback for 1 float argument +#define FLEXT_THREAD_F(M_FUN) \ +\ +FLEXT_THREAD_1(M_FUN,float) + +//! Set up a threaded method callback for 2 float arguments +#define FLEXT_THREAD_FF(M_FUN) \ +\ +FLEXT_THREAD_2(M_FUN,float,float) + +//! Set up a threaded method callback for 3 float arguments +#define FLEXT_THREAD_FFF(M_FUN) \ +\ +FLEXT_THREAD_3(M_FUN,float,float,float) + +//! Set up a threaded method callback for 1 integer argument +#define FLEXT_THREAD_I(M_FUN) \ +\ +FLEXT_THREAD_1(M_FUN,int) + +//! Set up a threaded method callback for 2 integer arguments +#define FLEXT_THREAD_II(M_FUN) \ +\ +FLEXT_THREAD_2(M_FUN,int,int) + +//! Set up a threaded method callback for 3 integer arguments +#define FLEXT_THREAD_III(M_FUN) \ +\ +FLEXT_THREAD_3(M_FUN,int,int,int) + +//! Set up a threaded method callback for 1 symbol argument +#define FLEXT_THREAD_S(M_FUN) \ +\ +FLEXT_THREAD_1(M_FUN,t_symptr) + +// deprecated +#define FLEXT_THREAD_G FLEXT_THREAD_V + +//! @} FLEXT_D_THREAD + + +#endif // FLEXT_THREADS + + +#endif diff --git a/externals/grill/trunk/flext/source/fldefs_setup.h b/externals/grill/trunk/flext/source/fldefs_setup.h new file mode 100644 index 0000000000000000000000000000000000000000..45cc6ac7d8f127e0cd3812de345a78aefdb08426 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldefs_setup.h @@ -0,0 +1,335 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldefs_setup.h + \brief This file contains all #defines for actual usage + +*/ + +#ifndef __FLEXT_DEFS_SETUP_H +#define __FLEXT_DEFS_SETUP_H + +// ==================================================================================== + +/*! \defgroup FLEXT_D_INSTANCE Class instantiation + \note For stand-alone externals (not part of a library) the name of your class + \note is of importance! It must be the same as the external (excluded an eventual ~ (tilde)) + + There are additional parameters that can be included in the NAME field of FLEXT_NEW etc.: + + - There may be additional names (aliases) appened, separated by spaces + - There may be a help path prepended, separated by a colon + - This help path doesn't work for Max/MSP. There you'll have to use a object mapping file (Max/MSP version >= 4.2) + + @{ +*/ + + +/*! \defgroup FLEXT_D_NEW Stand-alone class instantiation + Makes an actual instance of a stand-alone class. +*/ + +/*! \defgroup FLEXT_D_NEW_DSP Dsp class instantiation + Makes an actual instance of a dsp (aka "tilde") class (with signal processing). +*/ + +/*! \defgroup FLEXT_D_LIB Library class instantiation + Makes an actual instance of a class which is part of an object library (and not stand-alone). +*/ + +/*! \defgroup FLEXT_D_LIB_DSP Dsp library class instantiation + Makes an actual instance of a dsp (aka "tilde") class with signal processing + which is part of an object library (and not stand-alone). +*/ + +// NO ARGUMENTS +// ---------------------------------------- + +/*! \brief Implementation of a flext class with no arguments + \ingroup FLEXT_D_NEW + \param NAME the object's actual name(s) as a string (like "*", "trigger", "noise~", etc.) + \param NEW_CLASS the object's C++ class name +*/ +#define FLEXT_NEW(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,0,0,0) + +/*! \brief Implementation of a flext dsp class with no arguments + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,1,0,0) + +/*! \brief Implementation of a flext dsp class with no arguments and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,1,1,0) + +/*! \brief Implementation of a flext class (part of a library) with no arguments + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,0,0,1) + +/*! \brief Implementation of a flext dsp class (part of a library) with no arguments + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,1,0,1) + +/*! \brief Implementation of a flext dsp class (part of a library) with no arguments and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0(NAME,NEW_CLASS) \ +\ +REAL_NEW(NAME,NEW_CLASS,1,1,1) + + +// VARIABLE ARGUMENT LIST +// ---------------------------------------- + +/*! \brief Implementation of a flext class with a variable argument list + \ingroup FLEXT_D_NEW +*/ +#define FLEXT_NEW_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS,0,0,0) + +/*! \brief Implementation of a flext dsp class with a variable argument list + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS,1,0,0) + +/*! \brief Implementation of a flext dsp class with a variable argument list and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS,1,1,0) + +/*! \brief Implementation of a flext class (part of a library) with a variable argument list + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS, 0,0,1) + +/*! \brief Implementation of a flext dsp class (part of a library) with a variable argument list + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS, 1,0,1) + +/*! \brief Implementation of a flext dsp class (part of a library) with a variable argument list and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0_V(NAME,NEW_CLASS) \ +\ +REAL_NEW_V(NAME,NEW_CLASS, 1,1,1) + + +// ONE ARGUMENT +// ---------------------------------------- + +/*! \brief Implementation of a flext class with one argument + \ingroup FLEXT_D_NEW +*/ +#define FLEXT_NEW_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 0,0,0, TYPE) + +/*! \brief Implementation of a flext dsp class with one argument + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 1,0,0, TYPE) + +/*! \brief Implementation of a flext dsp class with one argument and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 1,1,0, TYPE) + +/*! \brief Implementation of a flext class (part of a library) with one argument + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 0,0,1, TYPE) + +/*! \brief Implementation of a flext dsp class (part of a library) with one argument + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 1,0,1, TYPE) + +/*! \brief Implementation of a flext dsp class (part of a library) with one argument and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0_1(NAME,NEW_CLASS, TYPE) \ +\ +REAL_NEW_1(NAME,NEW_CLASS, 1,1,1, TYPE) + + +// TWO ARGUMENTS +// ---------------------------------------- + +/*! \brief Implementation of a flext class with 2 arguments + \ingroup FLEXT_D_NEW +*/ +#define FLEXT_NEW_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 0,0,0, TYPE1, TYPE2) + +/*! \brief Implementation of a flext dsp class with 2 arguments + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 1,0,0, TYPE1, TYPE2) + +/*! \brief Implementation of a flext dsp class with 2 arguments and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 1,1,0, TYPE1, TYPE2) + +/*! \brief Implementation of a flext class (part of a library) with 2 arguments + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 0,0,1, TYPE1, TYPE2) + +/*! \brief Implementation of a flext dsp class (part of a library) with 2 arguments + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 1,0,1, TYPE1, TYPE2) + +/*! \brief Implementation of a flext dsp class (part of a library) with 2 arguments and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0_2(NAME,NEW_CLASS, TYPE1, TYPE2) \ +\ +REAL_NEW_2(NAME,NEW_CLASS, 1,1,1, TYPE1, TYPE2) + + +// THREE ARGUMENTS +// ---------------------------------------- + +/*! \brief Implementation of a flext class with 3 arguments + \ingroup FLEXT_D_NEW +*/ +#define FLEXT_NEW_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 0,0,0, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext dsp class with 3 arguments + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 1,0,0, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext dsp class with 3 arguments and no dsp inlet + \ingroup FLEXT_D_NEW_DSP +*/ +#define FLEXT_NEW_DSP0_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 1,1,0, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext class (part of a library) with 3 arguments + \ingroup FLEXT_D_LIB +*/ +#define FLEXT_LIB_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 0,0,1, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext dsp class (part of a library) with 3 arguments + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 1,0,1, TYPE1, TYPE2, TYPE3) + +/*! \brief Implementation of a flext dsp class (part of a library) with 3 arguments and no dsp inlet + \ingroup FLEXT_D_LIB_DSP +*/ +#define FLEXT_LIB_DSP0_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \ +\ +REAL_NEW_3(NAME,NEW_CLASS, 1,1,1, TYPE1, TYPE2, TYPE3) + + +// deprecated stuff + +/*! \defgroup FLEXT_D_DEPRECATED Deprecated definitions + \deprecated + @{ +*/ + +#define FLEXT_NEW_G FLEXT_NEW_V + +#define FLEXT_NEW_TILDE FLEXT_NEW_DSP +#define FLEXT_NEW_TILDE_G FLEXT_NEW_DSP_V +#define FLEXT_NEW_TILDE_1 FLEXT_NEW_DSP_1 +#define FLEXT_NEW_TILDE_2 FLEXT_NEW_DSP_2 +#define FLEXT_NEW_TILDE_3 FLEXT_NEW_DSP_3 + +#define FLEXT_LIB_G FLEXT_LIB_V + +#define FLEXT_LIB_TILDE FLEXT_LIB_DSP +#define FLEXT_LIB_TILDE_G FLEXT_LIB_DSP_V +#define FLEXT_LIB_TILDE_1 FLEXT_LIB_DSP_1 +#define FLEXT_LIB_TILDE_2 FLEXT_LIB_DSP_2 +#define FLEXT_LIB_TILDE_3 FLEXT_LIB_DSP_3 + +#define FLEXT_TILDE_SETUP FLEXT_DSP_SETUP + +//! @} FLEXT_D_DEPRECATED + + +/*! \defgroup FLEXT_D_LIBRARY Definitions for library objects + @{ +*/ + +/*! \brief Specify that to declare the library itself. + \note If you have a library this is compulsory (to register all the objects of the library) +*/ +#define FLEXT_LIB_SETUP(NAME,SETUPFUN) REAL_LIB_SETUP(NAME,SETUPFUN) + +/*! \brief Register an object in the library. + \note This is used in the library setup function +*/ +#define FLEXT_SETUP(cl) REAL_SETUP(cl,0) + +/*! \brief Register a DSP object in the library. + \note This is used in the library setup function +*/ +#define FLEXT_DSP_SETUP(cl) REAL_SETUP(cl,1) + +//! @} FLEXT_D_LIBRARY + + +//! @} FLEXT_D_INSTANCE + + +#endif diff --git a/externals/grill/trunk/flext/source/fldoxygen.h b/externals/grill/trunk/flext/source/fldoxygen.h new file mode 100644 index 0000000000000000000000000000000000000000..9c30a2ebe689d872a7af606cd1f5deffc3f1b10b --- /dev/null +++ b/externals/grill/trunk/flext/source/fldoxygen.h @@ -0,0 +1,216 @@ +#ifndef __FLEXT_DOXYGEN_H +#define __FLEXT_DOXYGEN_H + +/*! \file fldoxygen.h + \brief Doxygen definitions + \remark There is no code in here, just documentation stuff. +*/ + +/*! + +\mainpage flext - a C++ layer for cross-platform development of PD and Max/MSP objects + +\section INTRO Introduction + +Currently there exist two widely used modular systems for real-time audio that can be +extended by self-written objects (so called "externals"):<br> +Max (http://www.cycling74.com) and Pure Data (http://www.pure-data.org) . + +Both come with APIs that are not very different (as they share their origin), but as well not quite the same. +Flext seeks to provide a unifying interface for the APIs of those real-time systems while also +concentrating on making use of the advantages of the object orientation of the C++ language. + +Consequently, flext allows to write externals (or libraries of a number of these), that can +be compiled for both systems (with various compilers on a few platforms) without changes to the +source code. +Flext also tries to overcome some limitations of the real-time systems and introduces new features. + +The advantages of flext are: +<ul> +<li>Identical source code for PD and Max/MSP objects on a number of platforms +<li>Better readability of code compared to straight C externals +<li>Faster development, more robust coding +<li>Sharing of common methods and data by using base classes +<li>Transparent use of threads for methods +<li>Libraries of externals in Max/MSP +<li>More than 3 typed creation arguments possible for Max/MSP +<li>Any input to any object's inlet (with the exception of signal streams) +<li>Control of the object state by use of Max/Jitter-like "attributes" +</ul> + +Naturally there are some cons, too: +<ul> +<li>Introduces a small overhead to speed of message handling +<li>Overhead in object size (due to possibly unneeded library code) when statically linked +</ul> + +Currently, flext supports +<ul> +<li>PD on Windows with Microsoft Visual C++, Borland C++ and gcc(cygwin) compilers +<li>PD on Linux with gcc +<li>PD on Mac OSX with gcc (makefile or Xcode) +<li>Max/MSP on Mac OS9 and OSX with Metrowerks CodeWarrior +</ul> + +\section LICENSE License + +Flext is covered by the GPL. + +flext - C++ layer for Max/MSP and pd (pure data) externals<BR> +Copyright (C) 2001-2005 Thomas Grill + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version.<BR> +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details.<BR> +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +In the official flext distribution, the GNU General Public License is +in the file gpl.txt<BR> +Also see the file license.txt for notes on +referenced works and their license texts. + +\section DOWNLOAD Download + +Download the latest flext version from http://grrrr.org/ext/flext .<br> +Alternatively, you can check out the cvs version from http://sourceforge.net/projects/pure-data . + +\section USAGE Usage + +As a developer, you should know the C++ language, how to use a makefile (especially necessary for linux) +and how to steer your compiler.<br> +Flext can be compiled as a static library which has then to be linked to the code of your external. +For most applications you won't have to use any of the native PD or Max/MSP API functions as they are all +encapsulated by flext. + +So let's come to the point... how does a typical flext object look like? + +This is the object "attr1", one of the flext tutorial examples: + +\verbatim +// enable attribute processing +#define FLEXT_ATTRIBUTES 1 + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif +\endverbatim + +With these lines, all the necessary definitions from the flext package have been included. + +\verbatim +class attr1: + public flext_base +{ + FLEXT_HEADER(attr1,flext_base) +\endverbatim + +A flext class is simply defined by inheriting from the flext_base (see also \ref FLEXT_CLASS) +or flext_dsp (see also \ref FLEXT_DSP) classes. +Additionally some information has to be added using FLEXT_HEADER (see \ref FLEXT_D_HEADER) + +\verbatim +public: + // constructor + attr1(); +\endverbatim + +Normally the constructor takes the creation arguments of an object. Here there are none. + +\verbatim +protected: + void m_trigger(float f); + + // stored argument + float arg; +\endverbatim + +These are methods and data elements for internal class usage. Flext doesn't know about them +as long as they are not registered. + +\verbatim +private: + // callback for method "m_trigger" (with one float argument) + FLEXT_CALLBACK_F(m_trigger); + + // define attribute callbacks for variable "arg" (with GET and SET properties) + FLEXT_ATTRVAR_F(arg); +}; +\endverbatim + +For each method that shall be exposed to the realtime-system (for receiving messages) and +every attribute (for setting and getting values) callbacks have to be set up. +The functions in the groups \ref FLEXT_D_CALLBACK and \ref FLEXT_D_ATTRIB allow for their +convenient definition. + +\verbatim +// instantiate the class +FLEXT_NEW("attr1",attr1) +\endverbatim + +With FLEXT_NEW the class is registered for the real-time system. +The number of creation arguments and their types must be taken into account here. +There are several variants depending on whether a message oriented (see \ref FLEXT_D_NEW) +or a DSP object (see \ref FLEXT_D_NEW_DSP) is created and whether it resides in a object library +(see \ref FLEXT_D_LIB and \ref FLEXT_D_LIB_DSP).<BR> + +\verbatim +attr1::attr1(): + arg(0) // initialize argument +{ + // define inlets + AddInAnything(); // first inlet of type anything (index 0) + + // define outlets + AddOutFloat(); // one float outlet (has index 0) +\endverbatim + +Every inlet and outlet that the object shall have has to be registered. +This is done with the functions in \ref FLEXT_C_IO_ADD. + +\verbatim + // register methods + FLEXT_ADDMETHOD(0,m_trigger); // register method (for floats) "m_trigger" for inlet 0 + + FLEXT_ADDATTR_VAR1("arg",arg); // register attribute "arg" with variable arg +} +\endverbatim + +Likewise, every method (called by a message) (see \ref FLEXT_D_ADDMETHOD) and every +attribute (see \ref FLEXT_D_ADDATTR) exposed to the system has to be registered. +Here the registration at instance creation is shown - there's another way by registering at +class setup level, which is more efficient but can only be used if the methods or attributes +used are known beforehand (see \ref FLEXT_D_CADDMETHOD and \ref FLEXT_D_CADDATTR). + +\verbatim +void attr1::m_trigger(float f) +{ + float res = arg+f; + + // output value to outlet + ToOutFloat(0,res); // (0 stands for the outlet index 0) +} +\endverbatim + +This is a method that is triggered with a message. It does some calculation and then outputs +a value to an outlet. There are numerous functions (see \ref FLEXT_C_IO_OUT) supporting +that functionality. + +Be sure to work through the examples provided with the flext tutorial. These should give you +an overview about the possibilities of flext. +The "modules" link at the top of the page leads to a complete reference +of flext functions and classes. + +*/ + +#endif diff --git a/externals/grill/trunk/flext/source/fldsp.cpp b/externals/grill/trunk/flext/source/fldsp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fecfe83707ce91fc348a95655dbf37036b2b4b8 --- /dev/null +++ b/externals/grill/trunk/flext/source/fldsp.cpp @@ -0,0 +1,132 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldsp.cpp + \brief Implementation of the flext dsp base class. +*/ + +#ifndef __FLEXT_DSP_CPP +#define __FLEXT_DSP_CPP + +#include "flext.h" +#include "flinternal.h" +#include <cstring> + +#include "flpushns.h" + +// === flext_dsp ============================================== + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::Setup(t_classid id) +{ +#if FLEXT_SYS == FLEXT_SYS_PD +// add_method1(c,cb_enable,"enable",A_FLOAT); + AddMethod(id,0,MakeSymbol("enable"),&cb_enable); +#endif +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_dsp))::FLEXT_CLASSDEF(flext_dsp)() + : srate(sys_getsr()),blksz(sys_getblksize()) + , vecs(NULL) +#if FLEXT_SYS != FLEXT_SYS_MAX + , dspon(true) +#endif +{} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::Exit() +{ + flext_base::Exit(); + + if(vecs) delete[] vecs; +} + + +FLEXT_TEMPIMPL(t_int *FLEXT_CLASSDEF(flext_dsp))::dspmeth(t_int *w) +{ + flext_dsp *obj = (flext_dsp *)(size_t)w[1]; + +#if FLEXT_SYS == FLEXT_SYS_MAX + if(!obj->thisHdr()->z_disabled) +#else + if(LIKELY(obj->dspon)) +#endif + { + flext_base::indsp = true; + obj->CbSignal(); + flext_base::indsp = false; + } + return w+2; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::SetupDsp(t_signal **sp) +{ + int i; + int in = CntInSig(); + int out = CntOutSig(); +#if FLEXT_SYS == FLEXT_SYS_PD + // min. 1 input channel! (CLASS_MAININLET in pd...) + if(!in) in = 1; +#endif + + // store current dsp parameters + srate = sys_getsr(); // \TODO need not be stored in each object.... + // overlap = sp[0]->s_sr/srate; // currently not used/exposed + blksz = sp[0]->s_n; // is this guaranteed to be the same as sys_getblksize() ? + + // store in and out signal vectors + + if((in+out) && !vecs) + vecs = new t_signalvec[in+out]; + + for(i = 0; i < in; ++i) + vecs[i] = sp[i]->s_vec; + for(i = 0; i < out; ++i) + vecs[in+i] = sp[in+i]->s_vec; + + // with the following call derived classes can do their eventual DSP setup + if(CbDsp()) { + // set the DSP function + dsp_add((t_dspmethod)dspmeth,1,this); + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::m_dsp(int /*n*/,t_signalvec const * /*insigs*/,t_signalvec const * /*outsigs*/) {} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_dsp))::CbDsp() +{ + // invoke legacy method + m_dsp(Blocksize(),InSig(),OutSig()); + return true; +} + +// this function will be overridden anyway - the probably useless default is clearing all outputs +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::m_signal(int n,t_sample *const * /*insigs*/,t_sample *const *outs) +{ + for(int i = 0; i < CntOutSig(); ++i) ZeroSamples(outs[i],n); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_dsp))::CbSignal() +{ + // invoke legacy method + m_signal(Blocksize(),InSig(),OutSig()); +} + + +#if FLEXT_SYS == FLEXT_SYS_PD +//void flext_dsp::cb_enable(flext_hdr *c,t_float on) { thisObject(c)->dspon = on != 0; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_dsp))::cb_enable(flext_base *b,float &on) +{ + static_cast<flext_dsp *>(b)->dspon = on != 0; + return true; +} +#endif + +#include "flpopns.h" + +#endif // __FLEXT_DSP_CPP + + diff --git a/externals/grill/trunk/flext/source/fldsp.h b/externals/grill/trunk/flext/source/fldsp.h new file mode 100644 index 0000000000000000000000000000000000000000..12fa826a931d52e57c01d145ffd913ab2e56ea3f --- /dev/null +++ b/externals/grill/trunk/flext/source/fldsp.h @@ -0,0 +1,186 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fldsp.h + \brief Declares the flext dsp class + +*/ + +#ifndef __FLDSP_H +#define __FLDSP_H + +// include the header file declaring the base classes +#include "flext.h" + +#include "flpushns.h" + +// === flext_dsp ================================================== + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_dsp); +typedef FLEXT_SHARE FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_dsp)) flext_dsp; + + +/*! \brief Flext dsp enabled base object +*/ +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext_dsp): + public flext_base +{ + FLEXT_HEADER_S(FLEXT_CLASSDEF(flext_dsp),flext_base,Setup) + + friend class FLEXT_SHARE FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)); + +public: + +/*! \defgroup FLEXT_DSP Flext dsp class + + @{ +*/ + +/*! \defgroup FLEXT_C_DSP Basic dsp functionality + + @{ +*/ + + //! returns current sample rate + float Samplerate() const { return srate; } + + //! returns current block (aka vector) size + int Blocksize() const { return blksz; } + + //! returns array of input vectors (CntInSig() vectors) + t_sample *const *InSig() const { return vecs; } + + //! returns input vector + t_sample *InSig(int i) const { return InSig()[i]; } + + //! returns array of output vectors (CntOutSig() vectors) + // \todo cache that returned pointer + t_sample *const *OutSig() const + { + int i = CntInSig(); + // 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 + t_sample *OutSig(int i) const { return OutSig()[i]; } + + //! typedef describing a signal vector + typedef t_sample *t_signalvec; + +//! @} + +// --- inheritable virtual methods -------------------------------- + +/*! \defgroup FLEXT_C_DSP_VIRTUAL Flext virtual dsp functions + + @{ +*/ + /*! \brief Called on every dsp init. + \note Don't expect any valid data in the signal vectors! + flext_dsp::CbDsp should not be called by the derived class + + \return true (default)... use DSP, false, don't use DSP + */ + virtual bool CbDsp(); + + /*! \brief Called with every signal vector - here you do the dsp calculation + flext_dsp::CbSignal fills all output vectors with silence + */ + virtual void CbSignal(); + + + /*! \brief Deprecated method for CbSignal + \deprecated + \param n: frames (aka samples) in one signal vector + \param insigs: array of input vectors (get number with function CntInSig()) + \param outsigs: array of output vectors (get number with function CntOutSig()) + */ + virtual void m_dsp(int n,t_signalvec const *insigs,t_signalvec const *outsigs); + + /*! \brief Deprecated method for CbSignal + \deprecated + \param n: frames (aka samples) in one signal vector + \param insigs: array of input vectors (get number with function CntInSig()) + \param outsigs: array of output vectors (get number with function CntOutSig()) + */ + virtual void m_signal(int n,t_sample *const *insigs,t_sample *const *outsigs); + +//! @} + + +/*! \defgroup FLEXT_C_DSP_INOUT Flext dsp in-/outlet functions + \note These must be called in the class' constructor + + @{ +*/ +// --- inlet/outlet stuff ----------------------------------------- + + /*! \brief Add signal inlet(s) + \param m Number of inlets to add + */ + void AddInSignal(int m = 1) { AddInlet(xlet_sig,m); } + + /*! \brief Add signal inlet (with description) + \param desc Description of inlet + */ + void AddInSignal(const char *desc) { AddInlet(xlet_sig,1,desc); } + + /*! \brief Add signal outlet(s) + \param m Number of inlets to add + */ + void AddOutSignal(int m = 1) { AddOutlet(xlet_sig,m); } + + /*! \brief Add signal outlet (with description) + \param desc Description of outlet + */ + void AddOutSignal(const char *desc) { AddOutlet(xlet_sig,1,desc); } + +//! @} + +//! @} + +protected: + + FLEXT_CLASSDEF(flext_dsp)(); + + virtual void Exit(); + +private: + + // not static, could be different in different patchers.. + float srate; + int blksz; + t_signalvec *vecs; + + // setup function + static void Setup(t_classid c); + +#if FLEXT_SYS == FLEXT_SYS_PD + static bool cb_enable(flext_base *c,float &on); + bool dspon; +#endif + + static inline flext_dsp *thisObject(flext_hdr *c) { return FLEXT_CAST<flext_dsp *>(c->data); } + + void SetupDsp(t_signal **sp); + + // dsp stuff + static t_int *dspmeth(t_int *w); +}; + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flext.cpp b/externals/grill/trunk/flext/source/flext.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dceac360f3c1d328b6bc99d8a4a7a04722055e4f --- /dev/null +++ b/externals/grill/trunk/flext/source/flext.cpp @@ -0,0 +1,281 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flext.cpp + \brief Implementation of the flext base class. +*/ + +#ifndef __FLEXT_CPP +#define __FLEXT_CPP + +#include "flext.h" +#include "flinternal.h" +#include "fldsp.h" +#include <cstring> + +#include "flpushns.h" + +// === flext_base ============================================ + +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext_base))::curtag = NULL; + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::FLEXT_CLASSDEF(flext_base)() + : incnt(0),outcnt(0) + , insigs(0),outsigs(0) +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + ,outlets(NULL),inlets(NULL) +#endif +#if FLEXT_SYS == FLEXT_SYS_MAX + ,indesc(NULL),outdesc(NULL) +#endif +{ + FLEXT_LOG1("%s - flext logging is on",thisName()); + + methhead = NULL; + bindhead = NULL; + + if(HasAttributes()) { + // initialize when attribute processing is enabled + attrhead = new ItemCont; + attrdata = new AttrDataCont; + } + else { + attrhead = NULL; + attrdata = NULL; + } +} + +/*! This virtual function is called after the object has been created, that is, + after the constructor has been processed. + It creates the inlets and outlets and the message and attribute lists. + \note You can override it in your own class, but be sure to call it, + \note otherwise no inlets/outlets will be created + \note All inlet, outlets, method and attribute declarations must be made before a call to Init! + \remark Creation of inlets/outlets can't be done upon declaration, as Max/MSP needs creation + \remark in reverse. +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::Init() +{ + bool ok = flext_obj::Init(); + + if(ok) ok = InitInlets() && InitOutlets(); + + if(ok) { +#if FLEXT_SYS == FLEXT_SYS_MAX + // according to the Max/MSP SDK this should be prior to any inlet creation, BUT + // that doesn't seem to be true... multiple signal ins and additional inlets don't seem to work then + if(NeedDSP()) dsp_setup(thisHdr(),CntInSig()); // signal inlets +#endif + + if(HasAttributes() && m_holdaargc && m_holdaargv) { + // initialize creation attributes + ok = InitAttrib(m_holdaargc,m_holdaargv); + } + } + + return ok; +} + + +/*! This virtual function is called before the destructor. + We do this because here we can still call virtual methods. +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::Exit() +{ +#if FLEXT_SYS == FLEXT_SYS_MAX + // according to David Z. one should do that first... + if(NeedDSP()) dsp_free(thisHdr()); +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_NOATTREDIT) + // attribute editor window may still be open -> close it + gfxstub_deleteforkey(thisHdr()); +#endif + +#ifdef FLEXT_THREADS + StopThreads(); +#endif + + // send remaining pending messages for this object + QFlush(this); + + // delete message lists + if(bindhead) delete bindhead; // ATTENTION: the object must free all memory associated to bindings itself + if(methhead) delete methhead; + if(attrhead) delete attrhead; + if(attrdata) delete attrdata; + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + if(outlets) delete[] outlets; + + if(inlets) { + FLEXT_ASSERT(incnt > 1); + for(int ix = 1; ix < incnt; ++ix) + if(inlets[ix-1]) { + // release proxy object +#if FLEXT_SYS == FLEXT_SYS_PD + pd_free(&inlets[ix-1]->obj.ob_pd); +#elif FLEXT_SYS == FLEXT_SYS_MAX + freeobject((object *)inlets[ix-1]); +#endif + } + delete[] inlets; + } +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX + if(indesc) { + for(int i = 0; i < incnt; ++i) if(indesc[i]) delete[] indesc[i]; + delete[] indesc; + } + if(outdesc) { + for(int i = 0; i < outcnt; ++i) if(outdesc[i]) delete[] outdesc[i]; + delete[] outdesc; + } +#endif + + flext_obj::Exit(); +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddMessageMethods(t_class *c,bool dsp,bool dspin) +{ + add_loadbang(c,cb_loadbang); + +#if FLEXT_SYS == FLEXT_SYS_PD + class_addmethod(c,(t_method)cb_click,gensym(const_cast<char *>("click")),A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_FLOAT,A_NULL); +#elif FLEXT_SYS == FLEXT_SYS_MAX + add_assist(c,cb_assist); + add_dblclick(c,cb_click); +#endif + + SetProxies(c,dsp); + StartQueue(); + + if(dsp) { +#if FLEXT_SYS == FLEXT_SYS_MAX + add_dsp(c,cb_dsp); + dsp_initclass(); +#elif FLEXT_SYS == FLEXT_SYS_PD + if(dspin) + CLASS_MAINSIGNALIN(c,flext_hdr,defsig); // float messages going into the left inlet are converted to signal + add_dsp(c,cb_dsp); +#else +#error Platform not supported! +#endif + } +} + + +/*! Set up proxy classes and basic methods at class creation time + This ensures that they are processed before the registered flext messages +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::Setup(t_classid id) +{ + t_class *c = getClass(id); + +#if FLEXT_SYS == FLEXT_SYS_MAX + if(!IsLib(id)) +#endif + AddMessageMethods(c,IsDSP(id),HasDSPIn(id)); + + if(HasAttributes(id)) { + AddMethod(id,0,"getattributes",cb_ListAttrib); + AddMethod(id,0,"getmethods",cb_ListMethods); + +#if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_NOATTREDIT) + AddMethod(id,0,"attributedialog",cb_AttrDialog); +#endif + } + +#if FLEXT_SYS == FLEXT_SYS_PD + SetGfx(id); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_loadbang(flext_hdr *c) +{ + Locker lock(c); + thisObject(c)->CbLoadbang(); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::m_loadbang() {} +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::CbLoadbang() { m_loadbang(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::CbClick() {} + +#if FLEXT_SYS == FLEXT_SYS_PD +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_click(flext_hdr *c,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt) +{ + if(shift) { + Locker lock(c); + thisObject(c)->CbClick(); + } +} +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_click(flext_hdr *c, Point pt, short mods) +{ + Locker lock(c); + thisObject(c)->CbClick(); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_assist(flext_hdr *c,void * /*b*/,long msg,long arg,char *s) +{ + Locker lock(c); + flext_base *th = thisObject(c); + + switch(msg) { + case 1: //ASSIST_INLET: + if(arg < th->incnt && th->indesc[arg]) strcpy(s,th->indesc[arg]); + break; + case 2: //ASSIST_OUTLET: + if(arg < th->outcnt) { + if(th->outdesc[arg]) strcpy(s,th->outdesc[arg]); + } + else + if(arg == th->outcnt && th->HasAttributes()) strcpy(s,"Attributes"); + break; + } +} +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_dsp(flext_hdr *c,t_signal **sp,short *count) +#else +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_dsp(flext_hdr *c,t_signal **sp) +#endif +{ + Locker lock(c); + flext_base *bobj = thisObject(c); + +#if FLEXT_SYS == FLEXT_SYS_MAX + // we must extra-check here if it is really a DSP object + // obviously, for objects that are part of a library, one dsp_initclass enables DSP for all + if(!bobj->IsDSP()) return; +#endif + + flext_dsp *obj; +#ifdef FLEXT_DEBUG + obj = dynamic_cast<flext_dsp *>(bobj); +#else + obj = static_cast<flext_dsp *>(bobj); +#endif + + FLEXT_ASSERT(obj); + obj->SetupDsp(sp); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::CbIdle() { return 0; } + +#include "flpopns.h" + +#endif // __FLEXT_CPP + + diff --git a/externals/grill/trunk/flext/source/flext.h b/externals/grill/trunk/flext/source/flext.h new file mode 100644 index 0000000000000000000000000000000000000000..5c735ff8e3c81db24eb198c7fbc2845593b62360 --- /dev/null +++ b/externals/grill/trunk/flext/source/flext.h @@ -0,0 +1,93 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flext.h + \brief This is the main flext include file. + + The basic definitions are set here and the necessary header files are included +*/ + +#ifndef __FLEXT_H +#define __FLEXT_H + + +/*! \defgroup FLEXT_GLOBAL Flext global definitions + @{ +*/ + +//! \brief flext version number +#define FLEXT_VERSION 600 + +//! \brief flext version string +#define FLEXT_VERSTR "0.6.0 alpha" + +//! @} + +// determine System/OS/CPU +#include "flprefix.h" + +// include headers necessary for multi-threading +#ifdef FLEXT_THREADS + #if FLEXT_THREADS == FLEXT_THR_POSIX + extern "C" { + #include <pthread.h> + #include <sched.h> + } + #elif FLEXT_THREADS == FLEXT_THR_MP + #include <multiprocessing.h> + #elif FLEXT_THREADS == FLEXT_THR_WIN32 + #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 + #include <windows.h> + #include <process.h> + #else + #error "Win32 threading model only supported for Win2000/XP or newer" + #endif + #else + #error "Thread model not supported" + #endif +#endif + + +// include all the flext interface definitions +#include "fldefs.h" + +// include the basic flext object classes +#include "flclass.h" + +// include the flext dsp class +#include "fldsp.h" + +#ifdef FLEXT_INLINE +// include all source code files +# include "flatom.cpp" +# include "flatom_part.cpp" +# include "flatom_pr.cpp" +# include "flattr.cpp" +# include "flattr_ed.cpp" +# include "flbase.cpp" +# include "flbind.cpp" +# include "flbuf.cpp" +# include "fldsp.cpp" +# include "flext.cpp" +# include "flitem.cpp" +# include "fllib.cpp" +# include "flmap.cpp" +# include "flmeth.cpp" +# include "flmsg.cpp" +# include "flout.cpp" +# include "flproxy.cpp" +# include "flqueue.cpp" +# include "flsimd.cpp" +# include "flsupport.cpp" +# include "flthr.cpp" +# include "fltimer.cpp" +# include "flutil.cpp" +# include "flxlet.cpp" +#endif + +#endif // FLEXT_H diff --git a/externals/grill/trunk/flext/source/flfeatures.h b/externals/grill/trunk/flext/source/flfeatures.h new file mode 100644 index 0000000000000000000000000000000000000000..0a904f2956887a991f1fe2b6e413b1f0c5e6c0b0 --- /dev/null +++ b/externals/grill/trunk/flext/source/flfeatures.h @@ -0,0 +1,32 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flfeatures.h + \brief Detect version-specific features. +*/ + +#ifndef __FLFEATURES_H +#define __FLFEATURES_H + +// check if PD API supports buffer dirty time +#if defined(PD_DEVEL_VERSION) && defined(PD_MAJOR_VERSION) && defined(PD_MINOR_VERSION) +#if PD_MINOR_VERSION >= 36 && PD_MINOR_VERSION <= 38 +// array locks have been removed in devel_0_39 + #define _FLEXT_HAVE_PD_GARRAYLOCKS +#endif +#if PD_MINOR_VERSION >= 36 + #define _FLEXT_HAVE_PD_GARRAYUPDATETIME +#endif +#endif + +#if defined(MAC_VERSION) || defined(WIN_VERSION) + // not for OS9 + #define _FLEXT_HAVE_MAX_INUSEFLAG +#endif + +#endif diff --git a/externals/grill/trunk/flext/source/flinternal.h b/externals/grill/trunk/flext/source/flinternal.h new file mode 100644 index 0000000000000000000000000000000000000000..f9c508ab4a9fabc37af7a82d021fa5000a0dca99 --- /dev/null +++ b/externals/grill/trunk/flext/source/flinternal.h @@ -0,0 +1,117 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flinternal.h + \brief Definitions for internal flext usage + \internal + + Here, a few shortcuts for common Max/MSP or PD library calls and type definitions + are declared +*/ + +#ifndef __FLEXT_INTERNALS_H +#define __FLEXT_INTERNALS_H + +#include "flstdc.h" + + +#if FLEXT_SYS == FLEXT_SYS_PD + +#define object_new(clss) pd_new(clss) +#define object_free(obj) pd_free(&(obj)->ob_pd) + + + +#define add_dsp(clss,meth) class_addmethod(clss, (t_method)meth,gensym(const_cast<char *>("dsp")),A_NULL) +#define add_bang(clss,meth) class_addbang(clss, (t_method)meth) +#define add_float(clss,meth) class_addfloat(clss, (t_method)meth) +#define add_floatn(clss,meth,n) class_addmethod(clss, (t_method)meth,gensym(const_cast<char *>("ft" #n)),A_FLOAT,A_NULL) +#define add_flint(clss,meth) class_addfloat(clss, (t_method)meth) +#define add_flintn(clss,meth,n) class_addmethod(clss, (t_method)meth,gensym(const_cast<char *>("ft" #n)),A_FLOAT,A_NULL) +#define add_method(clss,meth,text) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), A_NULL) +#define add_methodG(clss,meth,text) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), A_GIMME,A_NULL) +#define add_method1(clss,meth,text,a1) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,A_NULL) +#define add_method2(clss,meth,text,a1,a2) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,a2,A_NULL) +#define add_method3(clss,meth,text,a1,a2,a3) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,a2,a3,A_NULL) +#define add_method4(clss,meth,text,a1,a2,a3,a4) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,a2,a3,a4,A_NULL) +#define add_method5(clss,meth,text,a1,a2,a3,a5) class_addmethod(clss, (t_method)meth, gensym(const_cast<char *>(text)), a1,a2,a3,a4,a5,A_NULL) +#define add_loadbang(clss,meth) class_addmethod(clss,(t_method)meth, gensym(const_cast<char *>("loadbang")), A_NULL) +#define add_anything(clss,meth) class_addanything(clss,meth) + + +#define newout_signal(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_signal)) +#define newout_float(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_float)) +#define newout_flint(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_float)) +#define newout_list(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_list)) +#define newout_symbol(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_symbol)) +#define newout_anything(clss) outlet_new(clss,const_cast<t_symbol *>(flext::sym_anything)) + +#define outlet_flint(o,v) outlet_float(o,(float)(v)) + +typedef t_perfroutine t_dspmethod; + +#define qelem_new clock_new +#define qelem_free clock_free +#define qelem_set clock_delay +#define qelem_front clock_delay +#define qelem_unset clock_unset + +#define CRITON() +#define CRITOFF() + + +#elif FLEXT_SYS == FLEXT_SYS_MAX + +typedef void t_outlet; + + +//#define object_new(clss) newobject(clss) +#define object_free(obj) freeobject((object *)(obj)) + +#define add_dsp(clss,meth) addmess((method)meth,const_cast<char *>("dsp"),A_CANT,A_NOTHING) +#define add_bang(clss,meth) addbang((method)meth) +#define add_float(clss,meth) addfloat((method)meth) +#define add_floatn(clss,meth,n) addftx((method)meth,n) +#define add_flint(clss,meth) addint((method)meth) +#define add_flintn(clss,meth,n) addinx((method)meth,n) +#define add_method(clss,meth,text) addmess((method)meth, text, A_NOTHING) +#define add_methodG(clss,meth,text) addmess((method)meth, text, A_GIMME,A_NOTHING) +#define add_method1(clss,meth,text,a1) addmess((method)meth, text, a1,A_NOTHING) +#define add_method2(clss,meth,text,a1,a2) addmess((method)meth, text, a1,a2,A_NOTHING) +#define add_method3(clss,meth,text,a1,a2,a3) addmess((method)meth, text, a1,a2,a3,A_NOTHING) +#define add_method4(clss,meth,text,a1,a2,a3,a4) addmess((method)meth, text, a1,a2,a3,a4,A_NOTHING) +#define add_method5(clss,meth,text,a1,a2,a3,a5) addmess((method)meth, text, a1,a2,a3,a4,a5,A_NOTHING) +#define add_anything(clss,meth) addmess((method)meth, const_cast<char *>("anything"), A_GIMME,A_NOTHING) + +#define add_assist(clss,meth) addmess((method)meth, const_cast<char *>("assist"), A_CANT, A_NULL) +#define add_loadbang(clss,meth) addmess((method)meth, const_cast<char *>("loadbang"), A_CANT, A_NULL) +#define add_dblclick(clss,meth) addmess((method)meth, const_cast<char *>("dblclick"), A_CANT, A_NULL) + +#define newout_signal(clss) outlet_new(clss,"signal") +#define newout_float(clss) outlet_new(clss,"float") +#define newout_flint(clss) outlet_new(clss,"int") +#define newout_list(clss) outlet_new(clss,"list") +#define newout_symbol(clss) outlet_new(clss,"symbol") +#define newout_anything(clss) outlet_new(clss,0) + +#define outlet_flint(o,v) outlet_int(o,(int)(v)) +#define outlet_symbol(o,s) outlet_anything(o,s,0,NULL) + +typedef t_perfroutine t_dspmethod; + +#define CRITON() short state = lockout_set(1) +#define CRITOFF() lockout_set(state) + + +#elif FLEXT_SYS == FLEXT_SYS_JMAX + + +#endif + + +#endif diff --git a/externals/grill/trunk/flext/source/flitem.cpp b/externals/grill/trunk/flext/source/flitem.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b148ec849bf588981551e041143e0a8f7933d2f5 --- /dev/null +++ b/externals/grill/trunk/flext/source/flitem.cpp @@ -0,0 +1,136 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flitem.cpp + \brief Processing of method and attribute lists. +*/ + +#ifndef __FLEXT_ITEM_CPP +#define __FLEXT_ITEM_CPP + +#include "flext.h" +#include <cstring> + +#include "flpushns.h" + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::ItemSet::~ItemSet() { clear(); } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ItemSet::clear() +{ + for(FLEXT_TEMP_TYPENAME TablePtrMapDef::iterator it(*this); it; ++it) delete it.data(); + TablePtrMap<const t_symbol *,Item *,8>::clear(); +} + + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::Item::~Item() +{ + if(nxt) delete nxt; +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::ItemCont::ItemCont(): + members(0),memsize(0),size(0),cont(NULL) +{} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::ItemCont::~ItemCont() +{ + if(cont) { + for(int i = 0; i < size; ++i) delete cont[i]; + delete[] cont; + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ItemCont::Resize(int nsz) +{ + if(nsz > memsize) { + int nmemsz = nsz+10; // increment maximum allocation size + ItemSet **ncont = new ItemSet *[nmemsz]; // make new array + if(cont) { + memcpy(ncont,cont,size*sizeof(*cont)); // copy existing entries + delete[] cont; + } + cont = ncont; // set current array + memsize = nmemsz; // set new allocation size + } + + // make new items + while(size < nsz) cont[size++] = new ItemSet; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ItemCont::Add(Item *item,const t_symbol *tag,int inlet) +{ + FLEXT_ASSERT(tag); + + if(!Contained(inlet)) Resize(inlet+2); + ItemSet &set = GetInlet(inlet); + Item *lst = set.find(tag); + if(!lst) { + Item *old = set.insert(tag,lst = item); + FLEXT_ASSERT(!old); + } + else + for(;;) + if(!lst->nxt) { lst->nxt = item; break; } + else lst = lst->nxt; + members++; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::ItemCont::Remove(Item *item,const t_symbol *tag,int inlet,bool free) +{ + FLEXT_ASSERT(tag); + + if(Contained(inlet)) { + ItemSet &set = GetInlet(inlet); + Item *lit = set.find(tag); + for(Item *prv = NULL; lit; prv = lit,lit = lit->nxt) { + if(lit == item) { + if(prv) prv->nxt = lit->nxt; + else if(lit->nxt) { + Item *old = set.insert(tag,lit->nxt); + FLEXT_ASSERT(!old); + } + else { + Item *l = set.remove(tag); + FLEXT_ASSERT(l == lit); + } + + lit->nxt = NULL; + if(free) delete lit; + return true; + } + } + } + return false; +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::Item *FLEXT_CLASSDEF(flext_base))::ItemCont::FindList(const t_symbol *tag,int inlet) +{ + FLEXT_ASSERT(tag); + return Contained(inlet)?GetInlet(inlet).find(tag):NULL; +} + +// --- class item lists (methods and attributes) ---------------- + +/* +typedef TablePtrMap<FLEXT_CLASSDEF(flext_base)::t_classid,FLEXT_CLASSDEF(flext_base)::ItemCont *,8> ClassMap; + +static ClassMap classarr[2]; + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::ItemCont *FLEXT_CLASSDEF(flext_base))::GetClassArr(t_classid c,int ix) +{ + ClassMap &map = classarr[ix]; + ItemCont *cont = map.find(c); + if(!cont) map.insert(c,cont = new ItemCont); + return cont; +} +*/ + +#include "flpopns.h" + +#endif // __FLEXT_ITEM_CPP + + diff --git a/externals/grill/trunk/flext/source/fllib.cpp b/externals/grill/trunk/flext/source/fllib.cpp new file mode 100644 index 0000000000000000000000000000000000000000..331a8a4cfa8df5e75d8cd4a83a3edf71066c1a39 --- /dev/null +++ b/externals/grill/trunk/flext/source/fllib.cpp @@ -0,0 +1,629 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fllib.cpp + \brief Code for handling of object (and library) creation functions. +*/ + +#ifndef __FLEXT_LIB_CPP +#define __FLEXT_LIB_CPP + +#include "flext.h" +#include "flinternal.h" + +#include <cstdarg> +#include <cstring> +#include <cctype> +#include <map> + +#include "flpushns.h" + +#define ALIASDEL ',' + +#define ALIASSLASHES ":/\\" +#if FLEXT_OS == FLEXT_OS_MAC + #define ALIASSLASH ':' +#elif FLEXT_OS == FLEXT_OS_WIN + #if FLEXT_SYS == FLEXT_SYS_PD + #define ALIASSLASH '/' + #elif FLEXT_SYS == FLEXT_SYS_MAX + #define ALIASSLASH '/' + #else + #error "Undefined" + #endif +#else + // default to "/" + #define ALIASSLASH '/' +#endif + +//! Extract space-delimited words from a string +FLEXT_TEMPLATE +const char *extract(const char *name,int ix = 0) +{ + static char tmp[1024]; + const char *n = name; + + const char *del = strchr(name,ALIASDEL); + + if(del) { +#if 0 + char *t = tmp; + while(n < del && (isspace(*n) || strchr(ALIASSLASHES,*n))) ++n; + while(n < del && !isspace(*n)) { + char c = *(n++); + *(t++) = strchr(ALIASSLASHES,c)?ALIASSLASH:c; + } + while(*t == ALIASSLASH && t > tmp) --t; + *t = 0; +#endif + if(ix < 0) { + // eat white space in front of help definition + ++del; + while(*del && isspace(*del)) ++del; + return del; + } + + strncpy(tmp,name,del-name); + tmp[del-name] = 0; + n = tmp; + } + else if(ix < 0) + return NULL; // no explicit help name + + while(*n && isspace(*n)) ++n; + + for(int i = 0; n && *n; ++i) { + if(i == ix) { + char *t = tmp; + + for(; *n && !isspace(*n); ++t,++n) *t = *n; + *t = 0; + return *tmp?tmp:NULL; + } + else { + while(*n && !isspace(*n)) ++n; + while(*n && isspace(*n)) ++n; + } + } + + return NULL; +} + + +//! Check if object's name ends with a tilde +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::chktilde(const char *objname) +{ +// int stplen = strlen(setupfun); + bool tilde = true; //!strncmp(setupfun,"_tilde",6); + + if((objname[strlen(objname)-1] == '~'?1:0)^(tilde?1:0)) { + if(tilde) + error("flext: %s (no trailing ~) is defined as a tilde object",objname); + else + error("flext::check_tilde: %s is no tilde object",objname); + return true; + } + else + return false; +} + +// this class stands for one library of objects +// there can be more if flext is a shared library +class flext_library +{ +public: + flext_library(const t_symbol *nm) + : name(nm) +#if FLEXT_SYS == FLEXT_SYS_MAX + , clss(NULL),dsp(false) +#endif + {} + + const t_symbol *name; +#if FLEXT_SYS == FLEXT_SYS_MAX + t_class *clss; + bool dsp; +#endif +}; + +// this class stands for one registered object +// it holds the class, type flags, constructor and destructor of the object and the creation arg types +// it will never be destroyed +FLEXT_TEMPLATE +class flext_class: + public flext_root +{ +public: + flext_class(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)); + + t_class *const &clss; + + flext_obj *(*newfun)(int,t_atom *); + void (*freefun)(flext_hdr *c); + + int argc; + int *argv; + + flext_library *lib; + bool dsp:1,noi:1,attr:1,dist:1; + + flext_base::ItemCont meths,attrs; +}; + +FLEXT_TEMPIMPL(flext_class)::flext_class(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)): + clss(cl), + newfun(newf),freefun(freef), + argc(0),argv(NULL) + , dist(false) +{} + +FLEXT_TEMPIMPL(LibMap *FLEXT_CLASSDEF(flext_obj))::libnames = NULL; + +//! Store or retrieve registered classes +FLEXT_TEMPIMPL(FLEXT_TEMPINST(flext_class) *FLEXT_CLASSDEF(flext_obj))::FindName(const t_symbol *s,FLEXT_TEMPINST(flext_class) *o) +{ + if(!libnames) libnames = new LibMap; + LibMap::iterator it = libnames->find(s); + if(it != libnames->end()) + return it->second; + else if(o) { + (*libnames)[s] = o; + return o; + } + else + return NULL; +} + + +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_obj))::getClass(t_classid cl) { return cl->clss; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::HasAttributes(t_classid cl) { return cl->attr; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::IsDSP(t_classid cl) { return cl->dsp; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::HasDSPIn(t_classid cl) { return !cl->noi; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::IsLib(t_classid cl) { return cl->lib != NULL; } + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::HasAttributes() const { return clss->attr; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::IsDSP() const { return clss->dsp; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::HasDSPIn() const { return !clss->noi; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::IsLib() const { return clss->lib != NULL; } + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_obj))::NeedDSP() const { return clss->dsp || (clss->lib && clss->lib->dsp); } +#endif + + +FLEXT_TEMPIMPL(flext_library *FLEXT_CLASSDEF(flext_obj))::curlib = NULL; + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::lib_init(const char *name,void setupfun()) +{ + // make new library instance + curlib = new flext_library(MakeSymbol(name)); + + flext::Setup(); + + // first register all classes + try { + setupfun(); + } + catch(std::exception &x) { + error("%s - %s",name,x.what()); + return; + } + catch(char *txt) { + error("%s - %s",name,txt); + return; + } + catch(...) { + error("%s - Unknown exception at library setup",name); + return; + } + +#if FLEXT_SYS == FLEXT_SYS_MAX + // then see if we got DSP classes + + // for Max/MSP, the library is represented by a special object (class) registered at startup + // all objects in the library are clones of that library object - they share the same class + ::setup( + (t_messlist **)&curlib->clss, + (t_newmethod)obj_new,(t_method)obj_free, + sizeof(flext_hdr),NULL,A_GIMME,A_NULL); + + // for all classes in library add methods + flext_base::AddMessageMethods(curlib->clss,curlib->dsp,true); +#endif + + curlib = NULL; +} + +#if FLEXT_SYS == FLEXT_SYS_PD +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_obj))::buf_class = NULL; +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::obj_add(bool lib,bool dsp,bool noi,bool attr,const char *idname,const char *names,void setupfun(t_classid),FLEXT_CLASSDEF(flext_obj) *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...) +{ + Locker lock; + +#if FLEXT_SYS == FLEXT_SYS_PD + // register buffer helper class (if not present already) + if(!buf_class) { + buf_class = ::class_new(gensym(const_cast<char *>(" flext buffer helper ")),NULL,NULL,sizeof(t_object),CLASS_PD|CLASS_NOINLET,A_NULL); + add_dsp(buf_class,cb_buffer_dsp); + // make an instance + ::pd_new(buf_class); + } +#endif + + // get first possible object name + const t_symbol *nsym = MakeSymbol(FLEXT_TEMPINST(extract)(names)); + +#ifdef FLEXT_DEBUG + if(dsp) chktilde(GetString(nsym)); +#endif + + if(lib) { + FLEXT_ASSERT(curlib); +#if FLEXT_SYS == FLEXT_SYS_MAX + curlib->dsp |= dsp; +#endif + } + else { + FLEXT_ASSERT(!curlib); +// process_attributes = attr; + } + + // set dynamic class pointer + t_class **cl = +#if FLEXT_SYS == FLEXT_SYS_MAX + lib?&curlib->clss: +#endif + new t_class *; + +#if FLEXT_SYS == FLEXT_SYS_PD + // register object class + *cl = ::class_new( + (t_symbol *)nsym, + (t_newmethod)obj_new,(t_method)obj_free, + sizeof(flext_hdr),CLASS_DEFAULT,A_GIMME,A_NULL); +#elif FLEXT_SYS == FLEXT_SYS_MAX + if(!lib) { + ::setup( + (t_messlist **)cl, + (t_newmethod)obj_new,(t_method)obj_free, + sizeof(flext_hdr),NULL,A_GIMME,A_NULL); + // attention: in Max/MSP the *cl variable is not initialized after that call. + // just the address is stored, the initialization then occurs with the first object instance! + } +#else +#error Platform not implemented +#endif + + // make new dynamic object + FLEXT_TEMPINST(flext_class) *lo = new FLEXT_TEMPINST(flext_class)(*cl,newfun,freefun); + lo->lib = curlib; + lo->dsp = dsp; + lo->noi = noi; + lo->attr = attr; + +// post("ADDCLASS %s,%s = %p -> LIBOBJ %p -> %p (lib=%i,dsp=%i)",idname,names,*cl,lo,lo->clss,lib?1:0,dsp?1:0); + + // parse the argument type list and store it with the object + if(argtp1 == FLEXTTPN_VAR) + lo->argc = -1; + else { + int argtp,i; + va_list marker; + + // parse a first time and count only + va_start(marker,argtp1); + for(argtp = argtp1; argtp != FLEXTTPN_NULL; ++lo->argc) argtp = (int)va_arg(marker,int); + va_end(marker); + + lo->argv = new int[lo->argc]; + + // now parse and store + va_start(marker,argtp1); + for(argtp = argtp1,i = 0; i < lo->argc; ++i) { + lo->argv[i] = argtp; + argtp = (int)va_arg(marker,int); + } + va_end(marker); + } + + // get unique class id + t_classid clid = lo; + + // make help reference + const char *helptxt = FLEXT_TEMPINST(extract)(names,-1); + if(helptxt) { + const char *sl = strchr(helptxt,'/'); + if(sl && !sl[1]) + // helptxt is only the path (path with trailing /) + flext_obj::DefineHelp(clid,idname,helptxt,dsp); + else + // helptxt is path and patch name + flext_obj::DefineHelp(clid,helptxt,NULL,dsp); + } + + for(int ix = 0; ; ++ix) { + // in this loop register all the possible aliases of the object + + const char *c = ix?FLEXT_TEMPINST(extract)(names,ix):GetString(nsym); + if(!c || !*c) break; + + // add to name list + const t_symbol *lsym = MakeSymbol(c); + FindName(lsym,lo); + +#if FLEXT_SYS == FLEXT_SYS_PD + if(ix > 0) + // in PD the first name is already registered with class creation + ::class_addcreator((t_newmethod)obj_new,(t_symbol *)lsym,A_GIMME,A_NULL); +#elif FLEXT_SYS == FLEXT_SYS_MAX + if(ix > 0 || lib) + // in Max/MSP the first alias gets its name from the name of the object file, + // unless it is a library (then the name can be different) + ::alias(const_cast<char *>(c)); +#else +#error +#endif + } + + try { + // call class setup function + setupfun(clid); + } + catch(std::exception &x) { + error("%s: %s",idname,x.what()); + } + catch(char *txt) { + error("%s: %s",idname,txt); + } + catch(...) { + error("%s - Unknown exception while initializing class",idname); + } +} + + +#define NEWARGS 256 // must be larger than FLEXT_NEWARGS = 5 + +typedef FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_obj)) *(*libfun)(int,t_atom *); + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(flext_hdr *FLEXT_CLASSDEF(flext_obj))::obj_new(const t_symbol *s,short _argc_,t_atom *argv) +#else +FLEXT_TEMPIMPL(flext_hdr *FLEXT_CLASSDEF(flext_obj))::obj_new(const t_symbol *s,int _argc_,t_atom *argv) +#endif +{ + Locker lock; + + flext_hdr *obj = NULL; + FLEXT_TEMPINST(flext_class) *lo = FindName(s); + + if(lo) { +// post("NEWOBJ %s = %p -> %p",GetString(s),lo,lo->clss); + + bool ok = true; + t_atom args[NEWARGS]; + + int argc = _argc_; + if(lo->attr) { + argc = flext_base::CheckAttrib(argc,argv); + } + + if(lo->argc >= 0) { +#ifdef FLEXT_DEBUG + if(lo->argc > FLEXT_MAXNEWARGS) { ERRINTERNAL(); ok = false; } +#endif + + int misnum = 0; + if(argc > lo->argc) { ok = false; misnum = 1; } + + for(int i = 0; ok && i < lo->argc; ++i) { + switch(lo->argv[i]) { +#if FLEXT_SYS != FLEXT_SYS_PD + case FLEXTTPN_INT: + case FLEXTTPN_DEFINT: + if(i >= argc) + if(lo->argv[i] == FLEXTTPN_DEFINT) SetInt(args[i],0); + else { misnum = -1,ok = false; break; } + else if(IsInt(argv[i])) args[i] = argv[i]; + else if(IsFloat(argv[i])) SetInt(args[i],(int)GetFloat(argv[i])); + else ok = false; + break; +#endif + case FLEXTTPN_FLOAT: + case FLEXTTPN_DEFFLOAT: + if(i >= argc) + if(lo->argv[i] == FLEXTTPN_DEFFLOAT) SetFloat(args[i],0); + else { misnum = -1,ok = false; break; } + else if(IsInt(argv[i])) SetFloat(args[i],(float)GetInt(argv[i])); + else if(IsFloat(argv[i])) args[i] = argv[i]; + else ok = false; + break; + case FLEXTTPN_SYM: + case FLEXTTPN_DEFSYM: + // \todo shall we analyze the patcher args????... should already be done! + if(i >= argc) + if(lo->argv[i] == FLEXTTPN_DEFSYM) SetSymbol(args[i],sym__); + else { misnum = -1,ok = false; break; } + else if(IsSymbol(argv[i])) +// SetSymbol(args[i],GetParamSym(GetSymbol(argv[i]),NULL)); + args[i] = argv[i]; + else ok = false; + break; + } + } + + if(!ok) { + if(misnum) + error("%s: %s creation arguments",GetString(s),misnum < 0?"Not enough":"Too many"); + else + error("%s: Creation arguments do not match",GetString(s)); + } + } + + + if(ok) { + flext_obj::initing = true; + + try { +#if FLEXT_SYS == FLEXT_SYS_PD + obj = (flext_hdr *)::pd_new(lo->clss); +#elif FLEXT_SYS == FLEXT_SYS_MAX + obj = (flext_hdr *)::newobject(lo->clss); +#else +#error +#endif + flext_obj::m_holder = obj; + flext_obj::m_holdclass = lo; + flext_obj::m_holdname = s; + flext_obj::init_ok = true; + + // get actual flext object (newfun calls "new flext_obj()") + if(lo->argc >= 0) + obj->data = lo->newfun(lo->argc,args); + else + obj->data = lo->newfun(argc,argv); + + flext_obj::m_holder = NULL; + flext_obj::m_holdclass = NULL; + flext_obj::m_holdname = NULL; + + ok = obj->data && + // check constructor exit flag + flext_obj::init_ok; + + if(ok) { + if(lo->attr) { + // DON'T convert eventual patcher args here... this is done by the actual attribute stuff + // so that the initial $- or #- be preserved! + + // store creation args for attribute initialization (inside flext_base::Init()) + flext_obj::m_holdaargc = _argc_-argc; + flext_obj::m_holdaargv = argv+argc; + } + else { + flext_obj::m_holdaargc = 0; + flext_obj::m_holdaargv = NULL; + } + + // call virtual init function + // here, inlets, outlets, methods and attributes can be set up + ok = obj->data->Init(); + + flext_obj::initing = false; + + // call another virtual init function + if(ok) ok = obj->data->Finalize(); + + flext_obj::m_holdaargc = 0; + flext_obj::m_holdaargv = NULL; + } + + } //try + catch(std::exception &x) { + error("%s - Exception while creating object: %s",GetString(s),x.what()); + ok = false; + } + catch(char *txt) { + error("%s - Exception while creating object: %s",GetString(s),txt); + ok = false; + } + catch(...) { + error("%s - Unknown exception while creating object",GetString(s)); + ok = false; + } + + flext_obj::initing = false; + + if(ok) { +#if FLEXT_SYS == FLEXT_SYS_MAX + // create object-specific thread lock + critical_new(&obj->data->lock); +#endif + } + else { + // there was some init error, free object + lo->freefun(obj); + obj = NULL; + } + } + } +#ifdef FLEXT_DEBUG + else +#if FLEXT_SYS == FLEXT_SYS_MAX + // in Max/MSP an object with the name of the library exists, even if not explicitly declared! +// if(!lo->lib || s != lo->lib->name) +#endif + error("Class %s not found in library!",s->s_name); +#endif + + return obj; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_obj))::obj_free(flext_hdr *h) +{ + Locker lock; + + flext_hdr *hdr = (flext_hdr *)h; + const t_symbol *name = hdr->data->thisNameSym(); + FLEXT_TEMPINST(flext_class) *lcl = FindName(name); + + if(lcl) { + flext_obj::exiting = true; + + try { + // call virtual exit function + hdr->data->Exit(); + +#if FLEXT_SYS == FLEXT_SYS_MAX + // free object-specific thread lock + critical_free(hdr->data->lock); +#endif + + // now call object destructor and deallocate + lcl->freefun(hdr); + } + catch(std::exception &x) { + error("%s - Exception while destroying object: %s",GetString(name),x.what()); + } + catch(char *txt) { + error("%s - Exception while destroying object: %s",GetString(name),txt); + } + catch(...) { + error("%s - Unknown exception while destroying object",GetString(name)); + } + + flext_obj::exiting = false; + } +#ifdef FLEXT_DEBUG + else +#if FLEXT_SYS == FLEXT_SYS_MAX + // in Max/MSP an object with the name of the library exists, even if not explicitly declared! +// if(!lo->lib || s != lo->lib->name) +#endif + error("Class %s not found in library!",name); +#endif +} + + +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_obj))::thisClass() const +{ + FLEXT_ASSERT(x_obj); + return thisClassId()->clss; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::SetDist(t_classid c,bool d) { c->dist = d; } +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::DoDist() const { return thisClassId()->dist; } + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::ItemCont *FLEXT_CLASSDEF(flext_base))::ClMeths(t_classid c) { return &c->meths; } +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::ItemCont *FLEXT_CLASSDEF(flext_base))::ClAttrs(t_classid c) { return &c->attrs; } + +#include "flpopns.h" + +#endif // __FLEXT_LIB_CPP + diff --git a/externals/grill/trunk/flext/source/flmap.cpp b/externals/grill/trunk/flext/source/flmap.cpp new file mode 100644 index 0000000000000000000000000000000000000000..87a46daf582b67e73b01d3cc17257574a580e0b4 --- /dev/null +++ b/externals/grill/trunk/flext/source/flmap.cpp @@ -0,0 +1,255 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmap.cpp + \brief flext container classes. +*/ + +#ifndef __FLEXT_MAP_CPP +#define __FLEXT_MAP_CPP + +#include "flext.h" +#include "flmap.h" + +#include "flpushns.h" + +FLEXT_TEMPIMPL(TableAnyMap)::~TableAnyMap() { clear(); } + +FLEXT_TEMPIMPL(void TableAnyMap)::clear() +{ + if(left) { _delmap(left); left = NULL; } + if(right) { _delmap(right); right = NULL; } + n = 0; +} + +FLEXT_TEMPIMPL(void *TableAnyMap)::_set(int tsize,size_t k,void *t) +{ + FLEXT_ASSERT(n); + + if(n < tsize) { + // fall through + } + else if(k < data[0].key) + return _toleft(tsize,k,t); + else if(k > data[tsize-1].key) + return _toright(tsize,k,t); + + int ix = _tryix(k); + if(ix >= n) { + FLEXT_ASSERT(ix == n); + // after last entry + data[n++](k,t); + return NULL; + } + + size_t dk = data[ix].key; + if(k == dk) { + // update data in existing slot (same key) + void *a = data[ix].value; + data[ix] = t; + return a; + } + else { + // insert new slot by shifting the higher ones + FLEXT_ASSERT(k < dk); + void *a; + if(n == tsize) + a = _toright(tsize,data[tsize-1]); + else { + ++n; + a = NULL; + } + + Data *tg = data+ix; + for(Data *d = data+n-1; d > tg; d--) d[0] = d[-1]; + (*tg)(k,t); + return a; + } +} + +FLEXT_TEMPIMPL(void *TableAnyMap)::_find(int tsize,size_t k) const +{ + FLEXT_ASSERT(n); + if(n < tsize) { + // fall through + } + else if(k < data[0].key) + return left?left->_find(tsize,k):NULL; + else if(k > data[n-1].key) + return right?right->_find(tsize,k):NULL; + + const int ix = _tryix(k); + return ix < n && data[ix].key == k?data[ix].value:NULL; +} + +#ifdef FLEXT_DEBUG +FLEXT_TEMPIMPL(void TableAnyMap)::_check(int tsize) +{ + FLEXT_ASSERT(n); + + size_t k = data[0].key; + for(int i = 1; i < n; ++i) { + size_t k2 = data[i].key; + FLEXT_ASSERT(k < k2); + k = k2; + } + + if(left || right) FLEXT_ASSERT(n == tsize); + + if(left) { + FLEXT_ASSERT(flext::MemCheck(left)); + left->_check(tsize); + } + if(right) { + FLEXT_ASSERT(flext::MemCheck(right)); + right->_check(tsize); + } +} +#endif + +FLEXT_TEMPIMPL(void *TableAnyMap)::_remove(int tsize,size_t k) +{ + FLEXT_ASSERT(n); + if(n < tsize) { + // fall through + } + else if(k < data[0].key) { + void *r = left?left->_remove(tsize,k):NULL; + if(r) _eraseempty(left); + return r; + } + else if(k > data[n-1].key) { + void *r = right?right->_remove(tsize,k):NULL; + if(r) _eraseempty(right); + return r; + } + + const int ix = _tryix(k); + if(ix >= n || data[ix].key != k) + return NULL; + else { + // found key in this map + void *ret = data[ix].value; + + Data dt; + bool fnd,ins = false; + if(n >= tsize) { + // if this table is full get fill-in elements from branches + if(left) { + // try to get biggest element from left branch + left->_getbig(dt); + _eraseempty(left); + fnd = true,ins = true; + } + else if(right) { + // try to get smallest element from right branch + right->_getsmall(dt); + _eraseempty(right); + fnd = true; + } + else + fnd = false; + } + else fnd = false; + + if(ins) { + // insert smaller element from left + for(int i = ix; i; --i) data[i] = data[i-1]; + data[0] = dt; + } + else { + // shift elements + for(int i = ix+1; i < n; ++i) data[i-1] = data[i]; + // insert bigger element from right or reduce table size + if(fnd) + data[n-1] = dt; + else + --n; + } + + return ret; + } +} + +FLEXT_TEMPIMPL(void TableAnyMap)::_getbig(Data &dt) +{ + FLEXT_ASSERT(n); + + if(right) { + right->_getbig(dt); + _eraseempty(right); + } + else { + dt = data[n-1]; + if(left) { + for(int i = n-1; i; --i) data[i] = data[i-1]; + left->_getbig(data[0]); + _eraseempty(left); + } + else + --n; + } +} + +FLEXT_TEMPIMPL(void TableAnyMap)::_getsmall(Data &dt) +{ + FLEXT_ASSERT(n); + + if(left) { + left->_getsmall(dt); + _eraseempty(left); + } + else { + dt = data[0]; + for(int i = 1; i < n; ++i) data[i-1] = data[i]; + if(right) { + right->_getsmall(data[n-1]); + _eraseempty(right); + } + else + --n; + } +} + +FLEXT_TEMPIMPL(void TableAnyMap)::iterator::forward() +{ + FLEXT_ASSERT(map || ix >= map->n); + + if(++ix >= map->n) { + TableAnyMap *nmap; + + // we reached the end of the slots + if(map->right) { + // climb up one + map = map->right; + leftmost(); + ix = 0; + } + else { + // fall back + for(;;) { + nmap = map->parent; + if(!nmap) break; // no parent + if(nmap->left == map) { + // ok, we are in front of the slots now + ix = 0; + map = nmap; + break; + } + else { + FLEXT_ASSERT(nmap->right == map); + ix = (map = nmap)->n; + } + } + } + } +} + +#include "flpopns.h" + +#endif // __FLEXT_MAP_CPP diff --git a/externals/grill/trunk/flext/source/flmap.h b/externals/grill/trunk/flext/source/flmap.h new file mode 100644 index 0000000000000000000000000000000000000000..55f7df57e39de5941a39f516a19b17b8b0769007 --- /dev/null +++ b/externals/grill/trunk/flext/source/flmap.h @@ -0,0 +1,258 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmap.h + \brief special map class (faster and less memory-consuming than std::map) +*/ + +#ifndef __FLMAP_H +#define __FLMAP_H + +#include "flprefix.h" + +/*! \defgroup FLEXT_SUPPORT Flext support classes + @{ +*/ + +#include "flpushns.h" + +FLEXT_TEMPLATE +class FLEXT_SHARE TableAnyMap +{ +public: + + virtual TableAnyMap *_newmap(TableAnyMap *parent) = 0; + virtual void _delmap(TableAnyMap *map) = 0; + + struct Data { + void operator()(size_t k,void *v) { key = k,value = v; } + void operator =(void *v) { value = v; } + + size_t key; + void *value; + }; + +protected: + // constructor and destructor are protected so that they can't be directly instantiated + + TableAnyMap(TableAnyMap *p,Data *dt) + : data(dt) + , parent(p),left(0),right(0) + , n(0) + {} + + virtual ~TableAnyMap(); + +public: + +#if 0 // set 1 for asserting the map structure (very cpu-intensive!) + void check(int tsize) { if(n) _check(tsize); } +#else +// void check(int tsize) {} +#endif + + void *insert(int tsize,size_t k,void *t) + { + void *r; + if(LIKELY(n)) + r = _set(tsize,k,t); + else { + data[n++](k,t); + r = 0; + } +// check(tsize); + return r; + } + + void *find(int tsize,size_t k) const { return LIKELY(n)?_find(tsize,k):0; } + + void *remove(int tsize,size_t k) + { + void *r = LIKELY(n)?_remove(tsize,k):0; +// check(tsize); + return r; + } + + virtual void clear(); + + class FLEXT_SHARE iterator + { + public: + iterator(): map(0) {} + iterator(const TableAnyMap &m): map(&m),ix(0) { leftmost(); } + iterator(const iterator &it): map(it.map),ix(it.ix) {} + + iterator &operator =(const iterator &it) { map = it.map,ix = it.ix; return *this; } + + operator bool() const { return map && ix < map->n; } + + // no checking here! + void *data() const { return map->data[ix].value; } + size_t key() const { return map->data[ix].key; } + + iterator &operator ++() { forward(); return *this; } + + protected: + void leftmost() + { + // search smallest branch (go left as far as possible) + const TableAnyMap *nmap; + while((nmap = map->left) != 0) map = nmap; + } + + void forward(); + + // pointers to map and index within + const TableAnyMap *map; + int ix; + }; + + void _init(size_t k,void *t) { data[0](k,t); n = 1; } + + void *_toleft(int tsize,size_t k,void *t) + { + if(left) + return left->_set(tsize,k,t); + else { + (left = _newmap(this))->_init(k,t); + return 0; + } + } + + void *_toright(int tsize,size_t k,void *t) + { + if(right) + return right->_set(tsize,k,t); + else { + (right = _newmap(this))->_init(k,t); + return 0; + } + } + + void *_toleft(int tsize,Data &v) { return _toleft(tsize,v.key,v.value); } + void *_toright(int tsize,Data &v) { return _toright(tsize,v.key,v.value); } + + void *_set(int tsize,size_t k,void *t); + void *_find(int tsize,size_t k) const; + void *_remove(int tsize,size_t k); + +#ifdef FLEXT_DEBUG + void _check(int tsize); +#endif + + Data *data; + TableAnyMap *parent,*left,*right; + int n; + + //! return index of data item with key <= k + //! \note index can point past the last item! + unsigned int _tryix(size_t k) const + { + unsigned int ix = 0,b = n; + while(ix != b) { + const unsigned int c = (ix+b)>>1; + const size_t dk = data[c].key; + if(k == dk) + return c; + else if(k < dk) + b = c; + else if(ix < c) + ix = c; + else + return b; + } + return ix; + } + + void _eraseempty(TableAnyMap *&b) + { + if(!b->n) { + // remove empty branch + _delmap(b); b = 0; + } + } + + void _getsmall(Data &dt); + void _getbig(Data &dt); + +private: + // hide, so that it can't be used..... + explicit TableAnyMap(const TableAnyMap &): data(NULL) {} + TableAnyMap &operator =(const TableAnyMap &) { return *this; } +}; + +template <typename K,typename T,int N = 8> +class TablePtrMap + : +#if (defined(_MSC_VER) && _MSC_VER < 1300) || defined(__BORLANDC__) || defined(__MWERKS__) + public // necessary for VC6 +#endif + FLEXT_TEMPINST(TableAnyMap) +{ +public: + TablePtrMap(): TableAnyMap(0,slots),count(0) {} + virtual ~TablePtrMap() { clear(); } + + virtual void clear() { TableAnyMap::clear(); count = 0; } + + inline int size() const { return count; } + + inline T insert(K k,T t) + { + void *d = TableAnyMap::insert(N,*(size_t *)&k,(void *)t); + if(!d) ++count; + return (T)d; + } + + inline T find(K k) const { return (T)TableAnyMap::find(N,*(size_t *)&k); } + + inline T remove(K k) + { + void *d = TableAnyMap::remove(N,*(size_t *)&k); + if(LIKELY(d)) --count; + return (T)d; + } + + + class iterator + : TableAnyMap::iterator + { + public: + iterator() {} + iterator(const TablePtrMap &m): TableAnyMap::iterator(m) {} + iterator(const iterator &it): TableAnyMap::iterator(it) {} + + // this ugly syntax (cast to parent class) is needed for MSVC6 + + inline iterator &operator =(const iterator &it) { ((TableAnyMap::iterator &)*this) = it; return *this; } + + inline operator bool() const { return (bool)((TableAnyMap::iterator &)*this); } + inline T data() const { return (T)(((TableAnyMap::iterator &)*this).data()); } + inline K key() const { return (K)(((TableAnyMap::iterator &)*this).key()); } + + inline iterator &operator ++() { ++((TableAnyMap::iterator &)*this); return *this; } + }; + +protected: + TablePtrMap(TableAnyMap *p): TableAnyMap(p,slots),count(0) {} + + virtual TableAnyMap *_newmap(TableAnyMap *parent) { return new TablePtrMap(parent); } + virtual void _delmap(TableAnyMap *map) { delete (TablePtrMap *)map; } + + int count; + Data slots[N]; + +private: + explicit TablePtrMap(const TableAnyMap &p) {} +}; + +#include "flpopns.h" + +//! @} // FLEXT_SUPPORT + +#endif diff --git a/externals/grill/trunk/flext/source/flmeth.cpp b/externals/grill/trunk/flext/source/flmeth.cpp new file mode 100644 index 0000000000000000000000000000000000000000..554f4066af1d50768f0b74e5324f6bfc46a857fb --- /dev/null +++ b/externals/grill/trunk/flext/source/flmeth.cpp @@ -0,0 +1,139 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmeth.cpp + \brief Method processing of flext base class. +*/ + +#ifndef __FLEXT_METH_CPP +#define __FLEXT_METH_CPP + +#include "flext.h" +#include "flinternal.h" +#include <cstring> +#include <cstdarg> + +#include "flpushns.h" + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::MethItem::MethItem(AttrItem *conn): + Item(conn),index(0), + argc(0),args(NULL) + ,fun(NULL) +{} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::MethItem::~MethItem() +{ + if(args) delete[] args; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MethItem::SetArgs(methfun _fun,int _argc,metharg *_args) +{ + fun = _fun; + if(args) delete[] args; + argc = _argc,args = _args; +} + +/*! \brief Add a method to the queue +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddMethod(ItemCont *ma,int inlet,const t_symbol *tag,methfun fun,metharg tp,...) +{ +#ifdef FLEXT_LOG_MSGS + post("addmethod %i:%s",inlet,GetString(tag)); +#endif + + va_list marker; + + // at first just count the arg type list (in argc) + int argc = 0; + va_start(marker,tp); + metharg *args = NULL,arg = tp; + for(; arg != a_null; ++argc) arg = (metharg)va_arg(marker,int); //metharg); + va_end(marker); + + if(argc > 0) { + if(argc > FLEXT_MAXMETHARGS) { + error("flext - method %s: only %i arguments are type-checkable: use variable argument list for more",tag?GetString(tag):"?",FLEXT_MAXMETHARGS); + argc = FLEXT_MAXMETHARGS; + } + + args = new metharg[argc]; + + va_start(marker,tp); + metharg a = tp; + for(int ix = 0; ix < argc; ++ix) { +#ifdef FLEXT_DEBUG + if(a == a_list && ix > 0) { + ERRINTERNAL(); + } +#endif +#if FLEXT_SYS == FLEXT_SYS_PD && defined(FLEXT_COMPATIBLE) + if(a == a_pointer) { + post("Pointer arguments are not allowed in compatibility mode"); + } +#endif + args[ix] = a; + a = (metharg)va_arg(marker,int); //metharg); + } + va_end(marker); + } + + MethItem *mi = new MethItem; + mi->index = ma->Members(); + mi->SetArgs(fun,argc,args); + ma->Add(mi,tag,inlet); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ListMethods(AtomList &la,int inlet) const +{ + typedef TablePtrMap<int,const t_symbol *,32> MethList; + MethList list[2]; + ItemCont *clmethhead = ClMeths(thisClassId()); + + int i; + for(i = 0; i <= 1; ++i) { + ItemCont *a = i?methhead:clmethhead; + if(a && a->Contained(inlet)) { + ItemSet &ai = a->GetInlet(inlet); + for(FLEXT_TEMP_TYPENAME ItemSet::iterator as(ai); as; ++as) { + for(Item *al = as.data(); al; al = al->nxt) { + MethItem *aa = (MethItem *)al; + // check it's not related to an attribute + if(!aa->IsAttr()) { + list[i].insert(aa->index,as.key()); + break; + } + } + } + } + } + + la((int)list[0].size()+(int)list[1].size()); + int ix = 0; + for(i = 0; i <= 1; ++i) + for(MethList::iterator it(list[i]); it; ++it) + SetSymbol(la[ix++],it.data()); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::cb_ListMethods(flext_base *c,int argc,const t_atom *argv) +{ + Locker lock(c); + if(c->HasAttributes() && (argc == 0 || (argc == 1 && CanbeInt(argv[0])))) { + // defined in flsupport.cpp + int inlet = argc?GetAInt(argv[0]):0; + AtomListStatic<32> la; + c->ListMethods(la,inlet); + c->ToOutAnything(c->GetOutAttr(),sym_methods,la.Count(),la.Atoms()); + return true; + } + else + return false; +} + +#include "flpopns.h" + +#endif // __FLEXT_METH_CPP diff --git a/externals/grill/trunk/flext/source/flmsg.cpp b/externals/grill/trunk/flext/source/flmsg.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2900c115833095c69ab5b8fb720c1769912871a6 --- /dev/null +++ b/externals/grill/trunk/flext/source/flmsg.cpp @@ -0,0 +1,308 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmsg.cpp + \brief Message processing of flext base class. +*/ + +#ifndef __FLEXT_MSG_CPP +#define __FLEXT_MSG_CPP + +#include "flext.h" + +#include "flpushns.h" + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::TryMethTag(Item *lst,const t_symbol *tag,int argc,const t_atom *argv) +{ + for(; lst; lst = lst->nxt) { + MethItem *m = (MethItem *)lst; + +// FLEXT_LOG3("found method tag %s: inlet=%i, argc=%i",GetString(tag),m->inlet,argc); + + if(m->attr) { + // attributes are treated differently + + if(m->attr->IsGet()) + return DumpAttrib(tag,m->attr); + else + return SetAttrib(tag,m->attr,argc,argv); + } + else { + if(m->argc == 1) { + if(m->args[0] == a_list) { + // try list + if(((methfun_V)m->fun)(this,argc,const_cast<t_atom *>(argv))) return true; + } + else if(m->args[0] == a_any) { + // try anything + if(((methfun_A)m->fun)(this,tag,argc,const_cast<t_atom *>(argv))) return true; + } + } + + // try matching number of args + if(m->argc == argc) { + int ix; + t_any aargs[FLEXT_MAXMETHARGS]; + bool ok = true; + for(ix = 0; ix < argc && ok; ++ix) { + switch(m->args[ix]) { + case a_float: { + if(IsFloat(argv[ix])) aargs[ix].ft = GetFloat(argv[ix]); + else if(IsInt(argv[ix])) aargs[ix].ft = (float)GetInt(argv[ix]); + else ok = false; + + if(ok) FLEXT_LOG2("int arg %i = %f",ix,aargs[ix].ft); + break; + } + case a_int: { + if(IsFloat(argv[ix])) aargs[ix].it = (int)GetFloat(argv[ix]); + else if(IsInt(argv[ix])) aargs[ix].it = GetInt(argv[ix]); + else ok = false; + + if(ok) FLEXT_LOG2("float arg %i = %i",ix,aargs[ix].it); + break; + } + case a_symbol: { + if(IsSymbol(argv[ix])) aargs[ix].st = GetSymbol(argv[ix]); + else ok = false; + + if(ok) FLEXT_LOG2("symbol arg %i = %s",ix,GetString(aargs[ix].st)); + break; + } +#if FLEXT_SYS == FLEXT_SYS_PD + case a_pointer: { + if(IsPointer(argv[ix])) aargs[ix].pt = (t_gpointer *)GetPointer(argv[ix]); + else ok = false; + break; + } +#endif + default: + error("Argument type illegal"); + ok = false; + } + } + + if(ok && ix == argc) { + switch(argc) { + case 0: return ((methfun_0)m->fun)(this); + case 1: return ((methfun_1)m->fun)(this,aargs[0]); + case 2: return ((methfun_2)m->fun)(this,aargs[0],aargs[1]); + case 3: return ((methfun_3)m->fun)(this,aargs[0],aargs[1],aargs[2]); + case 4: return ((methfun_4)m->fun)(this,aargs[0],aargs[1],aargs[2],aargs[3]); + case 5: return ((methfun_5)m->fun)(this,aargs[0],aargs[1],aargs[2],aargs[3],aargs[4]); + default: + FLEXT_ASSERT(false); + } + } + } + } + } + return false; +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::TryMethAny(Item *lst,const t_symbol *s,int argc,const t_atom *argv) +{ + for(; lst; lst = lst->nxt) { + MethItem *m = (MethItem *)lst; + + if(!m->IsAttr() && m->argc == 1 && m->args[0] == a_any) { +// FLEXT_LOG4("found any method for %s: inlet=%i, symbol=%s, argc=%i",GetString(m->tag),m->inlet,GetString(s),argc); + + if(((methfun_A)m->fun)(this,s,argc,const_cast<t_atom *>(argv))) return true; + } + } + return false; +} + +/*! \brief Find a method item for a specific tag and arguments + \remark All attributes are also stored in the method list and retrieved by a member of the method item +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::FindMeth(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + Item *lst; + ItemCont *clmethhead = ClMeths(thisClassId()); + + // search for exactly matching tag + if(UNLIKELY(methhead) && (lst = methhead->FindList(s,inlet)) != NULL && TryMethTag(lst,s,argc,argv)) return true; + if((lst = clmethhead->FindList(s,inlet)) != NULL && TryMethTag(lst,s,argc,argv)) return true; + + // if nothing found try any inlet + if(UNLIKELY(methhead) && (lst = methhead->FindList(s,-1)) != NULL && TryMethTag(lst,s,argc,argv)) return true; + if((lst = clmethhead->FindList(s,-1)) != NULL && TryMethTag(lst,s,argc,argv)) return true; + + return false; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::FindMethAny(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + Item *lst; + ItemCont *clmethhead = ClMeths(thisClassId()); + + if(UNLIKELY(methhead) && (lst = methhead->FindList(sym_anything,inlet)) != NULL && TryMethAny(lst,s,argc,argv)) return true; + if((lst = clmethhead->FindList(sym_anything,inlet)) != NULL && TryMethAny(lst,s,argc,argv)) return true; + + // if nothing found try any inlet + if(UNLIKELY(methhead) && (lst = methhead->FindList(sym_anything,-1)) != NULL && TryMethAny(lst,s,argc,argv)) return true; + if((lst = clmethhead->FindList(sym_anything,-1)) != NULL && TryMethAny(lst,s,argc,argv)) return true; + + return false; +} + +/*! \brief All the message processing + The messages of all the inlets go here and are promoted to the registered callback functions +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::CbMethodHandler(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + static bool trap = false; + bool ret; + + curtag = s; + +#ifdef FLEXT_LOG_MSGS + post("methodmain inlet:%i args:%i symbol:%s",inlet,argc,s?GetString(s):""); +#endif + + try { + ret = FindMeth(inlet,s,argc,argv); +#ifdef FLEXT_LOG_MSGS + if(ret) post("found %s message in %s,%i",GetString(s),__FILE__,__LINE__); +#endif + if(ret) goto end; + + if(argc == 1) { + if(s == sym_list) { + // for 1-element lists try the single atom (this is the format output by [route]) + if(IsFloat(argv[0])) + ret = FindMeth(inlet,sym_float,1,argv); + else if(IsInt(argv[0])) + ret = FindMeth(inlet,sym_int,1,argv); + else if(IsSymbol(argv[0])) + ret = FindMeth(inlet,sym_symbol,1,argv); + #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) + else if(IsPointer(argv[0])) + ret = FindMeth(inlet,sym_pointer,1,argv); + #endif + if(ret) goto end; + } + else { + if(s == sym_float) { + #if FLEXT_SYS == FLEXT_SYS_MAX + t_atom at; + // If float message is not explicitly handled: try int handler instead + SetInt(at,(int)GetFloat(argv[0])); + ret = FindMeth(inlet,sym_int,1,&at); + if(ret) goto end; + #endif + // If not explicitly handled: try list handler instead + ret = FindMeth(inlet,sym_list,1,argv); + if(ret) goto end; + } + #if FLEXT_SYS == FLEXT_SYS_MAX + else if(s == sym_int) { + t_atom at; + // If int message is not explicitly handled: try float handler instead + SetFloat(at,(float)GetInt(argv[0])); + ret = FindMeth(inlet,sym_float,1,&at); + if(ret) goto end; + // If not explicitly handled: try list handler instead + ret = FindMeth(inlet,sym_list,1,argv); + if(ret) goto end; + } + #endif + else if(s == sym_symbol) { + ret = FindMeth(inlet,sym_list,1,argv); + if(ret) goto end; + } + #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) + else if(s == sym_pointer) { + ret = FindMeth(inlet,sym_list,1,argv); + if(ret) goto end; + } + #endif + } + } + else if(argc == 0) { + // If symbol message (pure anything without args) is not explicitly handled: try list handler instead + if(s == sym_bang) + // bang is equal to an empty list + ret = FindMeth(inlet,sym_list,0,NULL); + else { + t_atom at; + SetSymbol(at,s); + ret = FindMeth(inlet,sym_list,1,&at); + } +#ifdef FLEXT_LOG_MSGS + if(ret) post("found %s message in %s,%i",GetString(sym_list),__FILE__,__LINE__); +#endif + if(ret) goto end; + } + + // if distmsgs is switched on then distribute list elements over inlets (Max/MSP behavior) + if(DoDist() && inlet == 0 && s == sym_list && insigs <= 1 && !trap) { + int i = incnt; + if(i > argc) i = argc; + for(--i; i >= 0; --i) { // right to left distribution + const t_symbol *sym = NULL; + if(IsFloat(argv[i])) sym = sym_float; + else if(IsInt(argv[i])) sym = sym_int; + else if(IsSymbol(argv[i])) sym = sym_symbol; + #if FLEXT_SYS == FLEXT_SYS_PD && !defined(FLEXT_COMPATIBLE) + else if(IsPointer(argv[i])) sym = sym_pointer; // can pointer atoms occur here? + #endif + + if(sym) { + trap = true; + CbMethodHandler(i,sym,1,argv+i); + trap = false; + } + } + + goto end; + } + + ret = FindMethAny(inlet,s,argc,argv); + + if(!ret) ret = CbMethodResort(inlet,s,argc,argv); + } + catch(std::exception &x) { + error("%s - %s: %s",thisName(),GetString(s),x.what()); + ret = false; + } + catch(const char *txt) { + error("%s - %s: %s",thisName(),GetString(s),txt); + ret = false; + } + catch(...) { + error("%s - %s : Unknown exception while processing method",thisName(),GetString(s)); + ret = false; + } + +end: + curtag = NULL; + + return ret; // true if appropriate handler was found and called +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + post("%s: message unhandled - inlet:%i args:%i symbol:%s",thisName(),inlet,argc,s?GetString(s):""); + return false; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::CbMethodResort(int inlet,const t_symbol *s,int argc,const t_atom *argv) +{ + // call deprecated version + return m_method_(inlet,s,argc,argv); +} + +#include "flpopns.h" + +#endif // __FLEXT_MSG_CPP + + diff --git a/externals/grill/trunk/flext/source/flmspbuffer.h b/externals/grill/trunk/flext/source/flmspbuffer.h new file mode 100644 index 0000000000000000000000000000000000000000..a262f79ed6761a20187cd11c5a66075a582e28fa --- /dev/null +++ b/externals/grill/trunk/flext/source/flmspbuffer.h @@ -0,0 +1,80 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flmspbuffer.h + \brief Definition of the Max/MSP buffer structure + \internal + + This file comes from David Zicarellis inofficial package index.sit + The latter is not easily found so i included the original file buffer.h with flext +*/ + +#if (FLEXT_SYS == FLEXT_SYS_MAX) && !defined(__FLEXT_MSPBUFFER_H) +#define __FLEXT_MSPBUFFER_H + +enum { + MAXCHAN = 4 +}; + +enum { + bi_basefreq = 0, + bi_detune, + bi_lowfreq, + bi_hifreq, + bi_lowvel, + bi_hivel, + bi_gain, + bi_numparams +}; + +typedef struct _buffer +{ + t_object b_obj; // doesn't have any signals so it doesn't need to be pxobject + long b_valid; // flag is off during read replacement or editing operation + float *b_samples; // stored with interleaved channels if multi-channel + long b_frames; // number of sample frames (each one is sizeof(float) * b_nchans bytes) + long b_nchans; // number of channels + long b_size; // size of buffer in floats + float b_sr; // sampling rate of the buffer + float b_1oversr; // 1 / sr + float b_msr; // sr * .001 + // Mac-specific stuff + float *b_memory; // pointer to where memory starts (initial padding for interp) + t_symbol *b_name; + short b_vol; + short b_space; + // looping info (from AIFF file) + long b_susloopstart; // in samples + long b_susloopend; // in samples + long b_relloopstart; // in samples + long b_relloopend; // in samples + // instrument info (from AIFF file) + short b_inst[bi_numparams]; + // window stuff + void *b_wind; + double b_pixperfr; + double b_frperpix; + long b_imagesize; + Point b_scroll; + long b_scrollscale; + long b_selbegin[MAXCHAN]; + long b_selend[MAXCHAN]; + long b_zoom; + long b_zim[11]; + void *b_mouseout; + long b_format; // 'AIFF' or 'Sd2f' + t_symbol *b_filename; // last file read (not written) for readagain message + long b_oldnchans; // used for resizing window in case of # of channels change + void *b_doneout; + long b_outputbytes; // number of bytes used for output sample (1-4) + long b_modtime; // last modified time ("dirty" method) +} t_buffer; + +#define BUFWIND(x) ((t_wind *)(x->b_wind)) + +#endif diff --git a/externals/grill/trunk/flext/source/flout.cpp b/externals/grill/trunk/flext/source/flout.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ad5caa26f3771d0ff18b2d95e0f7d6ecf77a84bb --- /dev/null +++ b/externals/grill/trunk/flext/source/flout.cpp @@ -0,0 +1,374 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flout.cpp + \brief Implementation of the flext outlet functionality. +*/ + +#ifndef __FLEXT_OUT_CPP +#define __FLEXT_OUT_CPP + +#include "flext.h" +#include "flinternal.h" +#include <cstring> + +#include "flpushns.h" + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToSysAtom(int n,const t_atom &at) const +{ + outlet *o = GetOut(n); + if(LIKELY(o)) { + CRITON(); + if(IsSymbol(at)) + outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(GetSymbol(at))); + else if(IsFloat(at)) + outlet_float((t_outlet *)o,GetFloat(at)); +#if FLEXT_SYS == FLEXT_SYS_MAX + else if(IsInt(at)) + outlet_flint((t_outlet *)o,GetInt(at)); +#endif +#if FLEXT_SYS == FLEXT_SYS_PD + else if(IsPointer(at)) + outlet_pointer((t_outlet *)o,GetPointer(at)); +#endif + else + error("Atom type not supported"); + CRITOFF(); + } +} +#else +#error Not implemented +#endif + +#if defined(FLEXT_THREADS) + #if FLEXT_QMODE == 2 + #define CHKTHR() (LIKELY((!IsThreadRegistered() || IsThread(flext::thrmsgid)) && !InDSP())) + #else + #define CHKTHR() (LIKELY(!IsThreadRegistered() && !InDSP())) + #endif +#else + #define CHKTHR() (LIKELY(!InDSP())) +#endif + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutBang(int n) const +{ + if(CHKTHR()) ToSysBang(n); else ToQueueBang(n); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutFloat(int n,float f) const +{ + if(CHKTHR()) ToSysFloat(n,f); else ToQueueFloat(n,f); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutInt(int n,int f) const +{ + if(CHKTHR()) ToSysInt(n,f); else ToQueueInt(n,f); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutSymbol(int n,const t_symbol *s) const +{ + if(CHKTHR()) ToSysSymbol(n,s); else ToQueueSymbol(n,s); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutAtom(int n,const t_atom &at) const +{ + if(CHKTHR()) ToSysAtom(n,at); else ToQueueAtom(n,at); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToOutList(int n,int argc,const t_atom *argv) const +{ + if(CHKTHR()) ToSysList(n,argc,argv); else ToQueueList(n,argc,argv); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(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); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ToOutMsg(MsgBundle *mb) +{ + if(CHKTHR()) ToSysMsg(mb); else ToQueueMsg(mb); +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Forward(const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) +{ + return CHKTHR()?SysForward(recv,s,argc,argv):QueueForward(recv,s,argc,argv); +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::InitInlets() +{ + bool ok = true; + + // incnt has number of inlets (any type) + // insigs should be 0 + + FLEXT_ASSERT(!insigs && !inlets); + + // ---------------------------------- + // create inlets + // ---------------------------------- + +#if FLEXT_SYS == FLEXT_SYS_MAX + // copy inlet descriptions + indesc = new char *[incnt]; + for(int i = 0; i < incnt; ++i) { + xlet &x = inlist[i]; + indesc[i] = x.desc; + x.desc = NULL; + } +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + inlets = incnt > 1?new px_object *[incnt-1]:NULL; +#endif + + // type info is now in list array +#if FLEXT_SYS == FLEXT_SYS_PD + { + int cnt = 0; + if(incnt >= 1) { + xlet &xi = inlist[0]; // points to first inlet + if(xi.tp == xlet_sig) ++insigs; + // else leftmost inlet is already there... + ++cnt; + +#if PD_MINOR_VERSION >= 37 && defined(PD_DEVEL_VERSION) + // set tooltip +// this is on a per-class basis... we cannot really use it here +// if(xi.desc && *xi.desc) class_settip(thisClass(),gensym(xi.desc)); +#endif + } + + for(int ix = 1; ix < incnt; ++ix,++cnt) { + xlet &xi = inlist[ix]; // points to first inlet + t_inlet *in = NULL; + switch(xi.tp) { + case xlet_float: + case xlet_int: { + if(ix > 9) { + // proxy inlet needed + (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages + in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, (t_symbol *)sym_float, (t_symbol *)sym_float); + } + else { + inlets[ix-1] = NULL; + static char sym[] = " ft ?"; + sym[4] = '0'+ix; + in = inlet_new(&x_obj->obj, &x_obj->obj.ob_pd, (t_symbol *)sym_float, gensym(sym)); + } + break; + } + case xlet_sym: + (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages + in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, (t_symbol *)sym_symbol, (t_symbol *)sym_symbol); + break; + case xlet_list: + (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages + in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, (t_symbol *)sym_list, (t_symbol *)sym_list); + break; + case xlet_any: + (inlets[ix-1] = (px_object *)pd_new(px_class))->init(this,ix); // proxy for 2nd inlet messages + in = inlet_new(&x_obj->obj,&inlets[ix-1]->obj.ob_pd, 0, 0); + break; + case xlet_sig: + inlets[ix-1] = NULL; +#ifdef FLEXT_COMPATIBLE + if(inlist[ix-1].tp != xlet_sig) { + post("%s: All signal inlets must be left-aligned in compatibility mode",thisName()); + ok = false; + } + else +#endif + { + // pd is not able to handle signals and messages into the same inlet... + in = inlet_new(&x_obj->obj, &x_obj->obj.ob_pd, (t_symbol *)sym_signal, (t_symbol *)sym_signal); + ++insigs; + } + break; + default: + inlets[ix-1] = NULL; + error("%s: Wrong type for inlet #%i: %i",thisName(),ix,(int)inlist[ix].tp); + ok = false; + } + +#if PD_MINOR_VERSION >= 37 && defined(PD_DEVEL_VERSION) + // set tooltip + if(in && xi.desc && *xi.desc) inlet_settip(in,gensym(xi.desc)); +#endif + } + + incnt = cnt; + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + { + int ix,cnt; + // count leftmost signal inlets + while(insigs < incnt && inlist[insigs].tp == xlet_sig) ++insigs; + + for(cnt = 0,ix = incnt-1; ix >= insigs; --ix,++cnt) { + xlet &xi = inlist[ix]; + if(!ix) { + if(xi.tp != xlet_any) { + error("%s: Leftmost inlet must be of type signal or anything",thisName()); + ok = false; + } + } + else { + FLEXT_ASSERT(inlets); + switch(xi.tp) { + case xlet_sig: + inlets[ix-1] = NULL; + error("%s: All signal inlets must be left-aligned",thisName()); + ok = false; + break; + case xlet_float: { + if(ix < 10) { + inlets[ix-1] = NULL; + floatin(x_obj,ix); + break; + } + else + goto makeproxy; + } + case xlet_int: { + if(ix < 10) { + inlets[ix-1] = NULL; + intin(x_obj,ix); + break; + } + else + goto makeproxy; + } + makeproxy: + case xlet_any: // non-leftmost + case xlet_sym: + case xlet_list: + inlets[ix-1] = (px_object *)proxy_new(x_obj,ix,&((flext_hdr *)x_obj)->curinlet); + break; + default: + inlets[ix-1] = NULL; + error("%s: Wrong type for inlet #%i: %i",thisName(),ix,(int)xi.tp); + ok = false; + } + } + } + + if(inlets) + while(ix >= 0) inlets[ix--] = NULL; + } +#else +#error +#endif + + return ok; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::InitOutlets() +{ + bool ok = true; + int procattr = HasAttributes()?1:0; + + // outcnt has number of inlets (any type) + // outsigs should be 0 + + FLEXT_ASSERT(outsigs == 0); + + // ---------------------------------- + // create outlets + // ---------------------------------- + +#if FLEXT_SYS == FLEXT_SYS_MAX + // for Max/MSP the rightmost outlet has to be created first + outlet *attrtmp = NULL; + if(procattr) + attrtmp = (outlet *)newout_anything(thisHdr()); +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX + // copy outlet descriptions + outdesc = new char *[outcnt]; + for(int i = 0; i < outcnt; ++i) { + xlet &xi = outlist[i]; + outdesc[i] = xi.desc; + xi.desc = NULL; + } +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + if(outcnt+procattr) + outlets = new outlet *[outcnt+procattr]; + else + outlets = NULL; + + // type info is now in list array +#if FLEXT_SYS == FLEXT_SYS_PD + for(int ix = 0; ix < outcnt; ++ix) +#elif FLEXT_SYS == FLEXT_SYS_MAX + for(int ix = outcnt-1; ix >= 0; --ix) +#else +#error +#endif + { + switch(outlist[ix].tp) { + case xlet_float: + outlets[ix] = (outlet *)newout_float(&x_obj->obj); + break; + case xlet_int: + outlets[ix] = (outlet *)newout_flint(&x_obj->obj); + break; + case xlet_sig: + outlets[ix] = (outlet *)newout_signal(&x_obj->obj); + ++outsigs; + break; + case xlet_sym: + outlets[ix] = (outlet *)newout_symbol(&x_obj->obj); + break; + case xlet_list: + outlets[ix] = (outlet *)newout_list(&x_obj->obj); + break; + case xlet_any: + outlets[ix] = (outlet *)newout_anything(&x_obj->obj); + break; + default: + ; +#ifdef FLEXT_DEBUG + ERRINTERNAL(); +#endif + ok = false; + } + } +#else +#error +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + if(procattr) { + // attribute dump outlet is the last one + outlets[outcnt] = +#if FLEXT_SYS == FLEXT_SYS_PD + // attribute dump outlet is the last one + (outlet *)newout_anything(&x_obj->obj); +#elif FLEXT_SYS == FLEXT_SYS_MAX + attrtmp; +#endif + + } +#endif + + return ok; +} + +#include "flpopns.h" + +#endif // __FLEXT_OUT_CPP + + diff --git a/externals/grill/trunk/flext/source/flpopns.h b/externals/grill/trunk/flext/source/flpopns.h new file mode 100644 index 0000000000000000000000000000000000000000..d5dfa5a9b4f773290a9a367935b15c38f2e055c1 --- /dev/null +++ b/externals/grill/trunk/flext/source/flpopns.h @@ -0,0 +1,33 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +#ifdef FLEXT_USE_NAMESPACE + +#ifndef _FLEXT_IN_NAMESPACE + #error flext namespace pop is unbalanced +#endif + +#define __FLEXT_IN_NAMESPACE (_FLEXT_IN_NAMESPACE-1) +#undef _FLEXT_IN_NAMESPACE +#define _FLEXT_IN_NAMESPACE __FLEXT_IN_NAMESPACE +#undef __FLEXT_IN_NAMESPACE + +#if _FLEXT_IN_NAMESPACE == 0 + + #if 1 //defined(FLEXT_SHARED) + } // namespace + using namespace flext_ns; + #elif defined(__GNUC__) + } // anonymous namespace (don't export symbols) + #endif + + #undef _FLEXT_IN_NAMESPACE + +#endif + +#endif diff --git a/externals/grill/trunk/flext/source/flprefix.h b/externals/grill/trunk/flext/source/flprefix.h new file mode 100644 index 0000000000000000000000000000000000000000..edcb1d8a75d20b4da03de992e008c6cc3c0364e8 --- /dev/null +++ b/externals/grill/trunk/flext/source/flprefix.h @@ -0,0 +1,462 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flprefix.h + \brief Try to find out the platform. +*/ + +#ifndef __FLEXT_PREFIX_H +#define __FLEXT_PREFIX_H + +// --- definitions for FLEXT_SYS --------------------- +#define FLEXT_SYS_UNKNOWN 0 + +#ifndef FLEXT_SYS_MAX + #define FLEXT_SYS_MAX 1 +#else + // already defined + #undef FLEXT_SYS_MAX + #define FLEXT_SYS_MAX 1 + #define FLEXT_SYS FLEXT_SYS_MAX +#endif + +#ifndef FLEXT_SYS_PD + #define FLEXT_SYS_PD 2 +#else + // already defined + #undef FLEXT_SYS_PD + #define FLEXT_SYS_PD 2 + #define FLEXT_SYS FLEXT_SYS_PD +#endif + +#ifndef FLEXT_SYS_JMAX + #define FLEXT_SYS_JMAX 3 +#else + // already defined + #undef FLEXT_SYS_JMAX + #define FLEXT_SYS_JMAX 3 + #define FLEXT_SYS FLEXT_SYS_JMAX +#endif + +// --- definitions for FLEXT_OS ---------------------- +#define FLEXT_OS_UNKNOWN 0 +#define FLEXT_OS_WIN 1 +#define FLEXT_OS_MAC 2 +#define FLEXT_OS_LINUX 3 +#define FLEXT_OS_IRIX 4 + +// --- definitions for FLEXT_OS_API --------------------- +#define FLEXT_OSAPI_UNKNOWN 0 + +#define FLEXT_OSAPI_UNIX_POSIX 1 + +#define FLEXT_OSAPI_MAC_CLASSIC 2 +#define FLEXT_OSAPI_MAC_CARBON 3 +#define FLEXT_OSAPI_MAC_MACH 4 + +#define FLEXT_OSAPI_WIN_NATIVE 5 // WIN32 Platform +#define FLEXT_OSAPI_WIN_POSIX 6 // POSIX API (e.g. cygwin) + +// --- definitions for FLEXT_CPU --------------------- +#define FLEXT_CPU_UNKNOWN 0 +#define FLEXT_CPU_IA32 1 +#define FLEXT_CPU_PPC 2 +#define FLEXT_CPU_MIPS 3 +#define FLEXT_CPU_ALPHA 4 + +#define FLEXT_CPU_IA64 5 // Itanium +#define FLEXT_CPU_X86_64 6 // AMD-K8, EMT64 +#define FLEXT_CPU_PPC64 7 // G5 in 64 bit mode + +// compatibility +#define FLEXT_CPU_INTEL FLEXT_CPU_IA32 + +// --- definitions for FLEXT_THREADS ----------------- +#define FLEXT_THR_POSIX 1 // pthreads +#define FLEXT_THR_WIN32 2 // Win32 native +#define FLEXT_THR_MP 3 // MacOS MPThreads + +// --------------------------------------------------- +// support old definitions + +#ifndef FLEXT_SYS + #if defined(MAXMSP) + #define FLEXT_SYS FLEXT_SYS_MAX + // #undef MAXMSP + #elif defined(PD) + #define FLEXT_SYS FLEXT_SYS_PD + // #undef PD + // #undef NT + #endif +#endif + +#if defined(_DEBUG) && !defined(FLEXT_DEBUG) + #define FLEXT_DEBUG +#endif + +// --------------------------------------------------- + +// Definition of supported real-time systems +#if FLEXT_SYS == FLEXT_SYS_MAX || FLEXT_SYS == FLEXT_SYS_PD +#else + #error "System must be defined by either FLEXT_SYS_MAX or FLEXT_SYS_PD" +#endif + +// Definition of OS/CPU +#if defined(_MSC_VER) || (defined(__ICC) && (FLEXT_OS == FLEXT_OS_WIN || defined(_WIN32))) + // Microsoft C++ + // and Intel C++ (as guessed) + + #ifndef FLEXT_CPU + #if defined(_M_AMD64) + #define FLEXT_CPU FLEXT_CPU_X86_64 + #elif defined(_M_IA64) + #define FLEXT_CPU FLEXT_CPU_IA64 + #elif defined(_M_IX86) + #define FLEXT_CPU FLEXT_CPU_IA32 + #elif defined(_M_PPC) + #define FLEXT_CPU FLEXT_CPU_PPC + #elif defined(_M_MRX000) + #define FLEXT_CPU FLEXT_CPU_MIPS + #elif defined(_M_ALPHA) + #define FLEXT_CPU FLEXT_CPU_ALPHA + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(_WIN32) || defined(_WIN64) + #define FLEXT_OS FLEXT_OS_WIN + #define FLEXT_OSAPI FLEXT_OSAPI_WIN_NATIVE + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + #endif + + +#elif defined(__BORLANDC__) + // Borland C++ + + #ifndef FLEXT_CPU + #define FLEXT_CPU FLEXT_CPU_INTEL + #endif + #ifndef FLEXT_OS + #define FLEXT_OS FLEXT_OS_WIN + #define FLEXT_OSAPI FLEXT_OSAPI_WIN_NATIVE + #else + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + + +#elif defined(__MWERKS__) + // Metrowerks CodeWarrior + + #ifdef __MACH__ + // quick fix for OSX Mach-O + #ifdef __POWERPC__ + #ifdef __LP64__ + #define TARGET_CPU_PPC64 1 + #else + #define TARGET_CPU_PPC 1 + #endif + #else + #ifdef __LP64__ + #define TARGET_CPU_X86_64 1 + #else + #define TARGET_CPU_IA32 1 + #endif + #endif + #define TARGET_OS_MAC 1 + #define TARGET_API_MAC_OSX 1 + #else + #ifndef __CONDITIONALMACROS__ + #include <ConditionalMacros.h> + #endif + #endif + + #ifndef FLEXT_CPU + #if TARGET_CPU_X86_64 + #define FLEXT_CPU FLEXT_CPU_X86_64 + #elif TARGET_CPU_X86 + #define FLEXT_CPU FLEXT_CPU_IA32 + #elif TARGET_CPU_PPC64 + #define FLEXT_CPU FLEXT_CPU_PPC64 + #elif TARGET_CPU_PPC + #define FLEXT_CPU FLEXT_CPU_PPC + #elif TARGET_CPU_MIPS + #define FLEXT_CPU FLEXT_CPU_MIPS + #elif TARGET_CPU_ALPHA + #define FLEXT_CPU FLEXT_CPU_ALPHA + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if TARGET_OS_MAC + #define FLEXT_OS FLEXT_OS_MAC + #elif TARGET_OS_WIN32 + // assume Windows + #define FLEXT_OS FLEXT_OS_WIN + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OSAPI + #if TARGET_API_MAC_MACH + // this is for Mach-O + // this has the precedence (MACH also supports Carbon, of course) + #define FLEXT_OSAPI FLEXT_OSAPI_MAC_MACH + #elif TARGET_API_MAC_CARBON + // this is for CFM + #define FLEXT_OSAPI FLEXT_OSAPI_MAC_CARBON + #else + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + #endif + + // This is important for method and attribute callbacks + #pragma enumsalwaysint on + // This is important for everything + #pragma bool on + +#elif defined(__GNUG__) || (defined(__ICC) && (FLEXT_OS == FLEXT_OS_LINUX || defined(linux) || defined(__linux__))) + + // GNU C++ + // and Intel (as suggested by Tim Blechmann) + + #ifndef FLEXT_CPU + #if defined(__x86_64__) + #define FLEXT_CPU FLEXT_CPU_X86_64 + #elif defined(_X86_) || defined(__i386__) || defined(__i586__) || defined(__i686__) + #define FLEXT_CPU FLEXT_CPU_IA32 + #elif defined(__ppc64__) + #define FLEXT_CPU FLEXT_CPU_PPC64 + #elif defined(__ppc__) + #define FLEXT_CPU FLEXT_CPU_PPC + #elif defined(__MIPS__) + #define FLEXT_CPU FLEXT_CPU_MIPS + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(linux) || defined(__linux__) + #define FLEXT_OS FLEXT_OS_LINUX + #elif defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__MINGW32__) + #define FLEXT_OS FLEXT_OS_WIN + #elif defined(__APPLE__) && defined(__MACH__) + #define FLEXT_OS FLEXT_OS_MAC + // how about IRIX?? + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OSAPI + #if FLEXT_OS == FLEXT_OS_MAC + #define FLEXT_OSAPI FLEXT_OSAPI_MAC_MACH + #elif FLEXT_OS == FLEXT_OS_WIN + #if defined(__MINGW32__) + #define FLEXT_OSAPI FLEXT_OSAPI_WIN_NATIVE + #else + #define FLEXT_OSAPI FLEXT_OSAPI_WIN_POSIX + #endif + #elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX + #define FLEXT_OSAPI FLEXT_OSAPI_UNIX_POSIX + #else + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + #endif + +#elif defined(__MRC__) && defined(MPW_CPLUS) + // Apple MPW MrCpp + + #if __MRC__ < 0x500 + #error Apple MPW MrCpp v.5.0.0 or later compiler required + #endif + + #ifndef FLEXT_CPU + #if defined(__POWERPC__) + #define FLEXT_CPU FLEXT_CPU_PPC + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(macintosh) + #define FLEXT_OS FLEXT_OS_MAC + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OSAPI + #if FLEXT_OS == FLEXT_OS_MAC + #define FLEXT_OSAPI FLEXT_OSAPI_MAC_CLASSIC + #else + #define FLEXT_OSAPI FLEXT_OSAPI_UNKNOWN + #endif + #endif +#endif + + + +#if FLEXT_OS == FLEXT_OS_WIN +// #pragma message("Compiling for Windows") + + #if FLEXT_SYS == FLEXT_SYS_MAX +// #define WIN_VERSION 1 + #elif FLEXT_SYS == FLEXT_SYS_PD +// #define PD +// #define NT + #endif +#elif FLEXT_OS == FLEXT_OS_LINUX +// #pragma message("Compiling for Linux") + + #if FLEXT_SYS == FLEXT_SYS_PD +// #define PD + #else + #error "Flext SYS/OS combination unknown" + #endif +#elif FLEXT_OS == FLEXT_OS_IRIX +// #pragma message("Compiling for Irix") + + #if FLEXT_SYS == FLEXT_SYS_PD +// #define PD + #else + #error "Flext SYS/OS combination unknown" + #endif +#elif FLEXT_OS == FLEXT_OS_MAC +// #pragma message("Compiling for MacOS") + + #if FLEXT_SYS == FLEXT_SYS_PD +// #define PD + #endif +#else + #error "Operating system could not be determined" +#endif + +#if FLEXT_SYS == FLEXT_SYS_MAX +// #pragma message("Compiling for Max/MSP") +#elif FLEXT_SYS == FLEXT_SYS_PD +// #pragma message("Compiling for PD") +#endif + +// ----- set threading model ----- +// shared builds are always threaded +#ifdef FLEXT_SHARED + #undef FLEXT_THREADS + #define FLEXT_THREADS +#endif + +#ifdef FLEXT_THREADS + #undef FLEXT_THREADS + #if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_MAC && FLEXT_OSAPI != FLEXT_OSAPI_MAC_MACH + // Max for CFM doesn't like posix threads + #define FLEXT_THREADS FLEXT_THR_MP + #elif FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN + // for wmax use native Windows threads + #define FLEXT_THREADS FLEXT_THR_WIN32 + #else + #define FLEXT_THREADS FLEXT_THR_POSIX + #endif +#endif + +// ----- macros for class names ----- +/* + With linux (flat linker namespace) and more than one flext-based external loaded all calls to static + exported functions refer to the first instance loaded! + Therefore different class names are used so that the correct type of flext function is called. +*/ +#ifdef __DOXYGEN__ + #define FLEXT_CLASSDEF(CL) CL +#elif defined(FLEXT_DEBUG) + #if defined(FLEXT_SHARED) + #define FLEXT_CLASSDEF(CL) CL##_shared_d + #elif defined(FLEXT_THREADS) + #define FLEXT_CLASSDEF(CL) CL##_multi_d + #else + #define FLEXT_CLASSDEF(CL) CL##_single_d + #endif +#else + #if defined(FLEXT_SHARED) + #define FLEXT_CLASSDEF(CL) CL##_shared + #elif defined(FLEXT_THREADS) + #define FLEXT_CLASSDEF(CL) CL##_multi + #else + #define FLEXT_CLASSDEF(CL) CL##_single + #endif +#endif + + +/* Set the right calling convention (and exporting) for the OS */ + +#if defined(_MSC_VER) + #ifdef FLEXT_SHARED + // for compiling a shared flext library FLEXT_EXPORTS must be defined + #ifdef FLEXT_EXPORTS + #define FLEXT_SHARE __declspec(dllexport) + #else + #define FLEXT_SHARE __declspec(dllimport) + #endif + #else + #define FLEXT_SHARE + #endif + #define FLEXT_EXT __declspec(dllexport) +#else // other OS's + #define FLEXT_SHARE + #define FLEXT_EXT +#endif + + +// std namespace +#ifdef __MWERKS__ +# define STD std +#else +# define STD +#endif + +// branching hints +#if __GNUC__ >= 3 +# ifndef LIKELY +# define LIKELY(expression) (__builtin_expect(!!(expression), 1)) +# endif +# ifndef UNLIKELY +# define UNLIKELY(expression) (__builtin_expect(!!(expression), 0)) +# endif +#else +# ifndef LIKELY +# define LIKELY(expression) (expression) +# endif +# ifndef UNLIKELY +# define UNLIKELY(expression) (expression) +# endif +#endif + +// macro definitions for inline flext usage +#ifdef FLEXT_INLINE +# define FLEXT_TEMPLATE template<typename flext_T> +# define FLEXT_TEMPIMPL(fun) template<typename flext_T> fun<flext_T> +# define FLEXT_TEMPINST(fun) fun<void> +# define FLEXT_TEMPSUB(fun) typename fun<flext_T> +# define FLEXT_TEMP_TYPENAME typename +#else +# define FLEXT_TEMPLATE +# define FLEXT_TEMPIMPL(fun) fun +# define FLEXT_TEMPINST(fun) fun +# define FLEXT_TEMPSUB(fun) fun +# define FLEXT_TEMP_TYPENAME +#endif + +#endif // __FLEXT_PREFIX_H diff --git a/externals/grill/trunk/flext/source/flproxy.cpp b/externals/grill/trunk/flext/source/flproxy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..71b78a8e25ed744dc1b8c67e83297f602844f6b1 --- /dev/null +++ b/externals/grill/trunk/flext/source/flproxy.cpp @@ -0,0 +1,245 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flproxy.cpp + \brief Proxy classes for the flext base class. +*/ + +#ifndef __FLEXT_PROXY_CPP +#define __FLEXT_PROXY_CPP + +#include "flext.h" +#include "flinternal.h" + +#include "flpushns.h" + +// === proxy class for flext_base ============================ + +#if FLEXT_SYS == FLEXT_SYS_PD + +FLEXT_TEMPIMPL(t_class *FLEXT_CLASSDEF(flext_base))::px_class = NULL; + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_bang(px_object *obj) +{ + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,sym_bang,0,NULL); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_float(px_object *obj,t_float f) +{ + t_atom a; SetFloat(a,f); + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,sym_float,1,&a); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_symbol(px_object *obj,const t_symbol *s) +{ + t_atom a; SetSymbol(a,s); + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,sym_symbol,1,&a); +} + +/* +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_pointer(px_object *obj,const t_gpointer *p) +{ + t_atom a; SetPointer(a,p); + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,sym_pointer,1,&a); +} +*/ + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::px_object::px_anything(px_object *obj,const t_symbol *s,int argc,t_atom *argv) +{ + Locker lock(obj->base); + obj->base->CbMethodHandler(obj->index,s,argc,argv); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_bang(flext_hdr *c) +{ + Locker lock(c); + thisObject(c)->CbMethodHandler(0,sym_bang,0,NULL); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_float(flext_hdr *c,t_float f) +{ + t_atom a; SetFloat(a,f); + Locker lock(c); + thisObject(c)->CbMethodHandler(0,sym_float,1,&a); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_symbol(flext_hdr *c,const t_symbol *s) +{ + t_atom a; SetSymbol(a,s); + Locker lock(c); + thisObject(c)->CbMethodHandler(0,sym_symbol,1,&a); +} + +/* +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_pointer(flext_hdr *c,const t_gpointer *p) +{ + t_atom a; SetPointer(a,p); + Locker lock(c); + thisObject(c)->CbMethodHandler(0,sym_pointer,1,&a); +} +*/ + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv) +{ + Locker lock(c); + if(UNLIKELY(!s)) { + // apparently, this happens only in one case... object is a DSP object, but has no main DSP inlet... + + // interpret tag from args + if(!argc) + s = sym_bang; + else if(argc == 1) { + if(IsFloat(*argv)) + s = sym_float; + else if(IsSymbol(*argv)) + s = sym_symbol; + else if(IsPointer(*argv)) + s = sym_pointer; + else + FLEXT_ASSERT(false); + } + else + s = sym_list; + } + + thisObject(c)->CbMethodHandler(0,s,argc,argv); +} + +#define DEF_PROXYMSG(IX) \ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_ft ## IX(flext_hdr *c,t_float v) { t_atom atom; SetFloat(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); } + +#define ADD_PROXYMSG(c,IX) \ +add_method1(c,cb_px_ft ## IX," ft " #IX,A_FLOAT) + +//AddMethod(c,0,flext::MakeSymbol("ft" #IX),cb_px_ft ## IX) + + +#elif FLEXT_SYS == FLEXT_SYS_MAX + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv) +{ + Locker lock(c); + int const ci = proxy_getinlet((t_object *)&c->obj); +// post("%s %i, cb_anything(%i)",__FILE__,__LINE__,ci); + thisObject(c)->CbMethodHandler(ci,s,argc,argv); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_int(flext_hdr *c,long v) +{ + t_atom atom; SetInt(atom,v); + Locker lock(c); + int const ci = proxy_getinlet((t_object *)&c->obj); + thisObject(c)->CbMethodHandler(ci,sym_int,1,&atom); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_float(flext_hdr *c,double v) +{ + t_atom atom; SetFloat(atom,v); + Locker lock(c); + int const ci = proxy_getinlet((t_object *)&c->obj); + thisObject(c)->CbMethodHandler(ci,sym_float,1,&atom); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_bang(flext_hdr *c) +{ + Locker lock(c); + int const ci = proxy_getinlet((t_object *)&c->obj); + thisObject(c)->CbMethodHandler(ci,sym_bang,0,NULL); +} + + +#define DEF_PROXYMSG(IX) \ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); } + +/* +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); Locker lock(c); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); } +*/ + +#define ADD_PROXYMSG(c,IX) \ +addinx((method)(cb_px_in ## IX),IX); \ +addftx((method)(cb_px_ft ## IX),IX) + +/* +add_method1(c,cb_px_in ## IX,"in" #IX,A_INT); \ +add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT) + +AddMethod(c,0,flext::MakeSymbol("in" #IX),cb_px_in ## IX); \ +AddMethod(c,0,flext::MakeSymbol("ft" #IX),cb_px_ft ## IX) +*/ + +#endif + +#if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX + +DEF_PROXYMSG(1) +DEF_PROXYMSG(2) +DEF_PROXYMSG(3) +DEF_PROXYMSG(4) +DEF_PROXYMSG(5) +DEF_PROXYMSG(6) +DEF_PROXYMSG(7) +DEF_PROXYMSG(8) +DEF_PROXYMSG(9) + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::SetProxies(t_class *c,bool dsp) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + // for leftmost inlet + class_addbang(c,cb_bang); + if(!dsp) class_addfloat(c,cb_float); + class_addsymbol(c,cb_symbol); +// class_addpointer(c,cb_pointer); + class_addlist(c,cb_anything); + class_addanything(c,cb_anything); + + // proxy for extra inlets + if(UNLIKELY(!px_class)) { + // only once + px_class = class_new(gensym(const_cast<char *>(" flext_base proxy ")),NULL,NULL,sizeof(px_object),CLASS_PD|CLASS_NOINLET, A_NULL); + class_addbang(px_class,px_object::px_bang); // for other inlets + class_addfloat(px_class,px_object::px_float); // for other inlets + class_addsymbol(px_class,px_object::px_symbol); // for other inlets +// class_addpointer(px_class,px_object::px_pointer); // for other inlets + class_addlist(px_class,px_object::px_anything); // for other inlets + class_addanything(px_class,px_object::px_anything); // for other inlets + } +#elif FLEXT_SYS == FLEXT_SYS_MAX + addbang((method)cb_bang); + addint((method)cb_int); + addfloat((method)cb_float); + addmess((method)cb_anything,const_cast<char *>("list"),A_GIMME,A_NOTHING); // must be explicitly given, otherwise list elements are distributed over inlets + addmess((method)cb_anything,const_cast<char *>("anything"),A_GIMME,A_NOTHING); +#else +#error Not implemented! +#endif + + // setup non-leftmost ints and floats + ADD_PROXYMSG(c,1); + ADD_PROXYMSG(c,2); + ADD_PROXYMSG(c,3); + ADD_PROXYMSG(c,4); + ADD_PROXYMSG(c,5); + ADD_PROXYMSG(c,6); + ADD_PROXYMSG(c,7); + ADD_PROXYMSG(c,8); + ADD_PROXYMSG(c,9); +} +#endif + +#include "flpopns.h" + +#endif // __FLEXT_PROXY_CPP + + diff --git a/externals/grill/trunk/flext/source/flpushns.h b/externals/grill/trunk/flext/source/flpushns.h new file mode 100644 index 0000000000000000000000000000000000000000..9f7ad812e8f9b15807d66784a284f34be111c16d --- /dev/null +++ b/externals/grill/trunk/flext/source/flpushns.h @@ -0,0 +1,30 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +#ifdef FLEXT_USE_NAMESPACE + +#ifndef _FLEXT_IN_NAMESPACE + #define _FLEXT_IN_NAMESPACE 0 +#endif + +#if _FLEXT_IN_NAMESPACE == 0 + + #if 1 //defined(FLEXT_SHARED) + namespace flext_ns { + #elif defined(__GNUC__) + namespace { // anonymous namespace (don't export symbols) + #endif + +#endif + +#define __FLEXT_IN_NAMESPACE (_FLEXT_IN_NAMESPACE+1) +#undef _FLEXT_IN_NAMESPACE +#define _FLEXT_IN_NAMESPACE __FLEXT_IN_NAMESPACE +#undef __FLEXT_IN_NAMESPACE + +#endif diff --git a/externals/grill/trunk/flext/source/flqueue.cpp b/externals/grill/trunk/flext/source/flqueue.cpp new file mode 100644 index 0000000000000000000000000000000000000000..831bce55f1be25835d44bb6fa80c0b0af440bb5f --- /dev/null +++ b/externals/grill/trunk/flext/source/flqueue.cpp @@ -0,0 +1,704 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flqueue.cpp + \brief Implementation of the flext message queuing functionality. + + \todo Let's see if queuing can be implemented for Max/MSP with defer_low + + if FLEXT_PDLOCK is defined, the new PD thread lock functions are used +*/ + +#ifndef __FLEXT_QUEUE_CPP +#define __FLEXT_QUEUE_CPP + +#include "flext.h" +#include "flinternal.h" +#include "flcontainers.h" +#include <cstring> // for memcpy + +#include "flpushns.h" + +#ifdef FLEXT_THREADS +//! Thread id of message queue thread +FLEXT_TEMPIMPL(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext))::thrid_t FLEXT_CLASSDEF(flext))::thrmsgid; +#endif + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::qustarted = false; + +#ifdef FLEXT_SHARED +/* + For the shared version it _should_ be possible to have only one queue for all externals. + Yet I don't know how to do this cross-platform +*/ +#define PERMANENTIDLE +#endif + +FLEXT_TEMPLATE void Trigger(); + +FLEXT_TEMPLATE +class QueueFifo + : public PooledFifo<flext::MsgBundle> +{ +public: + ~QueueFifo(); +}; + +FLEXT_TEMPLATE +class Queue: + public flext, + public FLEXT_TEMPINST(QueueFifo) +{ +public: + inline bool Empty() const { return !Avail(); } + + void Push(MsgBundle *m); // defined after MsgBundle (gcc 3.3. won't take it otherwise...) +}; + +FLEXT_TEMPLATE +struct QVars { +#if FLEXT_QMODE == 2 + static flext::ThrCond *qthrcond; +#elif FLEXT_QMODE == 0 + static t_clock *qclk; +#endif + static FLEXT_TEMPINST(Queue) *queue; +}; + +#if FLEXT_QMODE == 2 +FLEXT_TEMPIMPL(flext::ThrCond *QVars)::qthrcond = NULL; +#elif FLEXT_QMODE == 0 +FLEXT_TEMPIMPL(t_clock *QVars)::qclk = NULL; +#endif +FLEXT_TEMPIMPL(FLEXT_TEMPINST(Queue) *QVars)::queue = NULL; + + + +#define STATSIZE 8 + +FLEXT_TEMPIMPL(class FLEXT_CLASSDEF(flext))::MsgBundle: + public flext, + public FifoCell +{ +public: + static MsgBundle *New() + { + MsgBundle *m = FLEXT_TEMPINST(QVars)::queue->New(); + m->msg.Init(); + return m; + } + + static void Free(MsgBundle *m) + { + for(Msg *mi = m->msg.nxt; mi; ) { + Msg *mn = mi->nxt; + mi->Free(); + delete mi; + mi = mn; + } + m->msg.Free(); + FLEXT_TEMPINST(QVars)::queue->Free(m); + } + + bool BelongsTo(flext_base *t) const + { + return !msg.nxt && msg.BelongsTo(t); + } + + void Idle(flext_base *t) + { + Get()->Idle(t); + } + + void Idle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv) + { + Get()->Idle(idlefun,argc,argv); + } + + inline MsgBundle &Add(flext_base *t,int o,const t_symbol *s,int ac,const t_atom *av) + { + Get()->Set(t,o,s,ac,av); + return *this; + } + + inline MsgBundle &Add(const t_symbol *r,const t_symbol *s,int ac,const t_atom *av) + { + Get()->Set(r,s,ac,av); + return *this; + } + + inline MsgBundle &Add(flext_base *th,int o) // bang + { + return Add(th,o,sym_bang,0,NULL); + } + + inline MsgBundle &Add(flext_base *th,int o,float dt) + { + t_atom at; + SetFloat(at,dt); + return Add(th,o,sym_float,1,&at); + } + + inline MsgBundle &Add(flext_base *th,int o,int dt) + { + t_atom at; + SetInt(at,dt); + const t_symbol *sym; +#if FLEXT_SYS == FLEXT_SYS_PD + sym = sym_float; +#elif FLEXT_SYS == FLEXT_SYS_MAX + sym = sym_int; +#else +#error Not implemented! +#endif + return Add(th,o,sym,1,&at); + } + + inline MsgBundle &Add(flext_base *th,int o,const t_symbol *dt) + { + t_atom at; + SetSymbol(at,dt); + return Add(th,o,sym_symbol,1,&at); + } + + inline MsgBundle &Add(flext_base *th,int o,const t_atom &a) + { + const t_symbol *sym; + if(IsSymbol(a)) + sym = sym_symbol; + else if(IsFloat(a)) + sym = sym_float; +#if FLEXT_SYS == FLEXT_SYS_MAX + else if(IsInt(a)) + sym = sym_int; +#endif +#if FLEXT_SYS == FLEXT_SYS_PD + else if(IsPointer(a)) + sym = sym_pointer; +#endif + else { + error("atom type not supported"); + return *this; + } + return Add(th,o,sym,1,&a); + } + + inline MsgBundle &Add(flext_base *th,int o,int argc,const t_atom *argv) + { + return Add(th,o,sym_list,argc,argv); + } + + // \note PD sys lock must already be held by caller + inline bool Send() const + { + if(!msg.Ok()) return false; // Empty! + + const Msg *m = &msg; + do { + if(m->Send()) { + // we should re-enqeue the message... it can't be a real bundle then, only a solo message + FLEXT_ASSERT(!m->nxt); + return true; + } + m = m->nxt; + } while(m); + return false; + } + +private: + + class Msg { + public: + inline bool Ok() const { return th || recv; } + + void Init() + { + th = NULL; + recv = NULL; + nxt = NULL; + argc = 0; + } + + void Free() + { + if(argc > STATSIZE) { + FLEXT_ASSERT(argv); + delete[] argv; + } + } + + //! Attention: works only for solo messages, not real bundles!! + bool BelongsTo(flext_base *t) const + { + FLEXT_ASSERT(!nxt); + return th == t; + } + + void Set(flext_base *t,int o,const t_symbol *s,int ac,const t_atom *av) + { + FLEXT_ASSERT(t); + th = t; + out = o; + SetMsg(s,ac,av); + } + + void Set(const t_symbol *r,const t_symbol *s,int ac,const t_atom *av) + { + FLEXT_ASSERT(r); + th = NULL; + recv = r; + SetMsg(s,ac,av); + } + + void Idle(flext_base *t) + { + FLEXT_ASSERT(t); + th = t; + SetMsg(NULL,0,NULL); + } + + void Idle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv) + { + FLEXT_ASSERT(idlefun); + th = NULL; + fun = idlefun; + SetMsg(NULL,argc,argv); + } + + bool Send() const + { + if(LIKELY(sym)) { + // messages + if(th) { + if(UNLIKELY(out < 0)) + // message to self + th->CbMethodHandler(-1-out,sym,argc,argc > STATSIZE?argv:argl); + else + // message to outlet + th->ToSysAnything(out,sym,argc,argc > STATSIZE?argv:argl); + } + else + flext::SysForward(recv,sym,argc,argc > STATSIZE?argv:argl); + return false; + } + else { + // idle processing + if(th) + // call virtual method + return th->CbIdle(); + else + // call static function + return (*fun)(argc,argc > STATSIZE?argv:argl); + } + } + + Msg *nxt; + + protected: + flext_base *th; + union { + int out; + const t_symbol *recv; + bool (*fun)(int argc,const t_atom *argv); + }; + const t_symbol *sym; + int argc; + union { + t_atom *argv; + t_atom argl[STATSIZE]; + }; + + void SetMsg(const t_symbol *s,int cnt,const t_atom *lst) + { + sym = s; + argc = cnt; + if(UNLIKELY(cnt > STATSIZE)) { + argv = new t_atom[cnt]; + flext::CopyAtoms(cnt,argv,lst); + } + else + flext::CopyAtoms(cnt,argl,lst); + } + + } msg; + + Msg *Get() + { + Msg *m = &msg; + if(LIKELY(m->Ok())) { + for(; m->nxt; m = m->nxt) {} + m = m->nxt = new Msg; + m->Init(); + } + return m; + } +}; + +FLEXT_TEMPIMPL(QueueFifo)::~QueueFifo() +{ + flext::MsgBundle *n; + while((n = Get()) != NULL) delete n; +} + +FLEXT_TEMPIMPL(void Queue)::Push(MsgBundle *m) +{ + if(LIKELY(m)) { + Put(m); + FLEXT_TEMPINST(Trigger)(); + } +} + +#define CHUNK 10 + +#if FLEXT_QMODE == 1 +FLEXT_TEMPLATE bool QWork(bool syslock,flext_base *flushobj = NULL) +{ + // 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. + flext::MsgBundle *q; + if((q = queue.Get()) == NULL) + return false; + else if(q->Send()) { + if(!flushobj || !q->BelongsTo(flushobj)) + queue.Push(q); // remember messages to be processed again + else + flext::MsgBundle::Free(q); + return true; + } + else { + flext::MsgBundle::Free(q); + return false; + } +} +#else +FLEXT_TEMPLATE bool QWork(bool syslock,flext_base *flushobj = NULL) +{ + FLEXT_TEMPINST(Queue) newmsgs; + flext::MsgBundle *q; + +#if 0 + static int counter = 0; + fprintf(stderr,"QWORK %i\n",counter++); +#endif + + for(;;) { + // 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. + if(!FLEXT_TEMPINST(QVars)::queue->Avail()) break; + + #if FLEXT_QMODE == 2 + if(syslock) flext::Lock(); + #endif + + while((q = FLEXT_TEMPINST(QVars)::queue->Get()) != NULL) { + if(q->Send()) + newmsgs.Push(q); // remember messages to be processed again + else + flext::MsgBundle::Free(q); + } + + #if FLEXT_QMODE == 2 + if(syslock) flext::Unlock(); + #endif + + } + + // enqueue messages that have to be processed again + while((q = newmsgs.Get()) != NULL) + if(!flushobj || !q->BelongsTo(flushobj)) + FLEXT_TEMPINST(QVars)::queue->Push(q); + else + flext::MsgBundle::Free(q); + + return FLEXT_TEMPINST(QVars)::queue->Avail(); +} +#endif + +#if FLEXT_QMODE == 0 +#if FLEXT_SYS == FLEXT_SYS_JMAX +FLEXT_TEMPLATE void QTick(fts_object_t *c,int winlet, fts_symbol_t s, int ac, const fts_atom_t *at) +{ +#else +FLEXT_TEMPLATE void QTick(flext_base *c) +{ +#endif + FLEXT_TEMPINST(QWork)(false); +} + +#elif FLEXT_QMODE == 1 +# ifndef PERMANENTIDLE + static bool qtickactive = false; +# endif +FLEXT_TEMPLATE t_int QTick(t_int *) +{ +#ifndef PERMANENTIDLE + qtickactive = false; +#endif + + if(QWork(false)) + return 1; + else { +# ifdef PERMANENTIDLE + // will be run in the next idle cycle + return 2; +# else + // won't be run again + // for non-shared externals assume that there's rarely a message waiting + // so it's better to delete the callback meanwhile + return 0; +# endif + } +} +#endif + +/* +It would be sufficient to only flush messages belonging to object th +But then the order of sent messages is not as intended +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::QFlush(flext_base *th) +{ + FLEXT_ASSERT(!IsThreadRegistered()); + while(!FLEXT_TEMPINST(QVars)::queue->Empty()) FLEXT_TEMPINST(QWork)(false,th); +} + +FLEXT_TEMPLATE void Trigger() +{ +#if FLEXT_SYS == FLEXT_SYS_PD +# if FLEXT_QMODE == 2 + // wake up worker thread + FLEXT_TEMPINST(QVars)::qthrcond->Signal(); +# elif FLEXT_QMODE == 1 && !defined(PERMANENTIDLE) + if(!qtickactive) { + sys_callback(FLEXT_TEMPINST(QTick),NULL,0); + qtickactive = true; + } +# elif FLEXT_QMODE == 0 +# ifdef FLEXT_THREADS + bool sys = flext::IsThread(flext::GetSysThreadId()); +# else + bool sys = true; +# endif + if(!sys) flext::Lock(); + clock_delay(FLEXT_TEMPINST(QVars)::qclk,0); + if(!sys) flext::Unlock(); +# endif +#elif FLEXT_SYS == FLEXT_SYS_MAX +# if FLEXT_QMODE == 0 +// qelem_front(FLEXT_TEMPINST(QVars)::qclk); + clock_delay(FLEXT_TEMPINST(QVars)::qclk,0); +# endif +#else +# error Not implemented +#endif +} + +#if FLEXT_QMODE == 2 +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::QWorker(thr_params *) +{ + thrmsgid = GetThreadId(); + qustarted = true; + for(;;) { + // we need a timed wait so that idle processing can take place + FLEXT_TEMPINST(QVars)::qthrcond->TimedWait(0.001); + FLEXT_TEMPINST(QWork)(true); + } +} +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::StartQueue() +{ +#if FLEXT_QMODE == 2 + FLEXT_TEMPINST(QVars)::qthrcond = new FLEXT_CLASSDEF(flext)::ThrCond; +#endif + FLEXT_TEMPINST(QVars)::queue = new FLEXT_TEMPINST(Queue); + + if(qustarted) return; +#if FLEXT_QMODE == 1 +# ifdef PERMANENTIDLE + sys_callback(FLEXT_TEMPINST(QTick),NULL,0); + qustarted = true; +# endif +#elif FLEXT_QMODE == 2 + LaunchThread(QWorker,NULL); + // very unelegant... but waiting should be ok, since happens only on loading + while(!qustarted) Sleep(0.001); +#elif FLEXT_QMODE == 0 && (FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX) +// qclk = (t_qelem *)(qelem_new(NULL,(t_method)FLEXT_TEMPINST(QTick))); + FLEXT_TEMPINST(QVars)::qclk = (t_clock *)(clock_new(NULL,(t_method)FLEXT_TEMPINST(QTick))); + qustarted = true; +#else +# error Not implemented! +#endif +} + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext))::MsgBundle *FLEXT_CLASSDEF(flext))::MsgNew() +{ + return MsgBundle::New(); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::MsgFree(MsgBundle *m) +{ + MsgBundle::Free(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ToSysMsg(MsgBundle *m) +{ + m->Send(); + FLEXT_TEMPINST(QVars)::queue->Free(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ToQueueMsg(MsgBundle *m) +{ + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueBang(int o) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueFloat(int o,float f) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,f); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueInt(int o,int f) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,f); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueSymbol(int o,const t_symbol *s) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,s); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueAtom(int o,const t_atom &at) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,at); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueList(int o,int argc,const t_atom *argv) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,argc,argv); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::ToQueueAnything(int o,const t_symbol *s,int argc,const t_atom *argv) const +{ + MsgBundle *m = MsgBundle::New(); + m->Add(const_cast<flext_base *>(this),o,s,argc,argv); + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddBang(MsgBundle *m,int n) const +{ + m->Add(const_cast<flext_base *>(this),n); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddFloat(MsgBundle *m,int n,float f) const +{ + m->Add(const_cast<flext_base *>(this),n,f); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddInt(MsgBundle *m,int n,int f) const +{ + m->Add(const_cast<flext_base *>(this),n,f); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddSymbol(MsgBundle *m,int n,const t_symbol *s) const +{ + m->Add(const_cast<flext_base *>(this),n,s); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddAtom(MsgBundle *m,int n,const t_atom &at) const +{ + m->Add(const_cast<flext_base *>(this),n,at); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddList(MsgBundle *m,int n,int argc,const t_atom *argv) const +{ + m->Add(const_cast<flext_base *>(this),n,argc,argv); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::MsgAddAnything(MsgBundle *m,int n,const t_symbol *s,int argc,const t_atom *argv) const +{ + m->Add(const_cast<flext_base *>(this),n,s,argc,argv); +} + + + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::SysForward(const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) +{ + void *cl = recv->s_thing; + if(UNLIKELY(!cl)) return false; + +#if FLEXT_SYS == FLEXT_SYS_PD + pd_typedmess((t_class **)cl,(t_symbol *)s,argc,(t_atom *)argv); +#elif FLEXT_SYS == FLEXT_SYS_MAX + typedmess(recv->s_thing,(t_symbol *)s,argc,(t_atom *)argv); +#else +# error Not implemented +#endif + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::QueueForward(const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) +{ + MsgBundle *m = MsgBundle::New(); + m->Add(recv,s,argc,argv); + // send over queue + FLEXT_TEMPINST(QVars)::queue->Push(m); + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::MsgForward(MsgBundle *m,const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) +{ + m->Add(recv,s,argc,argv); + return true; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddIdle() +{ + MsgBundle *m = MsgBundle::New(); + m->Idle(const_cast<flext_base *>(this)); + // send over queue + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddIdle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv) +{ + MsgBundle *m = MsgBundle::New(); + m->Idle(idlefun,argc,argv); + // send over queue + FLEXT_TEMPINST(QVars)::queue->Push(m); +} + +#include "flpopns.h" + +#endif // __FLEXT_QUEUE_CPP + + diff --git a/externals/grill/trunk/flext/source/flsimd.cpp b/externals/grill/trunk/flext/source/flsimd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69d8c39c32ca5ff7803ffe3659b3e45ad8ffcf43 --- /dev/null +++ b/externals/grill/trunk/flext/source/flsimd.cpp @@ -0,0 +1,2013 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flsimd.cpp + \brief flext SIMD support functions + + If FLEXT_USE_SIMD is defined at compilation, SIMD instructions are used wherever feasible. + If used with MSVC++ 6 the "Processor Pack" must be installed. + + If FLEXT_USE_IPP is defined the Intel Performance Package is used. +*/ + +#ifndef __FLEXT_SIMD_CPP +#define __FLEXT_SIMD_CPP + +#include "flext.h" +#include <cstring> + +#if FLEXT_OS == FLEXT_OS_WIN +#include <windows.h> +#endif + +#ifdef FLEXT_USE_IPP +#include <ipps.h> +#endif + +#ifdef FLEXT_USE_SIMD + #ifdef _MSC_VER + // include MSVC SIMD header files + #include <mmintrin.h> // MMX + #include <xmmintrin.h> // SSE + #include <emmintrin.h> // SSE2 + #include <mm3dnow.h> // 3DNow! + #elif defined(__APPLE__) && defined(__VEC__) + #ifdef __MWERKS__ + #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH + #include <sys/sysctl.h> + #include <vDSP.h> + #else + #include <Gestalt.h> + #endif + + #pragma altivec_model on + + #include <altivec.h> + #include <vectorOps.h> + #elif defined(__GNUC__) + #include <sys/sysctl.h> + #include <vecLib/vecLib.h> + #endif + #endif + +#endif // FLEXT_USE_SIMD + +#include "flpushns.h" + +FLEXT_TEMPLATE unsigned long setsimdcaps(); + +/*! \brief Holds SIMD capability flags + \internal +*/ +FLEXT_TEMPIMPL(unsigned long FLEXT_CLASSDEF(flext))::simdcaps = FLEXT_TEMPINST(setsimdcaps)(); + +FLEXT_TEMPIMPL(unsigned long FLEXT_CLASSDEF(flext))::GetSIMDCapabilities() { return simdcaps; } + + +#ifdef FLEXT_USE_SIMD + +#if FLEXT_CPU == FLEXT_CPU_IA32 || FLEXT_CPU == FLEXT_CPU_X86_64 + +#define _CPU_FEATURE_MMX 0x0001 +#define _CPU_FEATURE_SSE 0x0002 +#define _CPU_FEATURE_SSE2 0x0004 +#define _CPU_FEATURE_3DNOW 0x0008 + +typedef struct _processor_info { + int family; // family of the processor + // e.g. 6 = Pentium-Pro architecture + int model; // model of processor + // e.g. 1 = Pentium-Pro for family = 6 + int stepping; // processor revision number + int feature; // processor feature + // (same as return value from _cpuid) + int os_support; // does OS Support the feature? + int checks; // mask of checked bits in feature + // and os_support fields +} _p_info; + +// These are the bit flags that get set on calling cpuid +// with register eax set to 1 +#define _MMX_FEATURE_BIT 0x00800000 +#define _SSE_FEATURE_BIT 0x02000000 +#define _SSE2_FEATURE_BIT 0x04000000 + +// This bit is set when cpuid is called with +// register set to 80000001h (only applicable to AMD) +#define _3DNOW_FEATURE_BIT 0x80000000 + +#ifdef _MSC_VER +inline int IsCPUID() +{ + __try { + _asm { + xor eax, eax + cpuid + } + } + __except (EXCEPTION_EXECUTE_HANDLER) { + return 0; + } + return 1; +} + +inline int _os_support(int feature) +{ + __try { + switch (feature) { + case _CPU_FEATURE_SSE: + __asm { + xorps xmm0, xmm0 // executing SSE instruction + } + break; + case _CPU_FEATURE_SSE2: + __asm { + xorpd xmm0, xmm0 // executing SSE2 instruction + } + break; + case _CPU_FEATURE_3DNOW: + __asm { + pfrcp mm0, mm0 // executing 3DNow! instruction + emms + } + break; + case _CPU_FEATURE_MMX: + __asm { + pxor mm0, mm0 // executing MMX instruction + emms + } + break; + } + } + __except (EXCEPTION_EXECUTE_HANDLER) { + if (_exception_code() == STATUS_ILLEGAL_INSTRUCTION) { + return 0; + } + return 0; + } + return 1; +} + +inline int _cpuid (_p_info *pinfo) +{ + DWORD dwStandard = 0; + DWORD dwFeature = 0; + DWORD dwMax = 0; + DWORD dwExt = 0; + int feature = 0; + int os_support = 0; + union { + struct { + DWORD dw0; + DWORD dw1; + DWORD dw2; + } s; + } Ident; + + if (!IsCPUID()) { + return 0; + } + + _asm { + push ebx + push ecx + push edx + + // get the vendor string + xor eax, eax + cpuid + mov dwMax, eax + mov Ident.s.dw0, ebx + mov Ident.s.dw1, edx + mov Ident.s.dw2, ecx + + // get the Standard bits + mov eax, 1 + cpuid + mov dwStandard, eax + mov dwFeature, edx + + // get AMD-specials + mov eax, 80000000h + cpuid + cmp eax, 80000000h + jc notamd + mov eax, 80000001h + cpuid + mov dwExt, edx + +notamd: + pop ecx + pop ebx + pop edx + } + + if (dwFeature & _MMX_FEATURE_BIT) { + feature |= _CPU_FEATURE_MMX; + if (_os_support(_CPU_FEATURE_MMX)) + os_support |= _CPU_FEATURE_MMX; + } + if (dwExt & _3DNOW_FEATURE_BIT) { + feature |= _CPU_FEATURE_3DNOW; + if (_os_support(_CPU_FEATURE_3DNOW)) + os_support |= _CPU_FEATURE_3DNOW; + } + if (dwFeature & _SSE_FEATURE_BIT) { + feature |= _CPU_FEATURE_SSE; + if (_os_support(_CPU_FEATURE_SSE)) + os_support |= _CPU_FEATURE_SSE; + } + if (dwFeature & _SSE2_FEATURE_BIT) { + feature |= _CPU_FEATURE_SSE2; + if (_os_support(_CPU_FEATURE_SSE2)) + os_support |= _CPU_FEATURE_SSE2; + } + + if (pinfo) { + memset(pinfo, 0, sizeof(_p_info)); + + pinfo->os_support = os_support; + pinfo->feature = feature; + pinfo->family = (dwStandard >> 8) & 0xF; // retrieve family + if (pinfo->family == 15) { // retrieve extended family + pinfo->family |= (dwStandard >> 16) & 0xFF0; + } + pinfo->model = (dwStandard >> 4) & 0xF; // retrieve model + if (pinfo->model == 15) { // retrieve extended model + pinfo->model |= (dwStandard >> 12) & 0xF; + } + pinfo->stepping = (dwStandard) & 0xF; // retrieve stepping + + pinfo->checks = _CPU_FEATURE_MMX | + _CPU_FEATURE_SSE | + _CPU_FEATURE_SSE2 | + _CPU_FEATURE_3DNOW; + } + + return feature; +} + +inline bool IsVectorAligned(const void *where) +{ + return (reinterpret_cast<size_t>(where)&(__alignof(__m128)-1)) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)) + &(__alignof(__m128)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)|reinterpret_cast<size_t>(v3)) + &(__alignof(__m128)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3,const void *v4) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)|reinterpret_cast<size_t>(v3)|reinterpret_cast<size_t>(v4)) + &(__alignof(__m128)-1) + ) == 0; +} + +#else +// not MSVC +inline int _cpuid (_p_info *pinfo) +{ + if(pinfo) memset(pinfo,0,sizeof *pinfo); + return 0; +} +#endif + +#endif + + +/*! \brief Determine SIMD capabilities + \internal +*/ +inline unsigned long setsimdcaps() +{ + unsigned long simdflags = flext::simd_none; +#if FLEXT_CPU == FLEXT_CPU_IA32 || FLEXT_CPU == FLEXT_CPU_X86_64 + _p_info cpuinfo; + _cpuid(&cpuinfo); + if(cpuinfo.os_support&_CPU_FEATURE_MMX) simdflags += flext::simd_mmx; + if(cpuinfo.os_support&_CPU_FEATURE_3DNOW) simdflags += flext::simd_3dnow; + if(cpuinfo.os_support&_CPU_FEATURE_SSE) simdflags += flext::simd_sse; + if(cpuinfo.os_support&_CPU_FEATURE_SSE2) simdflags += flext::simd_sse2; +#elif defined(__APPLE__) && defined(__VEC__) + #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH + + int selectors[2] = { CTL_HW, HW_VECTORUNIT }; + int hasVectorUnit = 0; + size_t length = sizeof(hasVectorUnit); + int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0); + + if(!error && hasVectorUnit != 0) simdflags += flext::simd_altivec; + + #else + + long cpuAttributes; + Boolean hasAltiVec = false; + OSErr err = Gestalt( gestaltPowerPCProcessorFeatures, &cpuAttributes ); + + if( noErr == err ) + if(( 1 << gestaltPowerPCHasVectorInstructions) & cpuAttributes) simdflags += flext::simd_altivec; + + #endif +#endif + return simdflags; +} + + +#if (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + +/* functions for misaligned vector data - taken from the Altivec tutorial of Ian Ollmann, Ph.D. */ + +//! Load a vector from an unaligned location in memory +inline vector unsigned char LoadUnaligned( vector unsigned char *v ) +{ + vector unsigned char permuteVector = vec_lvsl( 0, (int*) v ); + vector unsigned char low = vec_ld( 0, v ); + vector unsigned char high = vec_ld( 15, v ); + return vec_perm( low, high, permuteVector ); +} + +/* +//! Store a vector to an unaligned location in memory +inline void StoreUnaligned( vector unsigned char v, vector unsigned char *where) +{ + // Load the surrounding area + vector unsigned char low = vec_ld( 0, where ); + vector unsigned char high = vec_ld( 16, where ); + // Prepare the constants that we need + vector unsigned char permuteVector = vec_lvsr( 0, (int*) where ); + + vector unsigned char oxFF = (vector unsigned char)vec_splat_s8( -1 ); + vector unsigned char ox00 = (vector unsigned char)vec_splat_s8( 0 ); + // Make a mask for which parts of the vectors to swap out + vector unsigned char mask = vec_perm( ox00, oxFF, permuteVector ); + // Right rotate our input data + v = vec_perm( v, v, permuteVector ); + // Insert our data into the low and high vectors + low = vec_sel( v, low, mask ); + high = vec_sel( high, v, mask ); + // Store the two aligned result vectors + vec_st( low, 0, where ); + vec_st( high, 16, where ); +} +*/ + +inline vector float LoadUnaligned(const float *v ) +{ + return (vector float)LoadUnaligned((vector unsigned char *)v); +} + +/* +inline void StoreUnaligned( vector float v,float *where) +{ + return StoreUnaligned((vector unsigned char)v,(vector unsigned char *)where); +} +*/ + +inline bool IsVectorAligned(const void *where) +{ + return (reinterpret_cast<size_t>(where)&(sizeof(vector float)-1)) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)) + &(sizeof(vector float)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)|reinterpret_cast<size_t>(v3)) + &(sizeof(vector float)-1) + ) == 0; +} + +inline bool VectorsAligned(const void *v1,const void *v2,const void *v3,const void *v4) +{ + return ( + (reinterpret_cast<size_t>(v1)|reinterpret_cast<size_t>(v2)|reinterpret_cast<size_t>(v3)|reinterpret_cast<size_t>(v4)) + &(sizeof(vector float)-1) + ) == 0; +} + +inline vector float LoadValue(const float &f) +{ + return vec_splat(IsVectorAligned(&f)?vec_ld(0,(vector float *)&f):LoadUnaligned(&f),0); +} +#endif + + +#else // FLEXT_USE_SIMD +inline unsigned long setsimdcaps() { return 0; } +#endif // FLEXT_USE_SIMD + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::CopySamples(t_sample *dst,const t_sample *src,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) + ippsCopy_32f((const float *)src,(float *)dst,cnt); + else if(sizeof(t_sample) == 8) + ippsCopy_64f((const double *)src,(double *)dst,cnt); + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + } + + if(IsVectorAligned(src)) { + if(IsVectorAligned(dst)) { + // aligned src, aligned dst + __asm { + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ecx,[n] +loopaa: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + movaps xmm0,xmmword ptr[eax] + movaps xmmword ptr[edx],xmm0 + movaps xmm1,xmmword ptr[eax+4*4] + movaps xmmword ptr[edx+4*4],xmm1 + movaps xmm2,xmmword ptr[eax+8*4] + movaps xmmword ptr[edx+8*4],xmm2 + movaps xmm3,xmmword ptr[eax+12*4] + movaps xmmword ptr[edx+12*4],xmm3 + + add eax,16*4 + add edx,16*4 + loop loopaa + } + } + else { + // aligned src, unaligned dst + __asm { + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ecx,[n] +loopau: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + movaps xmm0,xmmword ptr[eax] + movups xmmword ptr[edx],xmm0 + movaps xmm1,xmmword ptr[eax+4*4] + movups xmmword ptr[edx+4*4],xmm1 + movaps xmm2,xmmword ptr[eax+8*4] + movups xmmword ptr[edx+8*4],xmm2 + movaps xmm3,xmmword ptr[eax+12*4] + movups xmmword ptr[edx+12*4],xmm3 + + add eax,16*4 + add edx,16*4 + loop loopau + } + } + } + else { + if(IsVectorAligned(dst)) { + // unaligned src, aligned dst + __asm { + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ecx,[n] +loopua: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + movups xmm0,xmmword ptr[eax] + movaps xmmword ptr[edx],xmm0 + movups xmm1,xmmword ptr[eax+4*4] + movaps xmmword ptr[edx+4*4],xmm1 + movups xmm2,xmmword ptr[eax+8*4] + movaps xmmword ptr[edx+8*4],xmm2 + movups xmm3,xmmword ptr[eax+12*4] + movaps xmmword ptr[edx+12*4],xmm3 + + add eax,16*4 + add edx,16*4 + loop loopua + } + } + else { + // unaligned src, unaligned dst + __asm { + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ecx,[n] +loopuu: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + movups xmm0,xmmword ptr[eax] + movups xmmword ptr[edx],xmm0 + movups xmm1,xmmword ptr[eax+4*4] + movups xmmword ptr[edx+4*4],xmm1 + movups xmm2,xmmword ptr[eax+8*4] + movups xmmword ptr[edx+8*4],xmm2 + movups xmm3,xmmword ptr[eax+12*4] + movups xmmword ptr[edx+12*4],xmm3 + + add eax,16*4 + add edx,16*4 + loop loopuu + } + } + } + + src += n<<4,dst += n<<4; +zero: + while(cnt--) *(dst++) = *(src++); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VECTOROPS__) + if(true) { + int n = cnt>>2,n4 = n<<2; + vScopy(n4,(vector float *)src,(vector float *)dst); + cnt -= n4,src += n4,dst += n4; + while(cnt--) *(dst++) = *(src++); + } + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + while(n--) { + dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = src[3]; + dst[4] = src[4]; dst[5] = src[5]; dst[6] = src[6]; dst[7] = src[7]; + src += 8,dst += 8; + } + while(cnt--) *(dst++) = *(src++); + } +#endif +} + +#if defined(FLEXT_USE_SIMD) && (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) +// because of some frame code Altivec stuff should be in seperate functions.... + +FLEXT_TEMPLATE const vector float zero = (vector float)(0); + +FLEXT_TEMPLATE void SetAltivec(t_sample *dst,int cnt,t_sample s) +{ + vector float svec = LoadValue(s); + int n = cnt>>4; + cnt -= n<<4; + + while(n--) { + vec_st(svec,0,dst); + vec_st(svec,16,dst); + vec_st(svec,32,dst); + vec_st(svec,48,dst); + dst += 16; + } + + while(cnt--) *(dst++) = s; +} + +FLEXT_TEMPLATE void MulAltivec(t_sample *dst,const t_sample *src,t_sample op,int cnt) +{ + const vector float arg = LoadValue(op); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16) { + vector float a1 = vec_ld( 0,src); + vector float a2 = vec_ld(16,src); + vector float a3 = vec_ld(32,src); + vector float a4 = vec_ld(48,src); + + a1 = vec_madd(a1,arg,zero); + a2 = vec_madd(a2,arg,zero); + a3 = vec_madd(a3,arg,zero); + a4 = vec_madd(a4,arg,zero); + + vec_st(a1, 0,dst); + vec_st(a2,16,dst); + vec_st(a3,32,dst); + vec_st(a4,48,dst); + } + + while(cnt--) *(dst++) = *(src++)*op; +} + +FLEXT_TEMPLATE void MulAltivec(t_sample *dst,const t_sample *src,const t_sample *op,int cnt) +{ + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,op += 16,dst += 16) { + vector float a1 = vec_ld( 0,src),b1 = vec_ld( 0,op); + vector float a2 = vec_ld(16,src),b2 = vec_ld(16,op); + vector float a3 = vec_ld(32,src),b3 = vec_ld(32,op); + vector float a4 = vec_ld(48,src),b4 = vec_ld(48,op); + + a1 = vec_madd(a1,b1,zero); + a2 = vec_madd(a2,b2,zero); + a3 = vec_madd(a3,b3,zero); + a4 = vec_madd(a4,b4,zero); + + vec_st(a1, 0,dst); + vec_st(a2,16,dst); + vec_st(a3,32,dst); + vec_st(a4,48,dst); + } + while(cnt--) *(dst++) = *(src++) * *(op++); +} + +FLEXT_TEMPLATE void AddAltivec(t_sample *dst,const t_sample *src,t_sample op,int cnt) +{ + const vector float arg = LoadValue(op); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16) { + vector float a1 = vec_ld( 0,src); + vector float a2 = vec_ld(16,src); + vector float a3 = vec_ld(32,src); + vector float a4 = vec_ld(48,src); + + a1 = vec_add(a1,arg); + a2 = vec_add(a2,arg); + a3 = vec_add(a3,arg); + a4 = vec_add(a4,arg); + + vec_st(a1, 0,dst); + vec_st(a2,16,dst); + vec_st(a3,32,dst); + vec_st(a4,48,dst); + } + + while(cnt--) *(dst++) = *(src++)+op; +} + +FLEXT_TEMPLATE void AddAltivec(t_sample *dst,const t_sample *src,const t_sample *op,int cnt) +{ + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,op += 16,dst += 16) { + vector float a1 = vec_ld( 0,src),b1 = vec_ld( 0,op); + vector float a2 = vec_ld(16,src),b2 = vec_ld(16,op); + vector float a3 = vec_ld(32,src),b3 = vec_ld(32,op); + vector float a4 = vec_ld(48,src),b4 = vec_ld(48,op); + + a1 = vec_add(a1,b1); + a2 = vec_add(a2,b2); + a3 = vec_add(a3,b3); + a4 = vec_add(a4,b4); + + vec_st(a1, 0,dst); + vec_st(a2,16,dst); + vec_st(a3,32,dst); + vec_st(a4,48,dst); + } + while(cnt--) *(dst++) = *(src++) + *(op++); +} + +FLEXT_TEMPLATE void ScaleAltivec(t_sample *dst,const t_sample *src,t_sample opmul,t_sample opadd,int cnt) +{ + const vector float argmul = LoadValue(opmul); + const vector float argadd = LoadValue(opadd); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16) { + vec_st(vec_madd(vec_ld( 0,src),argmul,argadd), 0,dst); + vec_st(vec_madd(vec_ld(16,src),argmul,argadd),16,dst); + vec_st(vec_madd(vec_ld(32,src),argmul,argadd),32,dst); + vec_st(vec_madd(vec_ld(48,src),argmul,argadd),48,dst); + } + + while(cnt--) *(dst++) = *(src++)*opmul+opadd; +} + +FLEXT_TEMPLATE void ScaleAltivec(t_sample *dst,const t_sample *src,t_sample opmul,const t_sample *add,int cnt) +{ + const vector float argmul = LoadValue(opmul); + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16,add += 16) { + vec_st(vec_madd(vec_ld( 0,src),argmul,vec_ld( 0,add)), 0,dst); + vec_st(vec_madd(vec_ld(16,src),argmul,vec_ld(16,add)),16,dst); + vec_st(vec_madd(vec_ld(32,src),argmul,vec_ld(32,add)),32,dst); + vec_st(vec_madd(vec_ld(48,src),argmul,vec_ld(48,add)),48,dst); + } + + while(cnt--) *(dst++) = *(src++) * opmul + *(add++); +} + +FLEXT_TEMPLATE void ScaleAltivec(t_sample *dst,const t_sample *src,const t_sample *mul,const t_sample *add,int cnt) +{ + int n = cnt>>4; + cnt -= n<<4; + + for(; n--; src += 16,dst += 16,mul += 16,add += 16) { + vec_st(vec_madd(vec_ld( 0,src),vec_ld( 0,mul),vec_ld( 0,add)), 0,dst); + vec_st(vec_madd(vec_ld(16,src),vec_ld(16,mul),vec_ld(16,add)),16,dst); + vec_st(vec_madd(vec_ld(32,src),vec_ld(32,mul),vec_ld(32,add)),32,dst); + vec_st(vec_madd(vec_ld(48,src),vec_ld(48,mul),vec_ld(48,add)),48,dst); + } + + while(cnt--) *(dst++) = *(src++) * *(mul++) + *(add++); +} +#endif + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::SetSamples(t_sample *dst,int cnt,t_sample s) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) + ippsSet_32f((float)s,(float *)dst,cnt); + else if(sizeof(t_sample) == 8) + ippsSet_64f((double)s,(double *)dst,cnt); + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + movss xmm0,xmmword ptr [s] + shufps xmm0,xmm0,0 + } + + if(IsVectorAligned(dst)) { + // aligned version + __asm { + mov ecx,[n] + mov edx,dword ptr [dst] +loopa: + movaps xmmword ptr[edx],xmm0 + movaps xmmword ptr[edx+4*4],xmm0 + movaps xmmword ptr[edx+8*4],xmm0 + movaps xmmword ptr[edx+12*4],xmm0 + + add edx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,[n] + mov edx,dword ptr [dst] +loopu: + movups xmmword ptr[edx],xmm0 + movups xmmword ptr[edx+4*4],xmm0 + movups xmmword ptr[edx+8*4],xmm0 + movups xmmword ptr[edx+12*4],xmm0 + + add edx,16*4 + loop loopu + } + } + + dst += n<<4; +zero: + while(cnt--) *(dst++) = s; + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(dst)) + SetAltivec(dst,cnt,s); + else +#endif +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + while(n--) { + dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = dst[5] = dst[6] = dst[7] = s; + dst += 8; + } + + while(cnt--) *(dst++) = s; + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::MulSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMulC_32f((const float *)src,(float)op,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMulC_64f((const double *)src,(double)op,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + __m128 a = _mm_load1_ps(&op); + + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [op] + shufps xmm0,xmm0,0 + } + + if(VectorsAligned(src,dst)) { + // aligned version + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopa: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movaps xmm1,xmmword ptr[eax] + mulps xmm1,xmm0 + movaps xmmword ptr[edx],xmm1 + + movaps xmm2,xmmword ptr[eax+4*4] + mulps xmm2,xmm0 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm3,xmmword ptr[eax+8*4] + mulps xmm3,xmm0 + movaps xmmword ptr[edx+8*4],xmm3 + + movaps xmm4,xmmword ptr[eax+12*4] + mulps xmm4,xmm0 + movaps xmmword ptr[edx+12*4],xmm4 + + add eax,16*4 + add edx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopu: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movups xmm1,xmmword ptr[eax] + mulps xmm1,xmm0 + movups xmmword ptr[edx],xmm1 + + movups xmm2,xmmword ptr[eax+4*4] + mulps xmm2,xmm0 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm3,xmmword ptr[eax+8*4] + mulps xmm3,xmm0 + movups xmmword ptr[edx+8*4],xmm3 + + movups xmm4,xmmword ptr[eax+12*4] + mulps xmm4,xmm0 + movups xmmword ptr[edx+12*4],xmm4 + + add eax,16*4 + add edx,16*4 + loop loopu + } + } + + src += n<<4,dst += n<<4; +zero: + while(cnt--) *(dst++) = *(src++)*op; + } + else +#elif defined(__APPLE__) && defined(__VDSP__) + if(true) { + vDSP_vsmul(src,1,&op,dst,1,cnt); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) + MulAltivec(dst,src,op,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + + if(src == dst) { + while(n--) { + dst[0] *= op; dst[1] *= op; dst[2] *= op; dst[3] *= op; + dst[4] *= op; dst[5] *= op; dst[6] *= op; dst[7] *= op; + dst += 8; + } + while(cnt--) *(dst++) *= op; + } + else { + while(n--) { + dst[0] = src[0]*op; dst[1] = src[1]*op; + dst[2] = src[2]*op; dst[3] = src[3]*op; + dst[4] = src[4]*op; dst[5] = src[5]*op; + dst[6] = src[6]*op; dst[7] = src[7]*op; + src += 8,dst += 8; + } + while(cnt--) *(dst++) = *(src++)*op; + } + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMul_32f((const float *)src,(const float *)op,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMul_32f((const double *)src,(const double *)op,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,[src] + mov ebx,[op] + prefetcht0 [eax+0] + prefetcht0 [ebx+0] + prefetcht0 [eax+32] + prefetcht0 [ebx+32] + } + + if(VectorsAligned(src,dst)) { + if(IsVectorAligned(op)) { + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopaa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm0,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + mulps xmm0,xmm1 + movaps xmmword ptr[edx],xmm0 + + movaps xmm2,xmmword ptr[eax+4*4] + movaps xmm3,xmmword ptr[ebx+4*4] + mulps xmm2,xmm3 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm5,xmmword ptr[ebx+8*4] + mulps xmm4,xmm5 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm6,xmmword ptr[eax+12*4] + movaps xmm7,xmmword ptr[ebx+12*4] + mulps xmm6,xmm7 + movaps xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopaa + } + } + else { + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopau: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm0,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + mulps xmm0,xmm1 + movaps xmmword ptr[edx],xmm0 + + movaps xmm2,xmmword ptr[eax+4*4] + movups xmm3,xmmword ptr[ebx+4*4] + mulps xmm2,xmm3 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm4,xmmword ptr[eax+8*4] + movups xmm5,xmmword ptr[ebx+8*4] + mulps xmm4,xmm5 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm6,xmmword ptr[eax+12*4] + movups xmm7,xmmword ptr[ebx+12*4] + mulps xmm6,xmm7 + movaps xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopau + } + } + } + else { + if(IsVectorAligned(op)) { + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopua: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm0,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + mulps xmm0,xmm1 + movups xmmword ptr[edx],xmm0 + + movups xmm2,xmmword ptr[eax+4*4] + movaps xmm3,xmmword ptr[ebx+4*4] + mulps xmm2,xmm3 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm4,xmmword ptr[eax+8*4] + movaps xmm5,xmmword ptr[ebx+8*4] + mulps xmm4,xmm5 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm6,xmmword ptr[eax+12*4] + movaps xmm7,xmmword ptr[ebx+12*4] + mulps xmm6,xmm7 + movups xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopua + } + } + else { + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] +loopuu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm0,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + mulps xmm0,xmm1 + movups xmmword ptr[edx],xmm0 + + movups xmm2,xmmword ptr[eax+4*4] + movups xmm3,xmmword ptr[ebx+4*4] + mulps xmm2,xmm3 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm5,xmmword ptr[ebx+8*4] + mulps xmm4,xmm5 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm6,xmmword ptr[eax+12*4] + movups xmm7,xmmword ptr[ebx+12*4] + mulps xmm6,xmm7 + movups xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopuu + } + } + } + + src += n<<4,dst += n<<4,op += n<<4; +zero: + while(cnt--) *(dst++) = *(src++) * *(op++); + } + else +#elif defined(__APPLE__) && defined(__VDSP__) + if(true) { + vDSP_vmul(src,1,op,1,dst,1,cnt); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,op,dst)) + MulAltivec(dst,src,op,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + + if(src == dst) { + while(n--) { + dst[0] *= op[0]; dst[1] *= op[1]; + dst[2] *= op[2]; dst[3] *= op[3]; + dst[4] *= op[4]; dst[5] *= op[5]; + dst[6] *= op[6]; dst[7] *= op[7]; + dst += 8,op += 8; + } + while(cnt--) *(dst++) *= *(op++); + } + else { + while(n--) { + dst[0] = src[0]*op[0]; dst[1] = src[1]*op[1]; + dst[2] = src[2]*op[2]; dst[3] = src[3]*op[3]; + dst[4] = src[4]*op[4]; dst[5] = src[5]*op[5]; + dst[6] = src[6]*op[6]; dst[7] = src[7]*op[7]; + src += 8,dst += 8,op += 8; + } + while(cnt--) *(dst++) = *(src++) * *(op++); + } + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AddSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsAddC_32f((const float *)src,(float)op,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsAddC_64f_I((const double *)src,(double)op,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,[src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [op] + shufps xmm0,xmm0,0 + } + + if(VectorsAligned(src,dst)) { + // aligned version + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopa: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movaps xmm1,xmmword ptr[eax] + addps xmm1,xmm0 + movaps xmmword ptr[edx],xmm1 + + movaps xmm2,xmmword ptr[eax+4*4] + addps xmm2,xmm0 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm3,xmmword ptr[eax+8*4] + addps xmm3,xmm0 + movaps xmmword ptr[edx+8*4],xmm3 + + movaps xmm4,xmmword ptr[eax+12*4] + addps xmm4,xmm0 + movaps xmmword ptr[edx+12*4],xmm4 + + add eax,16*4 + add edx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,[n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopu: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movups xmm1,xmmword ptr[eax] + addps xmm1,xmm0 + movups xmmword ptr[edx],xmm1 + + movups xmm2,xmmword ptr[eax+4*4] + addps xmm2,xmm0 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm3,xmmword ptr[eax+8*4] + addps xmm3,xmm0 + movups xmmword ptr[edx+8*4],xmm3 + + movups xmm4,xmmword ptr[eax+12*4] + addps xmm4,xmm0 + movups xmmword ptr[edx+12*4],xmm4 + + add eax,16*4 + add edx,16*4 + loop loopu + } + } + src += n<<4,dst += n<<4,op += n<<4; +zero: + while(cnt--) *(dst++) = *(src++)+op; + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) + AddAltivec(dst,src,op,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + + if(src == dst) { + while(n--) { + dst[0] += op; dst[1] += op; dst[2] += op; dst[3] += op; + dst[4] += op; dst[5] += op; dst[6] += op; dst[7] += op; + dst += 8; + } + while(cnt--) *(dst++) += op; + } + else { + while(n--) { + dst[0] = src[0]+op; dst[1] = src[1]+op; + dst[2] = src[2]+op; dst[3] = src[3]+op; + dst[4] = src[4]+op; dst[5] = src[5]+op; + dst[6] = src[6]+op; dst[7] = src[7]+op; + src += 8,dst += 8; + } + while(cnt--) *(dst++) = *(src++)+op; + } + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsAdd_32f((const float *)src,(const float *)op,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsAdd_64f((const double *)src,(const double *)op,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // Prefetch cache + __asm { + mov eax,dword ptr [src] + mov ebx,dword ptr [op] + prefetcht0 [eax] + prefetcht0 [ebx] + prefetcht0 [eax+32] + prefetcht0 [ebx+32] + } + + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + if(VectorsAligned(src,dst)) { + if(IsVectorAligned(op)) { + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopaa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm0,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + addps xmm0,xmm1 + movaps xmmword ptr[edx],xmm0 + + movaps xmm2,xmmword ptr[eax+4*4] + movaps xmm3,xmmword ptr[ebx+4*4] + addps xmm2,xmm3 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm5,xmmword ptr[ebx+8*4] + addps xmm4,xmm5 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm6,xmmword ptr[eax+12*4] + movaps xmm7,xmmword ptr[ebx+12*4] + addps xmm6,xmm7 + movaps xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopaa + } + } + else { + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopau: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm0,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + addps xmm0,xmm1 + movaps xmmword ptr[edx],xmm0 + + movaps xmm2,xmmword ptr[eax+4*4] + movups xmm3,xmmword ptr[ebx+4*4] + addps xmm2,xmm3 + movaps xmmword ptr[edx+4*4],xmm2 + + movaps xmm4,xmmword ptr[eax+8*4] + movups xmm5,xmmword ptr[ebx+8*4] + addps xmm4,xmm5 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm6,xmmword ptr[eax+12*4] + movups xmm7,xmmword ptr[ebx+12*4] + addps xmm6,xmm7 + movaps xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopau + } + } + } + else { + if(IsVectorAligned(op)) { + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopua: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm0,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + addps xmm0,xmm1 + movups xmmword ptr[edx],xmm0 + + movups xmm2,xmmword ptr[eax+4*4] + movaps xmm3,xmmword ptr[ebx+4*4] + addps xmm2,xmm3 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm4,xmmword ptr[eax+8*4] + movaps xmm5,xmmword ptr[ebx+8*4] + addps xmm4,xmm5 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm6,xmmword ptr[eax+12*4] + movaps xmm7,xmmword ptr[ebx+12*4] + addps xmm6,xmm7 + movups xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopua + } + } + else { + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [op] + loopuu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm0,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + addps xmm0,xmm1 + movups xmmword ptr[edx],xmm0 + + movups xmm2,xmmword ptr[eax+4*4] + movups xmm3,xmmword ptr[ebx+4*4] + addps xmm2,xmm3 + movups xmmword ptr[edx+4*4],xmm2 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm5,xmmword ptr[ebx+8*4] + addps xmm4,xmm5 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm6,xmmword ptr[eax+12*4] + movups xmm7,xmmword ptr[ebx+12*4] + addps xmm6,xmm7 + movups xmmword ptr[edx+12*4],xmm6 + + add eax,16*4 + add ebx,16*4 + add edx,16*4 + loop loopuu + } + } + } + + src += n<<4,dst += n<<4,op += n<<4; +zero: + while(cnt--) *(dst++) = *(src++) + *(op++); + } + else +#elif defined(__APPLE__) && defined(__VDSP__) + if(true) { + vDSP_vadd(src,1,op,1,dst,1,cnt); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,op,dst)) + AddAltivec(dst,src,op,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + + if(dst == src) { + while(n--) { + dst[0] += op[0]; dst[1] += op[1]; + dst[2] += op[2]; dst[3] += op[3]; + dst[4] += op[4]; dst[5] += op[5]; + dst[6] += op[6]; dst[7] += op[7]; + dst += 8,op += 8; + } + while(cnt--) *(dst++) += *(op++); + } + else { + while(n--) { + dst[0] = src[0]+op[0]; dst[1] = src[1]+op[1]; + dst[2] = src[2]+op[2]; dst[3] = src[3]+op[3]; + dst[4] = src[4]+op[4]; dst[5] = src[5]+op[5]; + dst[6] = src[6]+op[6]; dst[7] = src[7]+op[7]; + src += 8,dst += 8,op += 8; + } + while(cnt--) *(dst++) = *(src++) + *(op++); + } + } +#endif +} + + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,t_sample opadd,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMulC_32f((const float *)src,(float)opmul,(float *)dst,cnt); + ippsAddC_32f_I((float)opadd,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMulC_64f((const double *)src,(double)opmul,(double *)dst,cnt); + ippsAddC_64f_I((double)opadd,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [opadd] + shufps xmm0,xmm0,0 + movss xmm1,xmmword ptr [opmul] + shufps xmm1,xmm1,0 + } + + if(VectorsAligned(src,dst)) { + // aligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopa: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movaps xmm2,xmmword ptr[eax] + mulps xmm2,xmm1 + addps xmm2,xmm0 + movaps xmmword ptr[edx],xmm2 + + movaps xmm3,xmmword ptr[eax+4*4] + mulps xmm3,xmm1 + addps xmm3,xmm0 + movaps xmmword ptr[edx+4*4],xmm3 + + movaps xmm4,xmmword ptr[eax+8*4] + mulps xmm4,xmm1 + addps xmm4,xmm0 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm5,xmmword ptr[eax+12*4] + mulps xmm5,xmm1 + addps xmm5,xmm0 + movaps xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] +loopu: + prefetcht0 [eax+64] + prefetcht0 [eax+96] + + movups xmm2,xmmword ptr[eax] + mulps xmm2,xmm1 + addps xmm2,xmm0 + movups xmmword ptr[edx],xmm2 + + movups xmm3,xmmword ptr[eax+4*4] + mulps xmm3,xmm1 + addps xmm3,xmm0 + movups xmmword ptr[edx+4*4],xmm3 + + movups xmm4,xmmword ptr[eax+8*4] + mulps xmm4,xmm1 + addps xmm4,xmm0 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm5,xmmword ptr[eax+12*4] + mulps xmm5,xmm1 + addps xmm5,xmm0 + movups xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + loop loopu + } + } + + src += n<<4,dst += n<<4; +zero: + while(cnt--) *(dst++) = *(src++)*opmul+opadd; + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst)) + ScaleAltivec(dst,src,opmul,opadd,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + while(n--) { + dst[0] = src[0]*opmul+opadd; dst[1] = src[1]*opmul+opadd; + dst[2] = src[2]*opmul+opadd; dst[3] = src[3]*opmul+opadd; + dst[4] = src[4]*opmul+opadd; dst[5] = src[5]*opmul+opadd; + dst[6] = src[6]*opmul+opadd; dst[7] = src[7]*opmul+opadd; + src += 8,dst += 8; + } + while(cnt--) *(dst++) = *(src++)*opmul+opadd; + } +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,const t_sample *opadd,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMulC_32f((const float *)src,(float)opmul,(float *)dst,cnt); + ippsAdd_32f_I((float *)opadd,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMulC_64f((const double *)src,(double)opmul,(double *)dst,cnt); + ippsAdd_64f_I((double *)opadd,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + + movss xmm0,xmmword ptr [opmul] + shufps xmm0,xmm0,0 + } + + if(VectorsAligned(src,dst,opadd)) { + // aligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [opadd] +loopa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movaps xmm2,xmmword ptr[eax] + movaps xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movaps xmmword ptr[edx],xmm2 + + movaps xmm3,xmmword ptr[eax+4*4] + movaps xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movaps xmmword ptr[edx+4*4],xmm3 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm5,xmmword ptr[eax+12*4] + movaps xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movaps xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov ebx,dword ptr [opadd] +loopu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + + movups xmm2,xmmword ptr[eax] + movups xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movups xmmword ptr[edx],xmm2 + + movups xmm3,xmmword ptr[eax+4*4] + movups xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movups xmmword ptr[edx+4*4],xmm3 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm5,xmmword ptr[eax+12*4] + movups xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movups xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + loop loopu + } + } + + src += n<<4,dst += n<<4,opadd += n<<4; +zero: + while(cnt--) *(dst++) = *(src++) * opmul + *(opadd++); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst,opadd)) + ScaleAltivec(dst,src,opmul,opadd,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + if(dst == opadd) { + while(n--) { + dst[0] += src[0]*opmul; dst[1] += src[1]*opmul; + dst[2] += src[2]*opmul; dst[3] += src[3]*opmul; + dst[4] += src[4]*opmul; dst[5] += src[5]*opmul; + dst[6] += src[6]*opmul; dst[7] += src[7]*opmul; + src += 8,dst += 8; + } + while(cnt--) *(dst++) += *(src++)*opmul; + } + else { + while(n--) { + dst[0] = src[0]*opmul+opadd[0]; dst[1] = src[1]*opmul+opadd[1]; + dst[2] = src[2]*opmul+opadd[2]; dst[3] = src[3]*opmul+opadd[3]; + dst[4] = src[4]*opmul+opadd[4]; dst[5] = src[5]*opmul+opadd[5]; + dst[6] = src[6]*opmul+opadd[6]; dst[7] = src[7]*opmul+opadd[7]; + src += 8,dst += 8,opadd += 8; + } + while(cnt--) *(dst++) = *(src++)*opmul+*(opadd++); + } + } +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ScaleSamples(t_sample *dst,const t_sample *src,const t_sample *opmul,const t_sample *opadd,int cnt) +{ +#ifdef FLEXT_USE_IPP + if(sizeof(t_sample) == 4) { + ippsMul_32f((const float *)src,(const float *)opmul,(float *)dst,cnt); + ippsAdd_32f_I((const float *)opadd,(float *)dst,cnt); + } + else if(sizeof(t_sample) == 8) { + ippsMul_64f((const double *)src,(const double *)opmul,(double *)dst,cnt); + ippsAdd_64f_I((const double *)opadd,(double *)dst,cnt); + } + else + ERRINTERNAL(); +#else +#ifdef FLEXT_USE_SIMD +#ifdef _MSC_VER + if(GetSIMDCapabilities()&simd_sse) { + // single precision + int n = cnt>>4; + if(!n) goto zero; + cnt -= n<<4; + + __asm { + mov eax,dword ptr [src] + prefetcht0 [eax+0] + prefetcht0 [eax+32] + } + + if(VectorsAligned(src,dst,opmul,opadd)) { + // aligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov esi,dword ptr [opmul] + mov ebx,dword ptr [opadd] +loopa: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [esi+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + prefetcht0 [esi+96] + + movaps xmm2,xmmword ptr[eax] + movaps xmm0,xmmword ptr[esi] + movaps xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movaps xmmword ptr[edx],xmm2 + + movaps xmm3,xmmword ptr[eax+4*4] + movaps xmm0,xmmword ptr[esi+4*4] + movaps xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movaps xmmword ptr[edx+4*4],xmm3 + + movaps xmm4,xmmword ptr[eax+8*4] + movaps xmm0,xmmword ptr[esi+8*4] + movaps xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movaps xmmword ptr[edx+8*4],xmm4 + + movaps xmm5,xmmword ptr[eax+12*4] + movaps xmm0,xmmword ptr[esi+12*4] + movaps xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movaps xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + add esi,16*4 + loop loopa + } + } + else { + // unaligned version + __asm { + mov ecx,dword ptr [n] + mov eax,dword ptr [src] + mov edx,dword ptr [dst] + mov esi,dword ptr [opmul] + mov ebx,dword ptr [opadd] +loopu: + prefetcht0 [eax+64] + prefetcht0 [ebx+64] + prefetcht0 [esi+64] + prefetcht0 [eax+96] + prefetcht0 [ebx+96] + prefetcht0 [esi+96] + + movups xmm2,xmmword ptr[eax] + movups xmm0,xmmword ptr[esi] + movups xmm1,xmmword ptr[ebx] + mulps xmm2,xmm0 + addps xmm2,xmm1 + movups xmmword ptr[edx],xmm2 + + movups xmm3,xmmword ptr[eax+4*4] + movups xmm0,xmmword ptr[esi+4*4] + movups xmm1,xmmword ptr[ebx+4*4] + mulps xmm3,xmm0 + addps xmm3,xmm1 + movups xmmword ptr[edx+4*4],xmm3 + + movups xmm4,xmmword ptr[eax+8*4] + movups xmm0,xmmword ptr[esi+8*4] + movups xmm1,xmmword ptr[ebx+8*4] + mulps xmm4,xmm0 + addps xmm4,xmm1 + movups xmmword ptr[edx+8*4],xmm4 + + movups xmm5,xmmword ptr[eax+12*4] + movups xmm0,xmmword ptr[esi+12*4] + movups xmm1,xmmword ptr[ebx+12*4] + mulps xmm5,xmm0 + addps xmm5,xmm1 + movups xmmword ptr[edx+12*4],xmm5 + + add eax,16*4 + add edx,16*4 + add ebx,16*4 + add esi,16*4 + loop loopu + } + } + src += n<<4,dst += n<<4,opmul += n<<4,opadd += n<<4; +zero: + while(cnt--) *(dst++) = *(src++) * *(opmul++) + *(opadd++); + } + else +#elif (FLEXT_CPU == FLEXT_CPU_PPC || FLEXT_CPU == FLEXT_CPU_PPC64) && defined(__VEC__) + if(GetSIMDCapabilities()&simd_altivec && VectorsAligned(src,dst,opmul,opadd)) + ScaleAltivec(dst,src,opmul,opadd,cnt); + else +#endif // _MSC_VER +#endif // FLEXT_USE_SIMD + { + int n = cnt>>3; + cnt -= n<<3; + if(dst == opadd) { + while(n--) { + dst[0] += src[0]*opmul[0]; dst[1] += src[1]*opmul[1]; + dst[2] += src[2]*opmul[2]; dst[3] += src[3]*opmul[3]; + dst[4] += src[4]*opmul[4]; dst[5] += src[5]*opmul[5]; + dst[6] += src[6]*opmul[6]; dst[7] += src[7]*opmul[7]; + src += 8,dst += 8,opmul += 8; + } + while(cnt--) *(dst++) += *(src++) * *(opmul++); + } + else { + while(n--) { + dst[0] = src[0]*opmul[0]+opadd[0]; dst[1] = src[1]*opmul[1]+opadd[1]; + dst[2] = src[2]*opmul[2]+opadd[2]; dst[3] = src[3]*opmul[3]+opadd[3]; + dst[4] = src[4]*opmul[4]+opadd[4]; dst[5] = src[5]*opmul[5]+opadd[5]; + dst[6] = src[6]*opmul[6]+opadd[6]; dst[7] = src[7]*opmul[7]+opadd[7]; + src += 8,dst += 8,opmul += 8,opadd += 8; + } + while(cnt--) *(dst++) = *(src++)* *(opmul++) + *(opadd++); + } + } +#endif +} + +#include "flpopns.h" + +#endif // __FLEXT_SIMD_CPP + + diff --git a/externals/grill/trunk/flext/source/flsndobj.cpp b/externals/grill/trunk/flext/source/flsndobj.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c01005f0aae0a37d6d1dcc0d61ef8ef1eb35074e --- /dev/null +++ b/externals/grill/trunk/flext/source/flsndobj.cpp @@ -0,0 +1,138 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +#ifndef __FLEXT_SNDOBJ_CPP +#define __FLEXT_SNDOBJ_CPP + +#include "flext.h" +#include "flsndobj.h" + +#include "flpushns.h" + +flext_sndobj::flext_sndobj(): + inobjs(0),outobjs(0), + inobj(NULL),tmpobj(NULL),outobj(NULL), + smprt(0),blsz(0) +{} + +bool flext_sndobj::Init() +{ + bool ret = flext_dsp::Init(); + inobjs = CntInSig(); + outobjs = CntOutSig(); + return ret; +} + +void flext_sndobj::Exit() +{ + ClearObjs(); + flext_dsp::Exit(); +} + +void flext_sndobj::ClearObjs() +{ + FreeObjs(); + + if(inobj) { + for(int i = 0; i < inobjs; ++i) delete inobj[i]; + delete[] inobj; inobj = NULL; + } + if(tmpobj) { + for(int i = 0; i < inobjs; ++i) delete tmpobj[i]; + delete[] tmpobj; tmpobj = NULL; + } + if(outobj) { + for(int i = 0; i < outobjs; ++i) delete outobj[i]; + delete[] outobj; outobj = NULL; + } +} + +bool flext_sndobj::CbDsp() +{ + // called on every rebuild of the dsp chain + + int i; + if(Blocksize() != blsz || Samplerate() != smprt) { + // block size or sample rate has changed... rebuild all objects + + ClearObjs(); + + blsz = Blocksize(); + smprt = Samplerate(); + + // set up sndobjs for inlets and outlets + if(inobjs) { + inobj = new Inlet *[inobjs]; + tmpobj = new SndObj *[inobjs]; + for(i = 0; i < inobjs; ++i) { + inobj[i] = new Inlet(InSig(i),blsz,smprt); + tmpobj[i] = new SndObj(NULL,blsz,smprt); + } + } + if(outobjs) { + outobj = new Outlet *[outobjs]; + for(i = 0; i < outobjs; ++i) outobj[i] = new Outlet(OutSig(i),blsz,smprt); + } + + if(!NewObjs()) ClearObjs(); + } + else { + // assign changed input/output vectors + + for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(InSig(i)); + for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(OutSig(i)); + } + return true; +} + +void flext_sndobj::CbSignal() +{ + for(int i = 0; i < inobjs; ++i) *tmpobj[i] << *inobj[i]; + ProcessObjs(); +} + + +flext_sndobj::Inlet::Inlet(const t_sample *b,int vecsz,float sr): + SndIO(1,sizeof(t_sample)*8,NULL,vecsz,sr),buf(b) +{} + +short flext_sndobj::Inlet::Read() +{ + if(!m_error) { + for(m_vecpos = 0; m_vecpos < m_samples; m_vecpos++) + m_output[m_vecpos] = buf[m_vecpos]; + return 1; + } + else return 0; +} + +short flext_sndobj::Inlet::Write() { return 0; } + + +flext_sndobj::Outlet::Outlet(t_sample *b,int vecsz,float sr): + SndIO(1,sizeof(t_sample)*8,NULL,vecsz,sr),buf(b) +{} + +short flext_sndobj::Outlet::Read() { return 0; } + +short flext_sndobj::Outlet::Write() +{ + if(!m_error) { + if(m_IOobjs[0]) + for(m_vecpos = 0; m_vecpos < m_samples; m_vecpos++) + buf[m_vecpos] = m_IOobjs[0]->Output(m_vecpos); + return 1; + } + else return 0; +} + +#include "flpopns.h" + +#endif // __FLEXT_SNDOBJ_CPP + + diff --git a/externals/grill/trunk/flext/source/flsndobj.h b/externals/grill/trunk/flext/source/flsndobj.h new file mode 100644 index 0000000000000000000000000000000000000000..e4b69c0463bb1a4f840c05ec61dd7c88d2af4de5 --- /dev/null +++ b/externals/grill/trunk/flext/source/flsndobj.h @@ -0,0 +1,107 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +#ifndef __FLEXT_SNDOBJ_H +#define __FLEXT_SNDOBJ_H + +#include "flext.h" + +// PI is defined in the Max/MSP SDK, but clashes with SndObj.h +#ifdef PI +#undef PI +#endif + +// SndObj needs WIN symbol when compiled under Windows +#if FLEXT_OS == FLEXT_OS_WIN && !defined(WIN) +#define WIN +#endif + +#ifndef FLEXT_THREADS +#define NOPTHREAD +#endif + +#include <SndObj/SndObj.h> +#include <SndObj/SndIO.h> + +#undef NOPTHREAD + +#include "flpushns.h" + +class FLEXT_SHARE flext_sndobj: + public flext_dsp +{ + FLEXT_HEADER(flext_sndobj,flext_dsp) + +public: + flext_sndobj(); + + // these have to be overridden in child classes + virtual bool NewObjs() { return true; } + virtual void FreeObjs() {} + virtual void ProcessObjs() {} + + // inputs and outputs + SndObj &InObj(int i) { return *tmpobj[i]; } + SndIO &OutObj(int i) { return *outobj[i]; } + +protected: + virtual bool Init(); + virtual void Exit(); + +private: + //! SndObj for reading from inlet buffer + class Inlet: + public SndIO + { + public: + Inlet(const t_sample *b,int vecsz,float sr); + virtual short Read(); + virtual short Write(); + + void SetBuf(const t_sample *b) { buf = b; } + + private: + const t_sample *buf; + }; + + //! SndObj for writing to outlet buffer + class Outlet: + public SndIO + { + public: + Outlet(t_sample *b,int vecsz,float sr); + virtual short Read(); + virtual short Write(); + + void SetBuf(t_sample *b) { buf = b; } + + private: + t_sample *buf; + }; + + virtual bool CbDsp(); + virtual void CbSignal(); + + void ClearObjs(); + + int inobjs,outobjs; + SndObj **tmpobj; + Inlet **inobj; + Outlet **outobj; + + float smprt; + int blsz; +}; + +#include "flpopns.h" + +#ifdef FLEXT_INLINE +# include "flsndobj.cpp" +#endif + +#endif diff --git a/externals/grill/trunk/flext/source/flstdc.h b/externals/grill/trunk/flext/source/flstdc.h new file mode 100644 index 0000000000000000000000000000000000000000..c18d544530150a35b70efa9e7f1e26b3b224b844 --- /dev/null +++ b/externals/grill/trunk/flext/source/flstdc.h @@ -0,0 +1,333 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flstdc.h + \brief Definitions to unite Max/MSP and PD notions + + This file contains a few definitions to unite a few of the notions that + once drifted apart in Max and PD. It is not elegant but helps. +*/ + +#ifndef __FLEXT_STDC_H +#define __FLEXT_STDC_H + +#if defined(_MSC_VER) && (_MSC_VER < 0x1300) +/* + include math.h here - when included with PD or Max/MSP headers, + C linkage would be used which disturbs MSVC6 +*/ +#include <cmath> +#endif + +#ifdef _MSC_VER +#include <crtdbg.h> +#endif +#include <cassert> + +// PD stuff + +#if FLEXT_SYS == FLEXT_SYS_PD + +/* PD definitions start here */ + +#ifdef _MSC_VER + #pragma warning (push) + #pragma warning (disable:4091 4005) +#endif + +#if FLEXT_OS == FLEXT_OS_WIN && !defined(NT) +#define NT +#endif + +extern "C" { + // Include the relevant PD header files + #ifdef FLEXT_DEBUG + /* PD header file structure has changed with version 0.37 + from then on m_imp.h needs m_pd.h to be included before + on the other hand versions < 0.37 don't like that.... + (they want m_imp.h solely as m_pd.h is included therein) + So better use the m_pd.h here also for the debug version. + Change that if really needed for debugging PD internals... + */ + + #ifndef PD_VERSION + // include only if not already included + #include <m_pd.h> + #endif +// #include <m_imp.h> // for easier debugging + #else + #ifndef PD_VERSION + // include only if not already included + #include <m_pd.h> + #endif + #endif +} + +#ifdef _MSC_VER + #pragma warning (pop) +#endif + +#include "flpushns.h" + +#ifdef cabs +#undef cabs // this is defined in m_pd.h (clashes with math.h in MacOSX) +#endif + +typedef t_object t_sigobj; +typedef t_gpointer *t_ptrtype; + +typedef t_float t_flint; +typedef t_symbol *t_symtype; +typedef t_class **t_thing; + +typedef t_clock t_qelem; + +#define A_NOTHING A_NULL +#define A_FLINT A_FLOAT +#define A_DEFFLINT A_DEFFLOAT +#define A_DEFSYMBOL A_DEFSYM + +#include "flpopns.h" + + +#elif FLEXT_SYS == FLEXT_SYS_MAX + +/* -------------- Max/MSP ------------------- */ + +// 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 + +#if FLEXT_OS == FLEXT_OS_MAC + #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH + // MachO version - must insert prefix header + #include <Carbon/Carbon.h> + #else + // CFM version + #ifndef __MRC__ + #define powerc + #endif + #define __MOTO__ 0 + + #include <MacTypes.h> + #endif +#elif FLEXT_OS == FLEXT_OS_WIN + #define WIN_VERSION 1 + #define WIN_EXT_VERSION 1 +#endif + +// necessary for the old OS9 SDK +extern "C" { + +#include "ext.h" +#include "ext_user.h" +#if FLEXT_OS != FLEXT_OS_MAC || defined(MAC_VERSION) +// doesn't exist for OS9 +#include "ext_critical.h" +#include "buffer.h" +#else +// for OS9 include "inofficial" header file +#include "flmspbuffer.h" +#endif +#include "z_dsp.h" +#include "ext_obex.h" + +// check for Max5 SDK +#include "commonsyms.h" +#if C74_MAX_SDK_VERSION >= 0x0500 || COMMON_SYMBOLS_VERSION >= 500 + #define _FLEXT_MAX5SDK +#endif + +} // extern "C" + +#include "flpushns.h" + +#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; + +typedef t_int t_flint; +typedef t_symbol *t_symtype; +typedef t_object *t_thing; + +#ifndef _FLEXT_MAX5SDK + // for the following to work you should have the latest SDK + #if FLEXT_OS == FLEXT_OS_MAC //&& !defined(MAC_VERSION) + typedef struct qelem t_qelem; + #else + typedef void *t_qelem; + #endif +#endif + +typedef method t_method; +typedef method t_newmethod; +typedef int t_atomtype; + +#ifndef _FLEXT_MAX5SDK +typedef struct clock t_clock; // this is defined in the Max5 SDK +#endif + +typedef void t_binbuf; + +#undef clock_free +#define clock_free(tick) freeobject((object *)tick) + +#define A_NULL A_NOTHING +#define A_DEFFLINT A_DEFLONG + +#ifndef A_INT +#define A_INT A_LONG +#endif + +#ifndef A_DEFINT +#define A_DEFINT A_DEFLONG +#endif + +#ifndef A_SYMBOL +#define A_SYMBOL A_SYM +#endif + +#ifndef A_DEFSYMBOL +#define A_DEFSYMBOL A_DEFSYM +#endif + +#if FLEXT_OS == FLEXT_OS_MAC && !defined(MAC_VERSION) +// simulate non-existing functions for OS9 +#define critical_enter(N) +#define critical_exit(N) +#endif + +#ifdef _MSC_VER +#pragma pack(pop,flext_maxsdk) +#endif + +#include "flpopns.h" + +#else +#error Platform not supported +#endif // FLEXT_SYS + + +// general definitions + +#include "flpushns.h" + +typedef t_symbol *t_symptr; + +// ------------------------- + +#ifdef FLEXT_LOGGING +/* If FLEXT_LOGGING is defined implement logging */ + +#ifdef _MSC_VER +#define FLEXT_LOG(s) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s) +#define FLEXT_LOG1(s,v1) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1) +#define FLEXT_LOG2(s,v1,v2) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2) +#define FLEXT_LOG3(s,v1,v2,v3) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3) +#define FLEXT_LOG4(s,v1,v2,v3,v4) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4) +#define FLEXT_LOG5(s,v1,v2,v3,v4,v5) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5) +#define FLEXT_LOG6(s,v1,v2,v3,v4,v5,v6) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5,v6) +#define FLEXT_LOG7(s,v1,v2,v3,v4,v5,v6,v7) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5,v6,v7) +#define FLEXT_LOG8(s,v1,v2,v3,v4,v5,v6,v7,v8) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5,v6,v7,v8) +#define FLEXT_LOG9(s,v1,v2,v3,v4,v5,v6,v7,v8,v9) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",s,v1,v2,v3,v4,v5,v6,v7,v8,v9) +#else +#define FLEXT_LOG(s) post(s) +#define FLEXT_LOG1(s,v1) post(s,v1) +#define FLEXT_LOG2(s,v1,v2) post(s,v1,v2) +#define FLEXT_LOG3(s,v1,v2,v3) post(s,v1,v2,v3) +#define FLEXT_LOG4(s,v1,v2,v3,v4) post(s,v1,v2,v3,v4) +#define FLEXT_LOG5(s,v1,v2,v3,v4,v5) post(s,v1,v2,v3,v4,v5) +#define FLEXT_LOG6(s,v1,v2,v3,v4,v5,v6) post(s,v1,v2,v3,v4,v5,v6) +#define FLEXT_LOG7(s,v1,v2,v3,v4,v5,v6,v7) post(s,v1,v2,v3,v4,v5,v6,v7) +#define FLEXT_LOG8(s,v1,v2,v3,v4,v5,v6,v7,v8) post(s,v1,v2,v3,v4,v5,v6,v7,v8) +#define FLEXT_LOG9(s,v1,v2,v3,v4,v5,v6,v7,v8,v9) post(s,v1,v2,v3,v4,v5,v6,v7,v8,v9) +#endif + +#else + +/* If FLEXT_LOGGING is not defined avoid logging */ +#define FLEXT_LOG(s) ((void)0) +#define FLEXT_LOG1(s,v1) ((void)0) +#define FLEXT_LOG2(s,v1,v2) ((void)0) +#define FLEXT_LOG3(s,v1,v2,v3) ((void)0) +#define FLEXT_LOG4(s,v1,v2,v3,v4) ((void)0) +#define FLEXT_LOG5(s,v1,v2,v3,v4,v5) ((void)0) +#define FLEXT_LOG6(s,v1,v2,v3,v4,v5,v6) ((void)0) +#define FLEXT_LOG7(s,v1,v2,v3,v4,v5,v6,v7) ((void)0) +#define FLEXT_LOG8(s,v1,v2,v3,v4,v5,v6,v7,v8) ((void)0) +#define FLEXT_LOG9(s,v1,v2,v3,v4,v5,v6,v7,v8,v9) ((void)0) + +#endif + +#ifdef FLEXT_DEBUG +#ifdef _MSC_VER +#define FLEXT_ASSERT(b) do { if(!(b)) _CrtDbgReport(_CRT_ASSERT,__FILE__,__LINE__,"flext",#b); } while(false) +#define FLEXT_WARN(str) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",NULL) +#define FLEXT_ERROR(str) _CrtDbgReport(_CRT_ERROR,__FILE__,__LINE__,"flext",NULL) +#else +#define FLEXT_ASSERT(b) assert(b) +//#define FLEXT_ASSERT(b) do { if(!(b)) error("Assertion failed: " #b " - in " __FILE__ " line %i",(int)__LINE__); } while(false) +#define FLEXT_WARN(str) error("Warning: in " __FILE__ " line %i",(int)__LINE__) +#define FLEXT_ERROR(str) error("Error: in " __FILE__ " line %i",(int)__LINE__) +#endif +#else +#define FLEXT_ASSERT(b) assert(1) +#define FLEXT_WARN(str) assert(1) +#define FLEXT_ERROR(str) error("Error: in " __FILE__ " line %i",(int)__LINE__) +#endif + +#define ERRINTERNAL() error("flext: Internal error in file " __FILE__ ", line %i - please report",(int)__LINE__) + + +// ----- disable attribute editor for PD version < devel_0_36 or 0.37 +#ifndef PD_MAJOR_VERSION +# undef FLEXT_NOATTREDIT +# define FLEXT_NOATTREDIT +#endif + + +// ----- set message queue mode ----- +#if FLEXT_SYS == FLEXT_SYS_PD && PD_MINOR_VERSION >= 37 +// for PD version >= 0.37test10 FLEXT_PDLOCK is standard +# undef FLEXT_PDLOCK +# define FLEXT_PDLOCK +#endif + +#ifndef FLEXT_QMODE +# if FLEXT_SYS == FLEXT_SYS_PD && PD_MINOR_VERSION >= 38 && defined(PD_DEVEL_VERSION) +// use idle callback +# define FLEXT_QMODE 1 +# elif defined(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_QMODE 2 +# else +# define FLEXT_QMODE 0 +# endif +# else +# error FLEXT_PDLOCK can only be defined with PD +# endif +# else +# define FLEXT_QMODE 0 +# endif +#endif + +#ifndef FLEXT_QMODE +# error Internal error: Queueing mode not defined +#endif + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flstk.cpp b/externals/grill/trunk/flext/source/flstk.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ee65ed371ef42c8315c49074948e9bf3f9b419de --- /dev/null +++ b/externals/grill/trunk/flext/source/flstk.cpp @@ -0,0 +1,117 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +#ifndef __FLEXT_STK_CPP +#define __FLEXT_STK_CPP + +#include "flext.h" +#include "flstk.h" + +#include "flpushns.h" + +flext_stk::flext_stk(): + inobjs(0),outobjs(0), + inobj(NULL),outobj(NULL), + smprt(0),blsz(0) +{} + +bool flext_stk::Init() +{ + bool ret = flext_dsp::Init(); + inobjs = CntInSig(); + outobjs = CntOutSig(); + return ret; +} + +void flext_stk::Exit() +{ + ClearObjs(); + flext_dsp::Exit(); +} + +void flext_stk::ClearObjs() +{ + FreeObjs(); + + if(inobj) { + for(int i = 0; i < inobjs; ++i) delete inobj[i]; + delete[] inobj; inobj = NULL; + } + if(outobj) { + for(int i = 0; i < outobjs; ++i) delete outobj[i]; + delete[] outobj; outobj = NULL; + } +} + +bool flext_stk::CbDsp() +{ + // called on every rebuild of the dsp chain + + int i; + + if(Blocksize() != blsz || Samplerate() != smprt) { + // block size or sample rate has changed... rebuild all objects + + ClearObjs(); + + smprt = Samplerate(); + blsz = Blocksize(); + Stk::setSampleRate(smprt); + + // set up sndobjs for inlets and outlets + if(inobjs) { + inobj = new Input *[inobjs]; + for(i = 0; i < inobjs; ++i) + inobj[i] = new Input(InSig(i),blsz); + } + if(outobjs) { + outobj = new Output *[outobjs]; + for(i = 0; i < outobjs; ++i) + outobj[i] = new Output(OutSig(i),blsz); + } + + if(!NewObjs()) ClearObjs(); + } + else { + // assign changed input/output vectors + + for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(InSig(i)); + for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(OutSig(i)); + } + return true; +} + +void flext_stk::CbSignal() +{ + if(inobjs || outobjs) ProcessObjs(blsz); +} + + +// inlet class + +StkFloat *flext_stk::Input::tick(StkFloat *vector,unsigned int vectorSize) +{ + FLEXT_ASSERT(vectorSize == vecsz); + for(unsigned int i = 0; i < vectorSize; i++) vector[i] = tick(); + return vector; +} + + +// outlet class + +void flext_stk::Output::tick(const StkFloat *vector,unsigned int vectorSize) +{ + FLEXT_ASSERT(vectorSize == vecsz); + for(unsigned int i = 0; i < vectorSize; i++) tick(vector[i]); +} + +#include "flpopns.h" + +#endif // __FLEXT_STK_CPP + + diff --git a/externals/grill/trunk/flext/source/flstk.h b/externals/grill/trunk/flext/source/flstk.h new file mode 100644 index 0000000000000000000000000000000000000000..8d69190da1bc73812212a8b0f1559b3e718d832d --- /dev/null +++ b/externals/grill/trunk/flext/source/flstk.h @@ -0,0 +1,133 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +#ifndef __FLEXT_STK_H +#define __FLEXT_STK_H + +#include "flext.h" + +// PI is defined in the Max/MSP SDK, but clashes with Stk.h +#ifdef PI +#undef PI +#endif + +#include <Stk.h> + +#include "flpushns.h" + +using stk::Stk; +using stk::StkFloat; +using stk::StkFrames; + +class FLEXT_SHARE flext_stk: + public flext_dsp +{ + FLEXT_HEADER(flext_stk,flext_dsp) + +public: + flext_stk(); + + // these have to be overridden in child classes + virtual bool NewObjs() { return true; } + virtual void FreeObjs() {} + virtual void ProcessObjs(int blocksize) {} + +protected: + virtual bool Init(); + virtual void Exit(); + + //! STK object for reading from inlet buffer + class Input: + public Stk + { + public: + Input(const t_sample *b,int v): + buf(b),vecsz(v), + index(v-1) + {} + + inline StkFloat lastOut() const { return (StkFloat)buf[index]; } + + inline StkFloat tick() + { + if(++index >= vecsz) index = 0; + return lastOut(); + } + + StkFloat *tick(StkFloat *vector,unsigned int vectorSize); + + inline StkFrames &tick(StkFrames &vector) + { + FLEXT_ASSERT(vector.channels() == 1); + tick(&vector[0],vector.frames()); + return vector; + } + + inline void SetBuf(const t_sample *b) { buf = b; } + + private: + const t_sample *buf; + int vecsz,index; + }; + + //! STK object for writing to outlet buffer + class Output: + public Stk + { + public: + Output(t_sample *b,int v): + buf(b),vecsz(v), + index(0) + {} + + inline void tick(StkFloat s) + { + buf[index] = (t_sample)s; + if(++index >= vecsz) index = 0; + } + + void tick(const StkFloat *vector,unsigned int vectorSize); + + inline void tick(const StkFrames &vector) + { + FLEXT_ASSERT(vector.channels() == 1); + // dirty casting due to bug in STK api... operator[] _should_ return const StkFloat & + tick(&const_cast<StkFrames &>(vector)[0],vector.frames()); + } + + inline void SetBuf(t_sample *b) { buf = b; } + + private: + t_sample *buf; + int vecsz,index; + }; + + Input &Inlet(int ix) { return *inobj[ix]; } + Output &Outlet(int ix) { return *outobj[ix]; } + +private: + virtual bool CbDsp(); + virtual void CbSignal(); + + void ClearObjs(); + + int inobjs,outobjs; + Input **inobj; + Output **outobj; + + float smprt; + int blsz; +}; + +#include "flpopns.h" + +#ifdef FLEXT_INLINE +# include "flstk.cpp" +#endif + +#endif diff --git a/externals/grill/trunk/flext/source/flsupport.cpp b/externals/grill/trunk/flext/source/flsupport.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ae02443f20a04f7f46a9f476e4ae2368a13ce0b3 --- /dev/null +++ b/externals/grill/trunk/flext/source/flsupport.cpp @@ -0,0 +1,328 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flsupport.cpp + \brief flext support functions and classes. +*/ + +#ifndef __FLEXT_SUPPORT_CPP +#define __FLEXT_SUPPORT_CPP + +#include "flext.h" + +#include <cstdio> +#include <cstdarg> +#include <cstdlib> +#include <cstring> +#include <new> + +#include "flpushns.h" + +#ifdef _MSC_VER +#define vsnprintf _vsnprintf +#define snprintf _snprintf +#endif + +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym__ = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_float = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_symbol = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_bang = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_list = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_pointer = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_int = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_signal = NULL; + +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_anything = NULL; + +#if FLEXT_SYS == FLEXT_SYS_MAX +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_buffer = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_size = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_dirty = NULL; +#endif + +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_attributes = NULL; +FLEXT_TEMPIMPL(const t_symbol *FLEXT_CLASSDEF(flext))::sym_methods = NULL; + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::indsp = false; + + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::Version() { return FLEXT_VERSION; } +FLEXT_TEMPIMPL(const char *FLEXT_CLASSDEF(flext))::VersionStr() { return FLEXT_VERSTR; } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Setup() +{ + if(sym__) return; + +#if FLEXT_SYS == FLEXT_SYS_PD + sym__ = &s_; + sym_anything = &s_anything; + sym_pointer = &s_pointer; + sym_float = &s_float; + sym_symbol = &s_symbol; + sym_bang = &s_bang; + sym_list = &s_list; + sym_signal = &s_signal; + sym_int = flext::MakeSymbol("int"); +#elif FLEXT_SYS == FLEXT_SYS_MAX + sym__ = flext::MakeSymbol(""); + sym_int = flext::MakeSymbol("int"); + sym_float = flext::MakeSymbol("float"); + sym_symbol = flext::MakeSymbol("symbol"); + sym_bang = flext::MakeSymbol("bang"); + sym_list = flext::MakeSymbol("list"); + sym_anything = flext::MakeSymbol("anything"); + sym_signal = flext::MakeSymbol("signal"); + + sym_buffer = flext::MakeSymbol("buffer~"); + sym_size = flext::MakeSymbol("size"); + sym_dirty = flext::MakeSymbol("dirty"); +#endif + + sym_attributes = flext::MakeSymbol("attributes"); + sym_methods = flext::MakeSymbol("methods"); + +#ifdef FLEXT_THREADS + thrid = GetThreadId(); + StartHelper(); +#endif +} + + +#if FLEXT_SYS == FLEXT_SYS_PD && defined(FLEXT_THREADED) && defined(FLEXT_PDLOCK) +#define SYSLOCK() sys_lock() +#define SYSUNLOCK() sys_unlock() +#else +#define SYSLOCK() (void)0 +#define SYSUNLOCK() (void)0 +#endif + + +///////////////////////////////////////////////////////// +// overloaded new/delete memory allocation methods +// +///////////////////////////////////////////////////////// + +#define LARGEALLOC 32000 + +#ifndef FLEXT_USE_CMEM + +#ifdef FLEXT_DEBUGMEM +static const size_t memtest = 0x12345678L; +#endif + +FLEXT_TEMPIMPL(void *FLEXT_CLASSDEF(flext_root))::operator new(size_t bytes) +{ + bytes += sizeof(size_t); +#ifdef FLEXT_DEBUGMEM + bytes += sizeof(memtest)*2; +#endif + char *blk; + if(UNLIKELY(bytes >= LARGEALLOC)) { +#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) + blk = (char *)sysmem_newptr(bytes); +#else + // use C library function for large memory blocks + blk = (char *)malloc(bytes); +#endif + } + else { + //! We need system locking here for secondary threads! + SYSLOCK(); + blk = (char *)getbytes(bytes); + SYSUNLOCK(); + } + + FLEXT_ASSERT(blk); + + *(size_t *)blk = bytes; +#ifdef FLEXT_DEBUGMEM + *(size_t *)(blk+sizeof(size_t)) = memtest; + *(size_t *)(blk+bytes-sizeof(memtest)) = memtest; + return blk+sizeof(size_t)+sizeof(memtest); +#else + return blk+sizeof(size_t); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::operator delete(void *blk) +{ + if(!blk) return; + + FLEXT_ASSERT(MemCheck(blk)); + +#ifdef FLEXT_DEBUGMEM + char *ori = (char *)blk-sizeof(size_t)-sizeof(memtest); +#else + char *ori = (char *)blk-sizeof(size_t); +#endif + size_t bytes = *(size_t *)ori; + + if(UNLIKELY(bytes >= LARGEALLOC)) { +#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) + sysmem_freeptr(ori); +#else + // use C library function for large memory blocks + free(ori); +#endif + } + else { + //! We need system locking here for secondary threads! + SYSLOCK(); + freebytes(ori,bytes); + SYSUNLOCK(); + } +} + +#ifdef FLEXT_DEBUGMEM +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_root))::MemCheck(void *blk) +{ + char *ori = (char *)blk-sizeof(size_t)-sizeof(memtest); + size_t bytes = *(size_t *)ori; + + return + *(size_t *)((char *)ori+sizeof(size_t)) == memtest && + *(size_t *)((char *)ori+bytes-sizeof(memtest)) == memtest; +} +#endif + +#endif + +FLEXT_TEMPIMPL(void *FLEXT_CLASSDEF(flext_root))::NewAligned(size_t bytes,int bitalign) +{ + const size_t ovh = sizeof(size_t)+sizeof(char *); + const size_t alignovh = bitalign/8-1; + bytes += ovh+alignovh; + + char *blk; + if(UNLIKELY(bytes >= LARGEALLOC)) { +#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) + blk = (char *)sysmem_newptr(bytes); +#else + // use C library function for large memory blocks + blk = (char *)malloc(bytes); +#endif + } + else { + //! We need system locking here for secondary threads! + SYSLOCK(); + +#if defined(FLEXT_USE_CMEM) + blk = (char *)malloc(bytes); +#else + blk = (char *)getbytes(bytes); +#endif + SYSUNLOCK(); + } + FLEXT_ASSERT(blk); + + char *ablk = reinterpret_cast<char *>((reinterpret_cast<size_t>(blk)+ovh+alignovh) & ~alignovh); + *(char **)(ablk-sizeof(size_t)-sizeof(char *)) = blk; + *(size_t *)(ablk-sizeof(size_t)) = bytes; + return ablk; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::FreeAligned(void *blk) +{ + FLEXT_ASSERT(blk); + + char *ori = *(char **)((char *)blk-sizeof(size_t)-sizeof(char *)); + size_t bytes = *(size_t *)((char *)blk-sizeof(size_t)); + + if(UNLIKELY(bytes >= LARGEALLOC)) { +#if FLEXT_SYS == FLEXT_SYS_MAX && defined(_SYSMEM_H_) + sysmem_freeptr(ori); +#else + // use C library function for large memory blocks + free(ori); +#endif + } + else { + //! We need system locking here for secondary threads! + SYSLOCK(); + +#if defined(FLEXT_USE_CMEM) + free(ori); +#else + freebytes(ori,bytes); +#endif + SYSUNLOCK(); + } +} + +// ------------------------------------------ + +/*! \todo there is probably also a shortcut for Max and jMax + \todo size checking +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::GetAString(const t_atom &a,char *buf,size_t szbuf) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + atom_string(const_cast<t_atom *>(&a),buf,(int)szbuf); +#else + if(IsSymbol(a)) STD::strncpy(buf,GetString(a),szbuf); + else if(IsFloat(a)) STD::snprintf(buf,szbuf,"%f",GetFloat(a)); + else if(IsInt(a)) STD::snprintf(buf,szbuf,"%i",GetInt(a)); + else *buf = 0; +#endif +} + +FLEXT_TEMPIMPL(unsigned long FLEXT_CLASSDEF(flext))::AtomHash(const t_atom &a) +{ +#if FLEXT_SYS == FLEXT_SYS_MAX || FLEXT_SYS == FLEXT_SYS_PD + return ((unsigned long)a.a_type<<28)^*(unsigned long *)&a.a_w; +#else +#error Not implemented +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::post(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + + char buf[1024]; + vsnprintf(buf,sizeof buf,fmt, ap); + buf[sizeof buf-1] = 0; // in case of full buffer + +#if FLEXT_SYS == FLEXT_SYS_MAX && C74_MAX_SDK_VERSION >= 0x0500 + ::object_post(NULL,buf); +#else + ::post(buf); +#endif + + va_end(ap); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_root))::error(const char *fmt,...) +{ + va_list ap; + va_start(ap, fmt); + + char buf[1024]; + STD::strcpy(buf,"error: "); + vsnprintf(buf+7,sizeof buf-7,fmt, ap); + buf[sizeof buf-1] = 0; // in case of full buffer + +#if FLEXT_SYS == FLEXT_SYS_MAX + #if C74_MAX_SDK_VERSION >= 0x0500 + ::object_error(NULL,buf); + #else + ::error(buf); + #endif +#else + ::post(buf); +#endif + + va_end(ap); +} + +#include "flpopns.h" + +#endif // __FLEXT_SUPPORT_CPP + + diff --git a/externals/grill/trunk/flext/source/flsupport.h b/externals/grill/trunk/flext/source/flsupport.h new file mode 100644 index 0000000000000000000000000000000000000000..0bd61e7de4195f8f9a549a649b6d289e7ba543b8 --- /dev/null +++ b/externals/grill/trunk/flext/source/flsupport.h @@ -0,0 +1,1405 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flsupport.h + \brief flext support functions and classes +*/ + +#ifndef __FLSUPPORT_H +#define __FLSUPPORT_H + +#include "flstdc.h" +#include <new> +#include <cstring> + + +#include "flpushns.h" + +#if C74_MAX_SDK_VERSION >= 0x0610 +// really bad: post and error are #defines in Max SDK >= 610 +#undef post +#undef error +#endif + +/*! \defgroup FLEXT_SUPPORT Flext support classes + @{ +*/ + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_root); + +typedef FLEXT_TEMPINST(FLEXT_SHARE FLEXT_CLASSDEF(flext_root)) flext_root; + +/*! \brief Flext root support class + + Moved memory functions and console output here so that all the classes + contained in flext can use them +*/ +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext_root) { +public: +// --- console output ----------------------------------------------- + + //! post message to console, with line feed (limited to 1k chars!) + static void post(const char *fmt,...); + //! post error message to console (limited to 1k chars!) + static void error(const char *fmt,...); + +// --- memory ------------------------------------------------------- + + /*! \defgroup FLEXT_S_MEMORY Memory allocation functions + @{ + */ + +#ifdef FLEXT_NOGLOBALNEW +#error FLEXT_NOGLOBALNEW is deprecated, define FLEXT_USE_CMEM instead +#define FLEXT_USE_CMEM +#endif + +#ifdef FLEXT_USE_CMEM + inline void *operator new(size_t bytes) { return ::operator new(bytes); } + inline void operator delete(void *blk) { ::operator delete(blk); } + + inline void *operator new[](size_t bytes) { return ::operator new[](bytes); } + inline void operator delete[](void *blk) { ::operator delete[](blk); } + + static bool MemCheck(void *) { return true; } +#else + /*! Overloaded new memory allocation method + \note this uses a fast allocation method of the real-time system + \warning Max/MSP (or MacOS) allows only 32K in overdrive mode! + */ + void *operator new(size_t bytes); + //! Overloaded delete method + void operator delete(void *blk); + +#ifndef __MRC__ // doesn't allow new[] overloading?! + inline void *operator new[](size_t bytes) { return operator new(bytes); } + inline void operator delete[](void *blk) { operator delete(blk); } +#endif + +#ifdef FLEXT_DEBUGMEM + static bool MemCheck(void *blk); +#else + static bool MemCheck(void *) { return true; } +#endif + +#endif // USECMEM + +#ifndef __BORLANDC__ + inline void *operator new(size_t,void *p) { return p; } + inline void operator delete(void *,void *) {} +#ifndef __MRC__ + inline void *operator new[](size_t,void *p) { return p; } + inline void operator delete[](void *,void *) {} +#endif +#endif + + //! Get an aligned memory block + static void *NewAligned(size_t bytes,int bitalign = 128); + // same with templated type + template<typename T> + static T *NewAligned(size_t times,int bitalign = 128) { return static_cast<T *>(NewAligned(times*sizeof(T),bitalign)); } + //! Free an aligned memory block + static void FreeAligned(void *blk); + //! Test for alignment + static bool IsAligned(void *ptr,int bitalign = 128) { + return (reinterpret_cast<size_t>(ptr)&(bitalign-1)) == 0; + } + //! @} FLEXT_S_MEMORY +}; + +#ifndef FLEXT_USE_CMEM +/************************************************************************/ +// MFC doesn't like global overloading of allocators +// anyway, who likes MFC + +#if !defined(_MSC_VER) && !defined(__BORLANDC__) +#define NEWTHROW throw(std::bad_alloc) +#define DELTHROW throw() +#else +#define NEWTHROW +#define DELTHROW +#endif + +// define global new/delete operators +inline void *operator new(size_t bytes) NEWTHROW { return flext_root::operator new(bytes); } +inline void operator delete(void *blk) DELTHROW { flext_root::operator delete(blk); } +#ifndef __MRC__ // doesn't allow new[] overloading?! +inline void *operator new[](size_t bytes) NEWTHROW { return flext_root::operator new[](bytes); } +inline void operator delete[](void *blk) DELTHROW { flext_root::operator delete[](blk); } +#endif + +#endif // FLEXT_USE_CMEM + +/************************************************************************/ + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext); + +typedef FLEXT_TEMPINST(FLEXT_CLASSDEF(flext)) flext; + +FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_base); + +/*! \brief Flext support class + + A number of methods (most are static functions) are defined here for convenience. + This class doesn't define any data members, hence it can be inherited to all + classes (not only PD objects) to profit from the cross-platform functionality. + Examples are the overloaded memory allocation, atom and atom list functions, + thread functions and classes, the sample buffer class and others. + + This class can also be used for a non-object class (not representing an external object) + and won't give any extra burden to it. +*/ + +FLEXT_TEMPLATE +class FLEXT_SHARE FLEXT_CLASSDEF(flext): + public flext_root +{ + /*! \defgroup FLEXT_SUPPORT Flext support class + @{ + */ +public: + +// --- version ----------------------------------------------- + + /*! \brief Flext version number + + Return the version number of the flext library. + For statically linked flext this is identical to the header definition FLEXT_VERSION, + otherwise it reflects the version number of the shared flext library. + */ + static int Version(); + + //! Flext version string + static const char *VersionStr(); + +// --- special typedefs --------------------------------------------- + +// later! +#if 0 + typedef t_float Float; + typedef t_int Int; + typedef t_sample Sample; + typedef const t_symbol *Symbol; + typedef t_atom Atom; +#endif + +// --- buffer/array stuff ----------------------------------------- + + /*! \defgroup FLEXT_S_BUFFER Buffer handling + @{ + */ + + //! Class for platform independent buffer handling + class FLEXT_SHARE buffer: + public flext_root + { + public: + +#if FLEXT_SYS == FLEXT_SYS_PD + typedef bool lock_t; +#elif FLEXT_SYS == FLEXT_SYS_MAX + typedef long lock_t; +#else +#error Not implemented +#endif + + +// PD 64-bit buffer handling macros +#if FLEXT_SYS == FLEXT_SYS_PD +# if PD_MINOR_VERSION >= 41 + /* use new garray support that is 64-bit safe */ +# define FLEXT_PD_ARRAYGRAB garray_getfloatwords +# define FLEXT_ARRAYTYPE t_word +# define FLEXT_GETSAMPLE(x) ((x).w_float) + +# else + /* use old garray support, not 64-bit safe */ +# define FLEXT_PD_ARRAYGRAB garray_getfloatarray +# define FLEXT_ARRAYTYPE t_sample +# define FLEXT_GETSAMPLE(x) (x) +# endif + +#elif FLEXT_SYS == FLEXT_SYS_MAX +# define FLEXT_ARRAYTYPE t_sample +# define FLEXT_GETSAMPLE(x) (x) +#endif + + class Element { + public: + Element() {} + Element(t_sample s) { FLEXT_GETSAMPLE(el) = s; } + operator t_sample &() { return FLEXT_GETSAMPLE(el); } + operator t_sample () const { return FLEXT_GETSAMPLE(el); } + protected: + FLEXT_ARRAYTYPE el; + }; + + /*! \brief Construct buffer. + \param s: symbol name, can be NULL + \param delayed = true: only sets name, needs another Set(NULL) to really initialize the buffer + \remark As externals can be created prior to the buffer objects they are pointing to, initialization should be done at loadbang! + */ + buffer(const t_symbol *s = NULL,bool delayed = false); + + //! Destroy buffer + ~buffer(); + + /*! \brief Check if the buffer is valid for use + \note This must be true to use any of the other functions except set + */ + bool Ok() const + { + return sym +#if FLEXT_SYS == FLEXT_SYS_PD + && arr +#endif + && data; + } + + /*! \brief Check if buffer content is valid (not in state of content change) + \note buffer must be Ok() + */ + bool Valid() const + { + FLEXT_ASSERT(sym); +#if FLEXT_SYS == FLEXT_SYS_PD + return true; +#elif FLEXT_SYS == FLEXT_SYS_MAX + const t_buffer *p = (const t_buffer *)sym->s_thing; + return p && p->b_valid; +#else +#error not implemented +#endif + } + + /*! \brief Check and update if the buffer has been changed (e.g. resized) + \note buffer must be Ok() + */ + bool Update(); + + /*! \brief Lock buffer + \return previous state (needed for Unlock) + \note buffer must be Ok() + */ + lock_t Lock(); + + /*! \brief Unlock buffer + \param prv: Previous state is returned by Lock() + \note buffer must be Ok() + */ + void Unlock(lock_t prv); + + /*! \brief Set to specified buffer. + \param nameonly: if true sets name only, but doesn't look at buffer actually + \return -1 on failure, 0 on success, 1 if parameters (length, data ptr, channels) have changed + */ + int Set(const t_symbol *s = NULL,bool nameonly = false); + + /*! \brief Declare buffer content as dirty. + \param refr: if true forces immediate graphics refresh + */ + void Dirty(bool refr = false); + + //! Clear the dirty flag. + void ClearDirty(); + + /*! Query whether the buffer content has been changed since the last ClearDirty() + \note With mainstream versions of PD this will always return true, since the dirtiness can't be judged + */ + bool IsDirty() const; + + //! Get symbol of buffer + const t_symbol *Symbol() const { return sym; } + + //! Get literal name of buffer + const char *Name() const { return sym?GetString(sym):""; } + + /*! \brief Get pointer to buffer, channel and frame count. + \remark Channels are interleaved + */ + Element *Data() { return data; } + + const Element *Data() const { return data; } + + //! Get channel count + int Channels() const { return chns; } + //! Get frame count + int Frames() const { return frames; } + //! Set frame count + void Frames(int fr,bool keep = false,bool zero = true); + + //! Get data value in a platform-independent way + inline t_sample operator [](int index) const { return data[index]; } + + //! Reference data value in a platform-independent way + inline t_sample &operator [](int index) { return data[index]; } + + //! Graphic auto refresh interval + void SetRefrIntv(float intv); + + //! Buffer locking class + class Locker + { + public: + Locker(buffer &b): buf(b),lock(b.Lock()) {} + ~Locker() { buf.Unlock(lock); } + private: + buffer &buf; + lock_t lock; + }; + + protected: + //! buffer name + const t_symbol *sym; + //! array holding audio data + Element *data; + //! number of audio channels + int chns; + //! number of frames (multiplied by chns for the number of samples) + int frames; +#if FLEXT_SYS == FLEXT_SYS_PD + //! pointer to the PD array structure + t_garray *arr; + //! update interval + float interval; + //! flag signaling that the data has been changed + bool isdirty; + //! flag showing that the update clock is active + bool ticking; + //! update clock + t_clock *tick; + //! last time the dirty flag was cleared (using the clock_getlogicaltime function) + double cleantime; + + private: + //! update clock callback + static void cb_tick(buffer *b); +#elif FLEXT_SYS == FLEXT_SYS_MAX + //! last time the dirty flag was cleared (using the gettime function) + long cleantime; +#endif + }; + + +//! @} FLEXT_S_BUFFER + +// --- utilities -------------------------------------------------- + + /*! \defgroup FLEXT_S_UTIL Utility functions + @{ + */ + + //! Copy an atom + static void CopyAtom(t_atom *dst,const t_atom *src) { *dst = *src; } + + //! Copy atoms + static void CopyAtoms(int cnt,t_atom *dst,const t_atom *src); + + //! Print an atom + static bool PrintAtom(const t_atom &a,char *buf,size_t bufsz); + + /*! Scan an atom until whitespace + \return next token position, or NULL on failure + */ + static const char *ScanAtom(t_atom &a,const char *buf); + + //! Copy a list of atoms + static t_atom *CopyList(int argc,const t_atom *argv); + + //! Print an atom list + static bool PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz); + + /*! Scan an atom list + \param argc ... maximum amount of atoms scanned + \param argv ... array of atoms + \param buf ... char buffer + */ + static int ScanList(int argc,t_atom *argv,const char *buf); + + //! Copy a memory region + static void CopyMem(void *dst,const void *src,int bytes); + //! Copy a sample array + static void CopySamples(t_sample *dst,const t_sample *src,int cnt); + template<typename T> static void CopySamples(T *dst,const T *src,int cnt) { CopyMem(dst,src,sizeof(*src)*cnt); } + //! Set a memory region + static void ZeroMem(void *dst,int bytes); + //! Set a sample array to a fixed value + static void SetSamples(t_sample *dst,int cnt,t_sample s); + template<typename T> static void SetSamples(T *dst,int cnt,t_sample s) { for(int i = 0; i < cnt; ++i) dst[i] = s; } + //! Set a sample array to 0 + static void ZeroSamples(t_sample *dst,int cnt) { SetSamples(dst,cnt,0); } + template<typename T> static void ZeroSamples(T *dst,int cnt) { ZeroMem(dst,sizeof(*dst)*cnt); } + + + //! Get a 32 bit hash value from an atom + static unsigned long AtomHash(const t_atom &a); + +//! @} FLEXT_S_UTIL + +// --- various symbols -------------------------------------------- + + /*! \defgroup FLEXT_S_ATOM Atom/list handling + @{ + */ + + //! Symbol constant for "" + static const t_symbol *sym__; + //! Symbol constant for "float" + static const t_symbol *sym_float; + //! Symbol constant for "symbol" + static const t_symbol *sym_symbol; + //! Symbol constant for "bang" + static const t_symbol *sym_bang; + //! Symbol constant for "list" + static const t_symbol *sym_list; + //! Symbol constant for "anything" + static const t_symbol *sym_anything; + + /*! \brief Symbol constant for "int" + \note Only the Max/MSP system has this defined as an internal type + */ + static const t_symbol *sym_int; + + /*! Symbol constant for "pointer" + \note Only PD has this defined as an internal type + */ + static const t_symbol *sym_pointer; + + //! Symbol constant for "signal" + static const t_symbol *sym_signal; + + //! \note This is used in macros where the type of the arg is not clear + static const t_symbol *MakeSymbol(const t_symbol *s) { return s; } + + //! Make a symbol from a string + static const t_symbol *MakeSymbol(const char *s) { return ::gensym(const_cast<char *>(s)); } + //! Get symbol string + static const char *GetString(const t_symbol *s) { return s->s_name; } + //! Check for symbol and get string + static const char *GetAString(const t_symbol *s,const char *def = NULL) { return s?GetString(s):def; } + +// --- atom stuff ---------------------------------------- + + //! Set atom from another atom + static void SetAtom(t_atom &a,const t_atom &b) { CopyAtom(&a,&b); } + //! Compare two atoms + static int CmpAtom(const t_atom &a,const t_atom &b); + + // there are some more comparison functions for t_atom types outside the class + + //! Set atom from another atom + static int GetType(const t_atom &a) { return a.a_type; } + + //! Check whether the atom is nothing + static bool IsNothing(const t_atom &a) { return a.a_type == A_NULL; } + //! Set the atom to represent nothing + static void SetNothing(t_atom &a) { a.a_type = A_NULL; } + + //! Check whether the atom is a float + static bool IsFloat(const t_atom &a) { return a.a_type == A_FLOAT; } + + //! Check whether the atom can be represented as a float + static bool CanbeFloat(const t_atom &a) { return IsFloat(a) || IsInt(a); } + + //! Access the float value (without type check) + static float GetFloat(const t_atom &a) { return a.a_w.w_float; } + //! Set the atom to represent a float + static void SetFloat(t_atom &a,float v) { a.a_type = A_FLOAT; a.a_w.w_float = v; } + + //! Check whether the atom is a symbol + static bool IsSymbol(const t_atom &a) { return a.a_type == A_SYMBOL; } + +#if FLEXT_SYS == FLEXT_SYS_PD + //! Access the symbol value (without type check) + static const t_symbol *GetSymbol(const t_atom &a) { return const_cast<const t_symbol *>(a.a_w.w_symbol); } + //! Set the atom to represent a symbol + static void SetSymbol(t_atom &a,const t_symbol *s) { a.a_type = A_SYMBOL; a.a_w.w_symbol = const_cast<t_symbol *>(s); } +#elif FLEXT_SYS == FLEXT_SYS_MAX + //! Access the symbol value (without type check) + static const t_symbol *GetSymbol(const t_atom &a) { return const_cast<const t_symbol *>(a.a_w.w_sym); } + //! Set the atom to represent a symbol + static void SetSymbol(t_atom &a,const t_symbol *s) { a.a_type = A_SYMBOL; a.a_w.w_sym = const_cast<t_symbol *>(s); } +#else +#error +#endif + //! Check for a symbol and get its value + static const t_symbol *GetASymbol(const t_atom &a,const t_symbol *def = NULL) { return IsSymbol(a)?GetSymbol(a):def; } // NULL or empty symbol? + + //! Check whether the atom is a string + static bool IsString(const t_atom &a) { return IsSymbol(a); } + //! Access the string value (without type check) + static const char *GetString(const t_atom &a) { const t_symbol *s = GetSymbol(a); return s?GetString(s):NULL; } + //! Check for a string and get its value + static const char *GetAString(const t_atom &a,const char *def = NULL) { return IsSymbol(a)?GetAString(GetSymbol(a),def):def; } + //! Check for a string and get its value + static void GetAString(const t_atom &a,char *buf,size_t szbuf); + //! Set the atom to represent a string + static void SetString(t_atom &a,const char *c) { SetSymbol(a,MakeSymbol(c)); } + + //! Check whether the atom can be represented as an integer + static bool CanbeInt(const t_atom &a) { return IsFloat(a) || IsInt(a); } + +#if FLEXT_SYS == FLEXT_SYS_PD + //! Check for a float and get its value + static float GetAFloat(const t_atom &a,float def = 0) { return IsFloat(a)?GetFloat(a):def; } + + //! Check whether the atom is an integer + static bool IsInt(const t_atom &) { return false; } + //! Access the integer value (without type check) + static int GetInt(const t_atom &a) { return (int)GetFloat(a); } + //! Check for an integer and get its value + static int GetAInt(const t_atom &a,int def = 0) { return (int)GetAFloat(a,(float)def); } + //! Set the atom to represent a integer (depending on the system) + static void SetInt(t_atom &a,int v) { a.a_type = A_FLOAT; a.a_w.w_float = (float)v; } + +#ifndef FLEXT_COMPATIBLE + //! Check whether the atom strictly is a pointer + static bool IsPointer(const t_atom &a) { return a.a_type == A_POINTER; } + //! Check whether the atom can be a pointer + static bool CanbePointer(const t_atom &a) { return IsPointer(a); } + //! Access the pointer value (without type check) + static t_gpointer *GetPointer(const t_atom &a) { return a.a_w.w_gpointer; } + //! Check for a pointer and get its value + static t_gpointer *GetAPointer(const t_atom &a,t_gpointer *def = NULL) { return IsPointer(a)?GetPointer(a):def; } + //! Set the atom to represent a pointer + static void SetPointer(t_atom &a,t_gpointer *p) { a.a_type = A_POINTER; a.a_w.w_gpointer = (t_gpointer *)p; } +#endif + +#elif FLEXT_SYS == FLEXT_SYS_MAX + //! Check for a float and get its value + static float GetAFloat(const t_atom &a,float def = 0) { return IsFloat(a)?GetFloat(a):(IsInt(a)?GetInt(a):def); } + + //! Check whether the atom is an int + static bool IsInt(const t_atom &a) { return a.a_type == A_INT; } + //! Access the integer value (without type check) + static int GetInt(const t_atom &a) { return a.a_w.w_long; } + //! Check for an integer and get its value + static int GetAInt(const t_atom &a,int def = 0) { return IsInt(a)?GetInt(a):(IsFloat(a)?(int)GetFloat(a):def); } + //! Set the atom to represent an integer + static void SetInt(t_atom &a,int v) { a.a_type = A_INT; a.a_w.w_long = v; } +#else +#error "Platform not supported" +#endif + + // bool type - based on int + + //! Set the atom to represent a boolean + static void SetBool(t_atom &a,bool v) { SetInt(a,v?1:0); } + //! Check whether the atom can be represented as a boolean + static bool CanbeBool(const t_atom &a) { return CanbeInt(a); } + //! Check for an boolean and get its value + static bool GetABool(const t_atom &a) { return GetAInt(a) != 0; } + //! Check for an boolean and get its value + static bool GetBool(const t_atom &a) { return GetInt(a) != 0; } + +// --- atom list stuff ------------------------------------------- + + //! Class representing a list of atoms + class FLEXT_SHARE AtomList + : public flext_root + { + public: + //! Construct list + AtomList(): cnt(0),lst(NULL) {} + //! Construct list + explicit AtomList(int argc,const t_atom *argv = NULL): cnt(0),lst(NULL) { operator()(argc,argv); } + //! Construct list + AtomList(const AtomList &a): cnt(0),lst(NULL) { operator =(a); } + //! Destroy list + virtual ~AtomList(); + + //! Clear list + AtomList &Clear() { return operator()(); } + + //! Set list + AtomList &Set(int argc,const t_atom *argv,int offs = 0,bool resize = false); + //! Get list + int Get(t_atom *argv,int mxsz = -1) const; + + //! Set list + AtomList &operator()(int argc = 0,const t_atom *argv = NULL) { return Set(argc,argv,0,true); } + //! Set list by another AtomList + AtomList &operator =(const AtomList &a) { return operator()(a.Count(),a.Atoms()); } + + //! Compare list to another AtomList ( -1..< , 0..==, 1...> ) + int Compare(const AtomList &a) const; + + bool operator <(const AtomList &a) const { return Compare(a) < 0; } + bool operator <=(const AtomList &a) const { return Compare(a) <= 0; } + bool operator >(const AtomList &a) const { return Compare(a) > 0; } + bool operator >=(const AtomList &a) const { return Compare(a) >= 0; } + bool operator ==(const AtomList &a) const { return Compare(a) == 0; } + bool operator !=(const AtomList &a) const { return Compare(a) != 0; } + + //! Get number of atoms in the list + int Count() const { return cnt; } + //! Get a reference to an indexed atom + t_atom &operator [](int ix) { return lst[ix]; } + //! Get a reference to an indexed atom + const t_atom &operator [](int ix) const { return lst[ix]; } + + //! Get a pointer to the list of atoms + t_atom *Atoms() { return lst; } + //! Get a pointer to the list of atoms + const t_atom *Atoms() const { return lst; } + + //! Append an atom list to the list + AtomList &Append(int argc,const t_atom *argv = NULL) + { + int c = Count(); + Alloc(c+argc,0,c); + Set(argc,argv,c); + return *this; + } + + //! Prepend an atom list to the list + AtomList &Prepend(int argc,const t_atom *argv = NULL) + { + int c = Count(); + Alloc(c+argc,0,c,argc); + Set(argc,argv); + return *this; + } + + //! Append an atom to the list + AtomList &Append(const t_atom &a) { return Append(1,&a); } + //! Append an atom list to the list + AtomList &Append(const AtomList &a) { return Append(a.Count(),a.Atoms()); } + //! Prepend an atom to the list + AtomList &Prepend(const t_atom &a) { return Prepend(1,&a); } + //! Prepend an atom list to the list + AtomList &Prepend(const AtomList &a) { return Prepend(a.Count(),a.Atoms()); } + + //! Get a part of the list + void GetPart(int offs,int len,AtomList &ret) const; + //! Set to a part of the list + AtomList &Part(int offs,int len) { GetPart(offs,len,*this); return *this; } + + //! Represent as a string + bool Print(char *buffer,int buflen) const { return flext::PrintList(Count(),Atoms(),buffer,buflen); } + + /*! Read from string + \note: doesn't clear or reallocate the list + */ + int Scan(const char *buffer) { return flext::ScanList(Count(),Atoms(),buffer); } + + protected: + virtual void Alloc(int sz,int keepix = -1,int keeplen = -1,int keepto = 0); + virtual void Free(); + + int cnt; + t_atom *lst; + }; + + class FLEXT_SHARE AtomListStaticBase + : public AtomList + { + protected: + explicit AtomListStaticBase(int pc,t_atom *dt): precnt(pc),predata(dt) {} + virtual ~AtomListStaticBase(); + virtual void Alloc(int sz,int keepix = -1,int keeplen = -1,int keepto = 0); + virtual void Free(); + + AtomListStaticBase &operator =(const AtomList &a) { AtomList::operator =(a); return *this; } + AtomListStaticBase &operator =(const AtomListStaticBase &a) { AtomList::operator =(a); return *this; } + + const int precnt; + t_atom *const predata; + }; + + template<int PRE> + class AtomListStatic + : public AtomListStaticBase + { + public: + //! Construct list + explicit AtomListStatic(): AtomListStaticBase(PRE,pre) {} + //! Construct list + explicit AtomListStatic(int argc,const t_atom *argv = NULL): AtomListStaticBase(PRE,pre) { AtomList::operator()(argc,argv); } + //! Construct list + explicit AtomListStatic(const AtomList &a): AtomListStaticBase(PRE,pre) { operator =(a); } + + //! Set list by another AtomList + AtomListStatic &operator =(const AtomList &a) { AtomListStaticBase::operator =(a); return *this; } + AtomListStatic &operator =(const AtomListStatic &a) { AtomListStaticBase::operator =(a); return *this; } + protected: + t_atom pre[PRE]; + }; + + //! Class representing an "anything" + class FLEXT_SHARE AtomAnything: + public AtomList + { + public: + explicit AtomAnything(): hdr(NULL) {} + + //! Construct anything + explicit AtomAnything(const t_symbol *h,int argc = 0,const t_atom *argv = NULL) + : AtomList(argc,argv),hdr(h?h:sym__) + {} + + //! Construct anything + explicit AtomAnything(const char *h,int argc = 0,const t_atom *argv = NULL) + : AtomList(argc,argv),hdr(MakeSymbol(h)) + {} + + //! Construct anything + AtomAnything(const AtomAnything &a) + : AtomList(a),hdr(a.hdr) + {} + + //! Clear anything + AtomAnything &Clear() { return operator()(); } + + //! Get header symbol of anything + const t_symbol *Header() const { return hdr; } + + //! Set header symbol of anything + void Header(const t_symbol *h) { hdr = h; } + + //! Set anything + AtomAnything &operator()(const t_symbol *h = NULL,int argc = 0,const t_atom *argv = NULL) + { + hdr = h; AtomList::operator()(argc,argv); + return *this; + } + + //! Set list by another AtomAnything + AtomAnything &operator =(const AtomAnything &a) { return operator()(a.Header(),a.Count(),a.Atoms()); } + + protected: + const t_symbol *hdr; + }; + + + // double type - based on two floats + +#ifdef _MSC_VER +#pragma optimize("p",off) // improve floating point precision consistency +#endif + static t_atom *SetDouble(t_atom *dbl,double d) + { + float f = static_cast<float>(d); + float r = static_cast<float>(d-f); + SetFloat(dbl[0],f); + SetFloat(dbl[1],r); + return dbl; + } +#ifdef _MSC_VER +#pragma optimize("p",on) +#endif + + static double GetDouble(int argc,const t_atom *argv) + { + double d = argc >= 1?GetAFloat(argv[0]):0; + return argc >= 2?d+GetAFloat(argv[1]):d; + } + + static AtomList &SetDouble(AtomList &l,double d) { SetDouble(l(2).Atoms(),d); return l; } + + static double GetDouble(const AtomList &l) { return GetDouble(l.Count(),l.Atoms()); } + + //! @} FLEXT_S_ATOM + + +// --- messages ------------------------------------------------------- + + /*! \defgroup FLEXT_S_MSGBUNDLE Flext message handling + @{ + */ + + class MsgBundle; + + //! Make new message bundle + static MsgBundle *MsgNew(); + + //! Destroy message bundle + static void MsgFree(MsgBundle *mb); + + //! Send (and destroy) message bundle + static void ToSysMsg(MsgBundle *mb); + + //! Send (and destroy) message bundle + static void ToOutMsg(MsgBundle *mb); + + //! Send low priority (and destroy) message bundle + static void ToQueueMsg(MsgBundle *mb); + + //! @} FLEXT_S_MSGBUNDLE + + + /*! \defgroup FLEXT_S_MSG Flext message handling + @{ + */ + + static bool Forward(const t_symbol *sym,const t_symbol *s,int argc,const t_atom *argv); + static bool Forward(const t_symbol *sym,const AtomAnything &args) { return Forward(sym,args.Header(),args.Count(),args.Atoms()); } + static bool Forward(const char *sym,const AtomAnything &args) { return Forward(MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); } + static bool Forward(const t_symbol *sym,int argc,const t_atom *argv) { return Forward(sym,sym_list,argc,argv); } + static bool Forward(const t_symbol *sym,const AtomList &args) { return Forward(sym,args.Count(),args.Atoms()); } + static bool Forward(const char *sym,const AtomList &args) { return Forward(MakeSymbol(sym),args.Count(),args.Atoms()); } + + static bool SysForward(const t_symbol *sym,const t_symbol *s,int argc,const t_atom *argv); + static bool SysForward(const t_symbol *sym,const AtomAnything &args) { return SysForward(sym,args.Header(),args.Count(),args.Atoms()); } + static bool SysForward(const char *sym,const AtomAnything &args) { return SysForward(MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); } + static bool SysForward(const t_symbol *sym,int argc,const t_atom *argv) { return SysForward(sym,sym_list,argc,argv); } + static bool SysForward(const t_symbol *sym,const AtomList &args) { return SysForward(sym,args.Count(),args.Atoms()); } + static bool SysForward(const char *sym,const AtomList &args) { return SysForward(MakeSymbol(sym),args.Count(),args.Atoms()); } + + static bool QueueForward(const t_symbol *sym,const t_symbol *s,int argc,const t_atom *argv); + static bool QueueForward(const t_symbol *sym,const AtomAnything &args) { return QueueForward(sym,args.Header(),args.Count(),args.Atoms()); } + static bool QueueForward(const char *sym,const AtomAnything &args) { return QueueForward(MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); } + static bool QueueForward(const t_symbol *sym,int argc,const t_atom *argv) { return QueueForward(sym,sym_list,argc,argv); } + static bool QueueForward(const t_symbol *sym,const AtomList &args) { return QueueForward(sym,args.Count(),args.Atoms()); } + static bool QueueForward(const char *sym,const AtomList &args) { return QueueForward(MakeSymbol(sym),args.Count(),args.Atoms()); } + + static bool MsgForward(MsgBundle *mb,const t_symbol *sym,const t_symbol *s,int argc,const t_atom *argv); + static bool MsgForward(MsgBundle *mb,const t_symbol *sym,const AtomAnything &args) { return MsgForward(mb,sym,args.Header(),args.Count(),args.Atoms()); } + static bool MsgForward(MsgBundle *mb,const char *sym,const AtomAnything &args) { return MsgForward(mb,MakeSymbol(sym),args.Header(),args.Count(),args.Atoms()); } + static bool MsgForward(MsgBundle *mb,const t_symbol *sym,int argc,const t_atom *argv) { return MsgForward(mb,sym,sym_list,argc,argv); } + static bool MsgForward(MsgBundle *mb,const t_symbol *sym,const AtomList &args) { return MsgForward(mb,sym,args.Count(),args.Atoms()); } + static bool MsgForward(MsgBundle *mb,const char *sym,const AtomList &args) { return MsgForward(mb,MakeSymbol(sym),args.Count(),args.Atoms()); } + + //! @} FLEXT_S_MSG + + + +// --- thread stuff ----------------------------------------------- + + /*! \defgroup FLEXT_S_LOCK Global system locking + @{ + */ + +#if FLEXT_SYS == FLEXT_SYS_PD + #if PD_MINOR_VERSION >= 38 || (PD_MINOR_VERSION >= 37 && defined(PD_DEVEL_VERSION)) + static void Lock() { sys_lock(); } + static void Unlock() { sys_unlock(); } + #else + // no system locking for old PD versions + static void Lock() {} + static void Unlock() {} + #endif +#elif FLEXT_SYS == FLEXT_SYS_MAX + // Max 4.2 upwards! + static void Lock() { critical_enter(0); } + static void Unlock() { critical_exit(0); } +#else +#error +#endif + +//! @} FLEXT_S_LOCK + + /*! \defgroup FLEXT_S_THREAD Flext thread handling + @{ + */ + + //! Check if current thread is registered to be a secondary thread +#ifdef FLEXT_THREADS + static bool IsThreadRegistered(); +#else + static bool IsThreadRegistered() { return false; } +#endif + +#ifdef FLEXT_THREADS + + //! thread type +# if FLEXT_THREADS == FLEXT_THR_MP + typedef MPTaskID thrid_t; +# elif FLEXT_THREADS == FLEXT_THR_POSIX + typedef pthread_t thrid_t; +# elif FLEXT_THREADS == FLEXT_THR_WIN32 + typedef DWORD thrid_t; +# else +# error Threading model not supported +# endif + + /*! \brief Get current thread id + */ + static thrid_t GetThreadId() { +#if FLEXT_THREADS == FLEXT_THR_POSIX + return pthread_self(); +#elif FLEXT_THREADS == FLEXT_THR_MP + return MPCurrentTaskID(); +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + return GetCurrentThreadId(); +#else +#error +#endif + } + + /*! \brief Get system thread id + */ + static thrid_t GetSysThreadId() { return thrid; } + + //! Check if current thread should terminate + static bool ShouldExit(); + + //! Check if current thread is the realtime system's thread + static bool IsThread(thrid_t t,thrid_t ref = GetThreadId()) { +#if FLEXT_THREADS == FLEXT_THR_POSIX + return pthread_equal(ref,t) != 0; +#else + return ref == t; +#endif + } + + + /*! \brief Thread parameters + \internal + */ + class FLEXT_SHARE thr_params: + public flext_root + { + public: + thr_params(int n = 1): cl(NULL),var(new _data[n]) {} + ~thr_params() { delete[] var; } + + void set_any(const t_symbol *s,int argc,const t_atom *argv) { var[0]._any = new AtomAnything(s,argc,argv); } + void set_list(int argc,const t_atom *argv) { var[0]._list = new AtomList(argc,argv); } + + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *cl; + union _data { + bool _bool; + float _float; + int _int; + t_symptr _t_symptr; + AtomAnything *_any; + AtomList *_list; + void *_ext; + } *var; + }; + +protected: + + static thrid_t thrhelpid; + static thrid_t thrmsgid; + static void ThrHelper(void *); + + //! the system's thread id + static thrid_t thrid; // the system thread + +private: + static bool StartHelper(); // used in flext::Setup() + +public: + + /*! \brief Yield to other threads + \remark A call to this is only needed for systems with cooperative multitasking like MacOS<=9 + */ + static void ThrYield() { +#if FLEXT_THREADS == FLEXT_THR_POSIX + // for a preemptive system this should do nothing + sched_yield(); +#elif FLEXT_THREADS == FLEXT_THR_MP + MPYield(); +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + SwitchToThread(); +#else +#error +#endif + } + + /*! \brief Query whether task is preemptive + */ + static bool IsThreadPreemptive(thrid_t t = GetThreadId()) { +#if FLEXT_THREADS == FLEXT_THR_POSIX || FLEXT_THREADS == FLEXT_THR_WIN32 + return true; +#elif FLEXT_THREADS == FLEXT_THR_MP + return MPTaskIsPreemptive(t); +#else +#error +#endif + } + + + /*! \brief Increase/Decrease priority of a thread + */ + static bool RelPriority(int dp,thrid_t ref = GetSysThreadId(),thrid_t thr = GetThreadId()); + + /*! \brief Get priority of a thread + */ + static int GetPriority(thrid_t thr = GetThreadId()); + + /*! \brief Set priority of a thread + */ + static bool SetPriority(int p,thrid_t thr = GetThreadId()); + + /*! \brief Thread mutex + \sa pthreads documentation + */ + class FLEXT_SHARE ThrMutex: + public flext_root +#if FLEXT_THREADS == FLEXT_THR_POSIX + { + public: + //! Construct thread mutex + ThrMutex() { pthread_mutex_init(&mutex,NULL); } + //! Destroy thread mutex + ~ThrMutex() { pthread_mutex_destroy(&mutex); } + + //! Lock thread mutex + bool Lock() { return pthread_mutex_lock(&mutex) == 0; } + /*! Wait to lock thread mutex. + \todo Implement! + */ +// bool WaitForLock(double tm) { return pthread_mutex_lock(&mutex) == 0; } + //! Try to lock, but don't wait + bool TryLock() { return pthread_mutex_trylock(&mutex) == 0; } + //! Unlock thread mutex + bool Unlock() { return pthread_mutex_unlock(&mutex) == 0; } + + protected: + pthread_mutex_t mutex; +// int cnt; + }; +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + { + public: + //! Construct thread mutex + ThrMutex() { ::InitializeCriticalSection(&mutex); } + //! Destroy thread mutex + ~ThrMutex() { ::DeleteCriticalSection(&mutex); } + + //! Lock thread mutex + bool Lock() { ::EnterCriticalSection(&mutex); return true; } + /*! Wait to lock thread mutex. + \todo Implement! + */ +// bool WaitForLock(double tm) { return pthread_mutex_lock(&mutex) == 0; } + //! Try to lock, but don't wait + bool TryLock() { return ::TryEnterCriticalSection(&mutex) != 0; } + //! Unlock thread mutex + bool Unlock() { ::LeaveCriticalSection(&mutex); return true; } + + protected: + CRITICAL_SECTION mutex; + }; +#elif FLEXT_THREADS == FLEXT_THR_MP + { + public: + //! Construct thread mutex + ThrMutex() { MPCreateCriticalRegion(&crit); } + //! Destroy thread mutex + ~ThrMutex() { MPDeleteCriticalRegion(crit); } + + //! Lock thread mutex + bool Lock() { return MPEnterCriticalRegion(crit,kDurationForever) == noErr; } + //! Wait to lock thread mutex +// bool WaitForLock(double tm) { return MPEnterCriticalRegion(crit,tm*kDurationMicrosecond*1.e6) == noErr; } + //! Try to lock, but don't wait + bool TryLock() { return MPEnterCriticalRegion(crit,kDurationImmediate) == noErr; } + //! Unlock thread mutex + bool Unlock() { return MPExitCriticalRegion(crit) == noErr; } + + protected: + MPCriticalRegionID crit; + }; +#else +#error "Not implemented" +#endif + + /*! \brief Thread conditional + \sa pthreads documentation + */ + class FLEXT_SHARE ThrCond +#if FLEXT_THREADS == FLEXT_THR_POSIX + :public ThrMutex + { + public: + //! Construct thread conditional + ThrCond() { pthread_cond_init(&cond,NULL); } + //! Destroy thread conditional + ~ThrCond() { pthread_cond_destroy(&cond); } + + //! Wait for condition + bool Wait(); + + /*! Wait for condition (for a certain time). + \param ftime Wait time in seconds + \ret true = signalled, false = timed out + \remark If ftime = 0 this may suck away your cpu if used in a signalled loop. + \remark The time resolution of the implementation is required to be at least ms. + */ + bool TimedWait(double ftime); + + //! Signal condition + bool Signal() { return pthread_cond_signal(&cond) == 0; } + + protected: + pthread_cond_t cond; + }; +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + { + public: + //! Construct thread conditional + ThrCond() { cond = CreateEvent(NULL,FALSE,FALSE,NULL); } + //! Destroy thread conditional + ~ThrCond() { CloseHandle(cond); } + + //! Wait for condition + bool Wait() { return WaitForSingleObject(cond,INFINITE) == WAIT_OBJECT_0; } + + /*! Wait for condition (for a certain time). + \param ftime Wait time in seconds + \ret true = signalled, false = timed out + \remark If ftime = 0 this may suck away your cpu if used in a signalled loop. + \remark The time resolution of the implementation is required to be at least ms. + */ + bool TimedWait(double ftime) { return WaitForSingleObject(cond,(LONG)(ftime*1000)) == WAIT_OBJECT_0; } + + //! Signal condition + bool Signal() { return SetEvent(cond) != 0; } + + protected: + HANDLE cond; + }; +#elif FLEXT_THREADS == FLEXT_THR_MP + { + public: + //! Construct thread conditional + ThrCond() { MPCreateEvent(&ev); } + //! Destroy thread conditional + ~ThrCond() { MPDeleteEvent(ev); } + + //! Wait for condition + bool Wait() { return MPWaitForEvent(ev,NULL,kDurationForever) == noErr; } + + /*! \brief Wait for condition (for a certain time). + \param time Wait time in seconds + */ + bool TimedWait(double tm) { return MPWaitForEvent(ev,NULL,tm*kDurationMicrosecond*1.e6) == noErr; } + + //! Signal condition + bool Signal() { return MPSetEvent(ev,1) == noErr; } // one bit needs to be set at least + + protected: + MPEventID ev; + }; +#else +#error "Not implemented" +#endif + + protected: + /*! \brief Add current thread to list of active threads. + \note Calls RegisterThread automatically + \return true on success + \internal + */ + static bool PushThread(); + + /*! \brief Remove current thread from list of active threads. + \note Calls UnregisterThread automatically + \internal + */ + static void PopThread(); + + public: + /*! \brief Launch a thread. + \param meth Thread function + \param params Parameters to pass to the thread, may be NULL if not needed. + \return Thread id on success, NULL on failure + */ + static bool LaunchThread(void (*meth)(thr_params *p),thr_params *params = NULL); + + /*! \brief Terminate a thread. + \param meth Thread function + \param params Parameters to pass to the thread, may be NULL if not needed. + \return True if at least one matching thread has been found. + \remark Terminates all running threads with matching meth and params. + \note Function doesn NOT wait for termination + */ + static bool StopThread(void (*meth)(thr_params *p),thr_params *params = NULL,bool wait = false); + + + //! \brief Register current thread to be allowed to execute flext functions. + static void RegisterThread(thrid_t id = GetThreadId()); + + //! \brief Unregister current thread + static void UnregisterThread(thrid_t id = GetThreadId()); + +#endif // FLEXT_THREADS + +//! @} FLEXT_S_THREAD + + + public: +// --- timer stuff ----------------------------------------------- + +/*! \defgroup FLEXT_S_TIMER Flext timer handling + @{ + + \remark The clock of the real-time system is used for most of these functions. + \remark Since this clock can be synchronized to an external clock (or e.g. the audio card) + \remark it may differ from the clock of the operating system +*/ + + /*! \brief Get time since real-time system startup. + \note This is not the time of the operating system but of the real-time system. + \note It may depend on the time source the system is synchronized to (e.g. audio sample rate). + */ + static double GetTime() + { + #if FLEXT_SYS == FLEXT_SYS_PD + return clock_gettimesince(0)*0.001; + #elif FLEXT_SYS == FLEXT_SYS_MAX + double tm; + clock_getftime(&tm); + return tm*0.001; + #else + #error Not implemented + #endif + } + + /*! \brief Get time granularity of the GetTime function. + \note This can be zero if not determined. + */ + static double GetTimeGrain() + { + #if FLEXT_SYS == FLEXT_SYS_PD + return 0; + #elif FLEXT_SYS == FLEXT_SYS_MAX + return 0.001; + #else + #error Not implemented + #endif + } + + /*! \brief Get operating system time since flext startup. + */ + static double GetOSTime(); + + /*! \brief Sleep for an amount of time. + \remark The OS clock is used for that. + \note Clearly in a real-time system this should only be used in a detached thread. + */ + static void Sleep(double s); + + /*! \brief Class encapsulating a timer with callback functionality. + This class can either be used with FLEXT_ADDTIMER or used as a base class with an overloaded virtual Work function. + */ + class FLEXT_SHARE Timer: + public flext_root + { + public: + Timer(bool queued = false); + virtual ~Timer(); + + //! Set timer callback function. + void SetCallback(void (*cb)(void *data)) { clss = NULL,cback = cb; } + //! Set timer callback function (with class pointer). + void SetCallback(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) &th,bool (*cb)(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *th,void *data)) { clss = &th,cback = (void (*)(void *))cb; } + + //! Clear timer. + bool Reset(); + //! Trigger a one shot at an absolute time. + bool At(double time,void *data = NULL,bool dopast = true); + //! Trigger a one shot interval. + bool Delay(double time,void *data = NULL); + //! Trigger a periodic interval. + bool Periodic(double time,void *data = NULL); + //! Trigger immediately. + bool Now(void *data = NULL) { return Delay(0,data); } + + //! Worker function, called on every timer event. + virtual void Work(); + + protected: + static void callback(Timer *tmr); + +#if FLEXT_SYS == FLEXT_SYS_PD + t_clock *clk; +#elif FLEXT_SYS == FLEXT_SYS_MAX + static void queuefun(Timer *tmr); + t_clock *clk; + t_qelem *qelem; +#else +#error Not implemented +#endif + + const bool queued; + void (*cback)(void *data); + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *clss; + void *userdata; + double period; + }; + +//! @} FLEXT_S_TIMER + + //! Check if we are in DSP time + static bool InDSP() { return indsp; } + +// --- SIMD functionality ----------------------------------------------- + +/*! \defgroup FLEXT_S_SIMD Cross platform SIMD support for modern CPUs + @{ +*/ + enum simd_type { + simd_none = 0, + simd_mmx = 0x01, + simd_3dnow = 0x02, + simd_sse = 0x04, + simd_sse2 = 0x08, + simd_altivec = 0x10 + }; + + /*! Check for SIMD capabilities of the CPU */ + static unsigned long GetSIMDCapabilities(); + + + static void MulSamples(t_sample *dst,const t_sample *src,t_sample mul,int cnt); + static void MulSamples(t_sample *dst,const t_sample *src,const t_sample *mul,int cnt); + static void AddSamples(t_sample *dst,const t_sample *src,t_sample add,int cnt); + static void AddSamples(t_sample *dst,const t_sample *src,const t_sample *add,int cnt); + static void ScaleSamples(t_sample *dst,const t_sample *src,t_sample mul,t_sample add,int cnt); + static void ScaleSamples(t_sample *dst,const t_sample *src,t_sample mul,const t_sample *add,int cnt); + static void ScaleSamples(t_sample *dst,const t_sample *src,const t_sample *mul,const t_sample *add,int cnt); + +//! @} FLEXT_S_SIMD + + +//! @} FLEXT_SUPPORT + +protected: +#ifdef __MRC__ + friend class flext_obj; +#endif + + static void Setup(); + + static bool chktilde(const char *objname); + + static unsigned long simdcaps; + + static const t_symbol *sym_attributes; + static const t_symbol *sym_methods; + +#if FLEXT_SYS == FLEXT_SYS_MAX + static const t_symbol *sym_buffer; + static const t_symbol *sym_size; + static const t_symbol *sym_dirty; +#endif + + //! flag if we are within DSP + static bool indsp; +}; + + +// gcc doesn't like these to be included into the flext class (even if static) +inline bool operator ==(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) == 0; } +inline bool operator !=(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) != 0; } +inline bool operator <(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) < 0; } +inline bool operator <=(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) <= 0; } +inline bool operator >(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) > 0; } +inline bool operator >=(const t_atom &a,const t_atom &b) { return flext::CmpAtom(a,b) >= 0; } + +//! @} // FLEXT_SUPPORT + +#include "flpopns.h" + +#endif diff --git a/externals/grill/trunk/flext/source/flthr.cpp b/externals/grill/trunk/flext/source/flthr.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ca3ed87ce920eb41ad78e7e8c21b432597cb153 --- /dev/null +++ b/externals/grill/trunk/flext/source/flthr.cpp @@ -0,0 +1,741 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flthr.cpp + \brief Implementation of the flext thread functionality. +*/ + +#ifndef __FLEXT_THR_CPP +#define __FLEXT_THR_CPP + +#include "flext.h" + +#ifdef FLEXT_THREADS + +// maximum wait time for threads to finish (in ms) +#define MAXIMUMWAIT 100 + + +#include "flinternal.h" +#include "flcontainers.h" +#include <set> +#include <ctime> + +#if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH || FLEXT_OSAPI == FLEXT_OSAPI_UNIX_POSIX || FLEXT_OSAPI == FLEXT_OSAPI_WIN_POSIX +#include <sys/time.h> +#include <unistd.h> +#elif FLEXT_OS == FLEXT_OS_WIN +#include <sys/timeb.h> +#endif + +#if FLEXT_THREADS == FLEXT_THR_WIN32 && WINVER < 0x0500 +#error WIN32 threads need Windows SDK version >= 0x500 +#endif + +#include <cerrno> + +#include "flpushns.h" + +//! Thread id of system thread - will be initialized in flext::Setup +FLEXT_TEMPIMPL(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext))::thrid_t FLEXT_CLASSDEF(flext))::thrid; + +//! Thread id of helper thread - will be initialized in flext::Setup +FLEXT_TEMPIMPL(FLEXT_TEMPINST(FLEXT_CLASSDEF(flext))::thrid_t FLEXT_CLASSDEF(flext))::thrhelpid; + + +//! \brief This represents an entry to the list of active method threads +class thr_entry + : public flext + , public LifoCell +{ +public: + void Set(void (*m)(thr_params *),thr_params *p,thrid_t id = GetThreadId()) + { + th = p?p->cl:NULL; + meth = m,params = p,thrid = id; + shouldexit = false; +#if FLEXT_THREADS == FLEXT_THR_MP + weight = 100; // MP default weight +#endif + } + + //! \brief Check if this class represents the current thread + bool Is(thrid_t id = GetThreadId()) const { return IsThread(thrid,id); } + + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *This() const { return th; } + thrid_t Id() const { return thrid; } + + FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) *th; + void (*meth)(thr_params *); + thr_params *params; + thrid_t thrid; + bool shouldexit; +#if FLEXT_THREADS == FLEXT_THR_MP + int weight; +#endif +}; + +template<class T> +class ThrFinder: + public T +{ +public: + ~ThrFinder() { thr_entry *e; while((e = Pop()) != NULL) delete e; } + + void Push(thr_entry *e) { T::Push(e); } + thr_entry *Pop() { return T::Pop(); } + + thr_entry *Find(flext::thrid_t id,bool pop = false) + { + TypedLifo<thr_entry> qutmp; + thr_entry *fnd; + while((fnd = Pop()) && !fnd->Is(id)) qutmp.Push(fnd); + // put back entries + for(thr_entry *ti; (ti = qutmp.Pop()) != NULL; ) Push(ti); + if(fnd && !pop) Push(fnd); + return fnd; + } +}; + +FLEXT_TEMPLATE +struct ThrRegistry +{ + typedef ThrFinder< PooledLifo<thr_entry,1,10> > RegPooledLifo; + typedef ThrFinder< TypedLifo<thr_entry> > RegFinder; + static RegPooledLifo pending; + static RegFinder active,stopped; +}; + +FLEXT_TEMPIMPL(FLEXT_TEMPINST(ThrRegistry)::RegPooledLifo ThrRegistry)::pending; +FLEXT_TEMPIMPL(FLEXT_TEMPINST(ThrRegistry)::RegFinder ThrRegistry)::active; +FLEXT_TEMPIMPL(FLEXT_TEMPINST(ThrRegistry)::RegFinder ThrRegistry)::stopped; + + +class ThrId + : public flext +{ +public: + ThrId(const thrid_t &_id): id(_id) {} + thrid_t id; + + bool operator <(const ThrId &tid) const + { + if(sizeof(id) == sizeof(unsigned)) + return (unsigned *)&id < (unsigned *)&tid; + else + return memcmp(&id,&tid,sizeof(id)) < 0; + } +}; + +FLEXT_TEMPLATE +struct ThrVars { + // this should _definitely_ be a hashmap.... + // \TODO above all it should be populated immediately, otherwise it could easily happen + // that the passing on to the set happens too late! We need that lockfree set! + static std::set<ThrId> regthreads; + + //! Registry lock + static flext::ThrMutex *thrregmtx; + + //! Helper thread conditional + static flext::ThrCond *thrhelpcond; + + static bool initialized; +}; + +FLEXT_TEMPIMPL(std::set<ThrId> ThrVars)::regthreads; +FLEXT_TEMPIMPL(flext::ThrMutex *ThrVars)::thrregmtx = NULL; +FLEXT_TEMPIMPL(flext::ThrCond *ThrVars)::thrhelpcond = NULL; +FLEXT_TEMPIMPL(bool ThrVars)::initialized = false; + +FLEXT_TEMPLATE void LaunchHelper(thr_entry *e) +{ + e->thrid = flext::GetThreadId(); + flext::RegisterThread(e->thrid); + e->meth(e->params); + flext::UnregisterThread(e->thrid); +} + +//! Start helper thread +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::StartHelper() +{ + bool ok = false; + FLEXT_TEMPINST(ThrVars)::initialized = false; + + FLEXT_TEMPINST(ThrVars)::thrregmtx = new ThrMutex; + +#if FLEXT_THREADS == FLEXT_THR_POSIX + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + pthread_t tmp; + ok = pthread_create (&tmp,&attr,(void *(*)(void *))ThrHelper,NULL) == 0; +#elif FLEXT_THREADS == FLEXT_THR_MP + if(!MPLibraryIsLoaded()) + error("Thread library is not loaded"); + else { + MPTaskID tmp; + OSStatus ret = MPCreateTask((TaskProc)ThrHelper,NULL,0,0,0,0,0,&tmp); + ok = ret == noErr; + } +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + ok = _beginthread(ThrHelper,0,NULL) >= 0; +#else +#error +#endif + if(!ok) + error("flext - Could not launch helper thread!"); + else { + // now we have to wait for thread helper to initialize + while(!FLEXT_TEMPINST(ThrVars)::initialized) Sleep(0.001); + + // we are ready for threading now! + } + +#if FLEXT_THREADS == FLEXT_THR_POSIX + pthread_attr_destroy(&attr); +#endif + return ok; +} + +//! Static helper thread function +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ThrHelper(void *) +{ + thrhelpid = GetThreadId(); + +#if FLEXT_THREADS == FLEXT_THR_POSIX + // set prototype thread attributes + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); +#endif + + // set thread priority one point below normal + // so thread construction won't disturb real-time audio + RelPriority(-1); + + FLEXT_TEMPINST(ThrVars)::thrhelpcond = new ThrCond; + + FLEXT_TEMPINST(ThrVars)::initialized = true; + + // helper loop + for(;;) { + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Wait(); + + // start all inactive threads + thr_entry *ti; + while((ti = FLEXT_TEMPINST(ThrRegistry)::pending.Pop()) != NULL) { + bool ok; + + #if FLEXT_THREADS == FLEXT_THR_POSIX + thrid_t dummy; + ok = pthread_create (&dummy,&attr,(void *(*)(void *))FLEXT_TEMPINST(LaunchHelper),ti) == 0; + #elif FLEXT_THREADS == FLEXT_THR_MP + thrid_t dummy; + ok = MPCreateTask((TaskProc)FLEXT_TEMPINST(LaunchHelper),ti,0,0,0,0,0,&dummy) == noErr; + #elif FLEXT_THREADS == FLEXT_THR_WIN32 + ok = _beginthread((void (*)(void *))FLEXT_TEMPINST(LaunchHelper),0,ti) >= 0; + #else + #error + #endif + if(!ok) { + error("flext - Could not launch thread!"); + FLEXT_TEMPINST(ThrRegistry)::pending.Free(ti); ti = NULL; + } + else + // insert into queue of active threads + FLEXT_TEMPINST(ThrRegistry)::active.Push(ti); + } + } + + FLEXT_ASSERT(false); +/* + // Never reached! + + delete thrhelpcond; + thrhelpcond = NULL; + +#if FLEXT_THREADS == FLEXT_THR_POSIX + pthread_attr_destroy(&attr); +#endif +*/ +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::LaunchThread(void (*meth)(thr_params *p),thr_params *p) +{ + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrhelpcond); + + // make an entry into thread list + thr_entry *e = FLEXT_TEMPINST(ThrRegistry)::pending.New(); + e->Set(meth,p); + FLEXT_TEMPINST(ThrRegistry)::pending.Push(e); + // signal thread helper + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + + return true; +} + +FLEXT_TEMPLATE bool waitforstopped(TypedLifo<thr_entry> &qufnd,float wait = 0) +{ + TypedLifo<thr_entry> qutmp; + + double until; + if(wait) until = flext::GetOSTime()+wait; + + for(;;) { + thr_entry *fnd = qufnd.Pop(); + if(!fnd) break; // no more entries -> done! + + thr_entry *ti; + // search for entry + while((ti = FLEXT_TEMPINST(ThrRegistry)::stopped.Pop()) != NULL && ti != fnd) qutmp.Push(ti); + // put back entries + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::stopped.Push(ti); + + if(ti) { + // still in ThrRegistry::stopped queue + qufnd.Push(fnd); + // yield to other threads + flext::ThrYield(); + + if(wait && flext::GetOSTime() > until) + // not successful -> remaining thread are still in qufnd queue + return false; + } + } + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::StopThread(void (*meth)(thr_params *p),thr_params *p,bool wait) +{ + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrhelpcond); + + TypedLifo<thr_entry> qutmp; + thr_entry *ti; + + // first search pending queue + // -------------------------- + + { + bool found = false; + while((ti = FLEXT_TEMPINST(ThrRegistry)::pending.Pop()) != NULL) + if(ti->meth == meth && ti->params == p) { + // found -> thread hasn't started -> just delete + FLEXT_TEMPINST(ThrRegistry)::pending.Free(ti); + found = true; + } + else + qutmp.Push(ti); + + // put back into pending queue (order doesn't matter) + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::pending.Push(ti); + + if(found) return true; + } + + // now search active queue + // ----------------------- + + TypedLifo<thr_entry> qufnd; + + while((ti = FLEXT_TEMPINST(ThrRegistry)::active.Pop()) != NULL) + if(ti->meth == meth && ti->params == p) { + FLEXT_TEMPINST(ThrRegistry)::stopped.Push(ti); + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + qufnd.Push(ti); + } + else + qutmp.Push(ti); + + // put back into pending queue (order doesn't matter) + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::active.Push(ti); + + // wakeup helper thread + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + + // now wait for entries in qufnd to have vanished from ThrRegistry::stopped + if(wait) + return FLEXT_TEMPINST(waitforstopped)(qufnd); + else + return !qufnd.Avail(); +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::ShouldExit() +{ + return FLEXT_TEMPINST(ThrRegistry)::stopped.Find(GetThreadId()) != NULL; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::PushThread() +{ + // set priority of newly created thread one point below the system thread's + RelPriority(-1); + RegisterThread(); + return true; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::PopThread() +{ + thrid_t id = GetThreadId(); + UnregisterThread(id); + thr_entry *fnd = FLEXT_TEMPINST(ThrRegistry)::stopped.Find(id,true); + if(!fnd) fnd = FLEXT_TEMPINST(ThrRegistry)::active.Find(id,true); + + if(fnd) + FLEXT_TEMPINST(ThrRegistry)::pending.Free(fnd); +#ifdef FLEXT_DEBUG + else + post("flext - INTERNAL ERROR: Thread not found!"); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::RegisterThread(thrid_t id) +{ +#if 1 + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrregmtx); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Lock(); + FLEXT_TEMPINST(ThrVars)::regthreads.insert(id); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Unlock(); +#else + regqueue.Push(new ThrIdCell(id)); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::UnregisterThread(thrid_t id) +{ +#if 1 + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrregmtx); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Lock(); + FLEXT_TEMPINST(ThrVars)::regthreads.erase(id); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Unlock(); +#else + unregqueue.Push(new ThrIdCell(id)); +#endif +} + +#if 0 +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ThreadRegistryWorker() +{ + ThrIdCell *pid; + while((pid = regqueue.Pop()) != NULL) { regthreads.insert(pid->id); delete pid; } + while((pid = unregqueue.Pop()) != NULL) { regthreads.erase(pid->id); delete pid; } +} +#endif + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::IsThreadRegistered() +{ + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrregmtx); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Lock(); + bool fnd = FLEXT_TEMPINST(ThrVars)::regthreads.find(GetThreadId()) != FLEXT_TEMPINST(ThrVars)::regthreads.end(); + FLEXT_TEMPINST(ThrVars)::thrregmtx->Unlock(); + return fnd; +} + +//! Terminate all object threads +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext_base))::StopThreads() +{ + FLEXT_ASSERT(FLEXT_TEMPINST(ThrVars)::thrhelpcond); + + TypedLifo<thr_entry> qutmp; + thr_entry *ti; + + // first search pending queue + // -------------------------- + + while((ti = FLEXT_TEMPINST(ThrRegistry)::pending.Pop()) != NULL) + if(ti->This() == this) + // found -> thread hasn't started -> just delete + FLEXT_TEMPINST(ThrRegistry)::pending.Free(ti); + else + qutmp.Push(ti); + + // put back into pending queue (order doesn't matter) + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::pending.Push(ti); + + // now search active queue + // ----------------------- + + TypedLifo<thr_entry> qufnd; + + while((ti = FLEXT_TEMPINST(ThrRegistry)::active.Pop()) != NULL) + if(ti->This() == this) { + FLEXT_TEMPINST(ThrRegistry)::stopped.Push(ti); + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + qufnd.Push(ti); + } + else + qutmp.Push(ti); + + // put back into pending queue (order doesn't matter) + while((ti = qutmp.Pop()) != NULL) FLEXT_TEMPINST(ThrRegistry)::active.Push(ti); + + // wakeup helper thread + FLEXT_TEMPINST(ThrVars)::thrhelpcond->Signal(); + + // now wait for entries in qufnd to have vanished from ThrRegistry::stopped + if(!FLEXT_TEMPINST(waitforstopped)(qufnd,MAXIMUMWAIT*0.001f)) { +#ifdef FLEXT_DEBUG + post("flext - doing hard thread termination"); +#endif + + // timeout -> hard termination + while((ti = qufnd.Pop()) != NULL) { +#if FLEXT_THREADS == FLEXT_THR_POSIX + if(pthread_cancel(ti->thrid)) + post("%s - Thread could not be terminated!",thisName()); +#elif FLEXT_THREADS == FLEXT_THR_MP + MPTerminateTask(ti->thrid,0); + // here, we should use a task queue to check whether the task has really terminated!! +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + // can't use the c library function _endthread.. memory leaks will occur + HANDLE hnd = OpenThread(THREAD_ALL_ACCESS,TRUE,ti->thrid); + TerminateThread(hnd,0); +#else +# error Not implemented +#endif + FLEXT_TEMPINST(ThrRegistry)::pending.Free(ti); + } + return false; + } + else + return true; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::RelPriority(int dp,thrid_t ref,thrid_t id) +{ +#if FLEXT_THREADS == FLEXT_THR_POSIX + sched_param parm; + int policy; + if(pthread_getschedparam(ref,&policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to get thread priority"); +# endif + return false; + } + else { + parm.sched_priority += dp; + + // MSVC++ 6 produces wrong code with the following lines!!! +// int schmin = sched_get_priority_min(policy); +// int schmax = sched_get_priority_max(policy); + + if(parm.sched_priority < sched_get_priority_min(policy)) { +# ifdef FLEXT_DEBUG + post("flext - minimum thread priority reached"); +# endif + parm.sched_priority = sched_get_priority_min(policy); + } + else if(parm.sched_priority > sched_get_priority_max(policy)) { +# ifdef FLEXT_DEBUG + post("flext - maximum thread priority reached"); +# endif + parm.sched_priority = sched_get_priority_max(policy); + } + + if(pthread_setschedparam(id,policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to change thread priority"); +# endif + return false; + } + } + return true; + +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + HANDLE href = OpenThread(THREAD_ALL_ACCESS,TRUE,ref); + HANDLE hid = OpenThread(THREAD_ALL_ACCESS,TRUE,id); + int pr = GetThreadPriority(href); + + if(pr == THREAD_PRIORITY_ERROR_RETURN) { +# ifdef FLEXT_DEBUG + post("flext - failed to get thread priority"); +# endif + return false; + } + + pr += dp; + if(pr < THREAD_PRIORITY_IDLE) { +# ifdef FLEXT_DEBUG + post("flext - minimum thread priority reached"); +# endif + pr = THREAD_PRIORITY_IDLE; + } + else if(pr > THREAD_PRIORITY_TIME_CRITICAL) { +# ifdef FLEXT_DEBUG + post("flext - maximum thread priority reached"); +# endif + pr = THREAD_PRIORITY_TIME_CRITICAL; + } + + if(SetThreadPriority(hid,pr) == 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to change thread priority"); +# endif + return false; + } + return true; + +#elif FLEXT_THREADS == FLEXT_THR_MP + thr_entry *ti = FLEXT_TEMPINST(ThrRegistry)::pending.Find(id); + if(!ti) ti = FLEXT_TEMPINST(ThrRegistry)::active.Find(id); + if(ti) { + // thread found in list + int w = GetPriority(id); + if(dp < 0) w /= 1<<(-dp); + else w *= 1<<dp; + if(w < 1) { +# ifdef FLEXT_DEBUG + post("flext - minimum thread priority reached"); +# endif + w = 1; + } + else if(w > 10000) { +# ifdef FLEXT_DEBUG + post("flext - maximum thread priority reached"); +# endif + w = 10000; + } + ti->weight = w; + return MPSetTaskWeight(id,w) == noErr; + } + else return false; +#else +# error +#endif +} + + +FLEXT_TEMPIMPL(int FLEXT_CLASSDEF(flext))::GetPriority(thrid_t id) +{ +#if FLEXT_THREADS == FLEXT_THR_POSIX + sched_param parm; + int policy; + if(pthread_getschedparam(id,&policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to get parms"); +# endif + return -1; + } + return parm.sched_priority; + +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + HANDLE hid = OpenThread(THREAD_ALL_ACCESS,TRUE,id); + int pr = GetThreadPriority(hid); + + if(pr == THREAD_PRIORITY_ERROR_RETURN) { +# ifdef FLEXT_DEBUG + post("flext - failed to get thread priority"); +# endif + return -1; + } + return pr; + +#elif FLEXT_THREADS == FLEXT_THR_MP + thr_entry *ti = FLEXT_TEMPINST(ThrRegistry)::pending.Find(id); + if(!ti) ti = FLEXT_TEMPINST(ThrRegistry)::active.Find(id); + return ti?ti->weight:-1; +#else +# error +#endif +} + + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::SetPriority(int p,thrid_t id) +{ +#if FLEXT_THREADS == FLEXT_THR_POSIX + sched_param parm; + int policy; + if(pthread_getschedparam(id,&policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to get parms"); +# endif + return false; + } + else { + parm.sched_priority = p; + if(pthread_setschedparam(id,policy,&parm) < 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to change priority"); +# endif + return false; + } + } + return true; + +#elif FLEXT_THREADS == FLEXT_THR_WIN32 + HANDLE hid = OpenThread(THREAD_ALL_ACCESS,TRUE,id); + if(SetThreadPriority(hid,p) == 0) { +# ifdef FLEXT_DEBUG + post("flext - failed to change thread priority"); +# endif + return false; + } + return true; + +#elif FLEXT_THREADS == FLEXT_THR_MP + thr_entry *ti = FLEXT_TEMPINST(ThrRegistry)::pending.Find(id); + if(!ti) ti = FLEXT_TEMPINST(ThrRegistry)::active.Find(id); + return ti && MPSetTaskWeight(id,ti->weight = p) == noErr; +#else +# error +#endif +} + + +#if FLEXT_THREADS == FLEXT_THR_POSIX +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::ThrCond::Wait() { + this->Lock(); // use this-> to avoid wrong function invocation (global Unlock) + bool ret = pthread_cond_wait(&cond,&this->mutex) == 0; + this->Unlock(); // use this-> to avoid wrong function invocation (global Unlock) + return ret; +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::ThrCond::TimedWait(double ftm) +{ + timespec tm; +#if FLEXT_OS == FLEXT_OS_WIN && FLEXT_OSAPI == FLEXT_OSAPI_WIN_NATIVE +# ifdef _MSC_VER + _timeb tmb; + _ftime(&tmb); +# else + timeb tmb; + ftime(&tmb); +# endif + tm.tv_nsec = tmb.millitm*1000000; + tm.tv_sec = (long)tmb.time; +#else // POSIX +# if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) + clock_gettime(CLOCK_REALTIME,&tm); +# else + struct timeval tp; + gettimeofday(&tp, NULL); + tm.tv_nsec = tp.tv_usec*1000; + tm.tv_sec = tp.tv_sec; +# endif +#endif + + tm.tv_nsec += (long)((ftm-(long)ftm)*1.e9); + long nns = tm.tv_nsec%1000000000; + tm.tv_sec += (long)ftm+(tm.tv_nsec-nns)/1000000000; + tm.tv_nsec = nns; + + this->Lock(); // use this-> to avoid wrong function invocation (global Unlock) + bool ret = pthread_cond_timedwait(&cond,&this->mutex,&tm) == 0; + this->Unlock(); // use this-> to avoid wrong function invocation (global Unlock) + return ret; +} +#endif + +#include "flpopns.h" + +#endif // FLEXT_THREADS + +#endif // __FLEXT_THR_CPP + + diff --git a/externals/grill/trunk/flext/source/fltimer.cpp b/externals/grill/trunk/flext/source/fltimer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..32bf1a52bc45e471d1da1a44d337c8f8d1c5a087 --- /dev/null +++ b/externals/grill/trunk/flext/source/fltimer.cpp @@ -0,0 +1,291 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file fltimer.cpp + \brief flext timer functions and classes +*/ + +#ifndef __FLEXT_TIMER_CPP +#define __FLEXT_TIMER_CPP + +#include "flext.h" + +#if FLEXT_OS == FLEXT_OS_WIN +#include <windows.h> +#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH +#include <unistd.h> +#include <sys/time.h> +#elif FLEXT_OS == FLEXT_OS_MAC +#include <Timer.h> +#include <Threads.h> +#endif + +#include "flpushns.h" + +FLEXT_TEMPLATE double getstarttime(); + +FLEXT_TEMPLATE +struct TimerVars +{ +#if FLEXT_OS == FLEXT_OS_WIN + static double perffrq; +#endif + static double starttime; +}; + +#if FLEXT_OS == FLEXT_OS_WIN +FLEXT_TEMPIMPL(double TimerVars)::perffrq = 0; +#endif +FLEXT_TEMPIMPL(double TimerVars)::starttime = FLEXT_TEMPINST(getstarttime)(); + +FLEXT_TEMPLATE +double getstarttime() +{ +#if FLEXT_OS == FLEXT_OS_WIN + LARGE_INTEGER frq; + if(QueryPerformanceFrequency(&frq)) TimerVars<>::perffrq = (double)frq.QuadPart; +#endif + + FLEXT_TEMPINST(TimerVars)::starttime = 0; + return flext::GetOSTime(); +} + +FLEXT_TEMPIMPL(double FLEXT_CLASSDEF(flext))::GetOSTime() +{ + double tm; + +#if FLEXT_OS == FLEXT_OS_WIN + LARGE_INTEGER cnt; + if(perffrq && QueryPerformanceCounter(&cnt)) + tm = cnt.QuadPart/TimerVars<>::perffrq; + else { + SYSTEMTIME systm; + FILETIME fltm; + GetSystemTime(&systm); + SystemTimeToFileTime(&systm,&fltm); + tm = ((LARGE_INTEGER *)&fltm)->QuadPart*1.e-7; + } +#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH // POSIX + timeval tmv; + gettimeofday(&tmv,NULL); + tm = tmv.tv_sec+tmv.tv_usec*1.e-6; +#elif FLEXT_OS == FLEXT_OS_MAC // that's just for OS9 & Carbon! + UnsignedWide tick; + Microseconds(&tick); + tm = (tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo)*1.e-6; +#else + #error Not implemented +#endif + return tm-FLEXT_TEMPINST(TimerVars)::starttime; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Sleep(double s) +{ + if(s <= 0) return; +#if FLEXT_OS == FLEXT_OS_WIN +#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x400 +#if 0 + LARGE_INTEGER liDueTime; + liDueTime.QuadPart = (LONGLONG)(-1.e7*s); + + // Create a waitable timer. + HANDLE hTimer = CreateWaitableTimer(NULL,TRUE,NULL); + if(hTimer) { + if(SetWaitableTimer(hTimer,&liDueTime,0,NULL,NULL,0)) + // Wait for the timer. + WaitForSingleObject(hTimer,INFINITE); // != WAIT_OBJECT_0) + else + ::Sleep((long)(s*1000.)); + CloseHandle(hTimer); + } + else +#else + LARGE_INTEGER cnt; + if(perffrq && QueryPerformanceCounter(&cnt)) { + LONGLONG dst = (LONGLONG)(cnt.QuadPart+perffrq*s); + for(;;) { + SwitchToThread(); // while waiting switch to another thread + QueryPerformanceCounter(&cnt); + if(cnt.QuadPart > dst) break; + } + } + else +#endif +#endif + // last resort.... + ::Sleep((long)(s*1000.)); +#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH // POSIX + usleep((long)(s*1000000.)); +#elif FLEXT_OS == FLEXT_OS_MAC // that's just for OS9 & Carbon! + UnsignedWide tick; + Microseconds(&tick); + double target = tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo+s*1.e6; + for(;;) { + // this is just a loop running until the time has passed - stone age (but we yield at least) + Microseconds(&tick); + if(target <= tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo) break; + YieldToAnyThread(); // yielding surely reduces the timing precision (but we're civilized) + } +#else + #error Not implemented +#endif +} + +/* \param qu determines whether timed messages should be queued (low priority - only when supported by the system). +*/ +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::Timer::Timer(bool qu): + queued(qu), + clss(NULL),userdata(NULL), + period(0) +{ +#if FLEXT_SYS == FLEXT_SYS_PD + clk = (t_clock *)clock_new(this,(t_method)callback); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clk = (t_clock *)clock_new(this,(t_method)callback); + if(queued) qelem = (t_qelem *)qelem_new(this,(method)queuefun); +#else + #error Not implemented +#endif +} + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext))::Timer::~Timer() +{ +#if FLEXT_SYS == FLEXT_SYS_PD + clock_free(clk); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_free(clk); + if(queued) ::qelem_free(qelem); +#else + #error Not implemented +#endif +} + +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Timer::Reset() +{ +#if FLEXT_SYS == FLEXT_SYS_PD + clock_unset(clk); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_unset(clk); + if(queued) ::qelem_unset(qelem); +#else + #error Not implemented +#endif + return true; +} + +/*! \param tm absolute time (in seconds) + \param data user data + \param dopast if set events with times lying in the past will be triggered immediately, if not set they are ignored + \return true on success +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Timer::At(double tm,void *data,bool dopast) +{ + userdata = data; + period = 0; +#if FLEXT_SYS == FLEXT_SYS_PD + const double systm = clock_gettimesince(0); + double df = tm*1000.-systm; + if(dopast && df < 0) df = 0; + if(df >= 0) + clock_delay(clk,df); +#elif FLEXT_SYS == FLEXT_SYS_MAX + const double ms = tm*1000.; + double cur; + clock_getftime(&cur); + if(cur <= ms) + clock_fdelay(clk,ms-cur); + else if(dopast) // trigger timer is past + clock_fdelay(clk,0); +#else + #error Not implemented +#endif + return true; +} + +/*! \param tm relative time (in seconds) + \param data user data + \return true on success +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Timer::Delay(double tm,void *data) +{ + userdata = data; + period = 0; +#if FLEXT_SYS == FLEXT_SYS_PD + clock_delay(clk,tm*1000); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_fdelay(clk,tm*1000.); +#else + #error Not implemented +#endif + return true; +} + +/*! \param tm relative time between periodic events (in seconds) + \param data user data + \return true on success + \note the first event will be delayed by tm +*/ +FLEXT_TEMPIMPL(bool FLEXT_CLASSDEF(flext))::Timer::Periodic(double tm,void *data) +{ + userdata = data; + period = tm; +#if FLEXT_SYS == FLEXT_SYS_PD + clock_delay(clk,tm*1000.); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_fdelay(clk,tm*1000.); +#else + #error Not implemented +#endif + return true; +} + +//! \brief Callback function for system clock. +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Timer::callback(Timer *tmr) +{ +#if FLEXT_SYS == FLEXT_SYS_MAX + if(tmr->queued) + qelem_set(tmr->qelem); + else +#endif + tmr->Work(); + + if(tmr->period) { + // reschedule +#if FLEXT_SYS == FLEXT_SYS_PD + clock_delay(tmr->clk,tmr->period*1000.); +#elif FLEXT_SYS == FLEXT_SYS_MAX + clock_fdelay(tmr->clk,tmr->period*1000.); +#else + #error Not implemented +#endif + } +} + +#if FLEXT_SYS == FLEXT_SYS_MAX +/*! \brief Callback function for low priority clock (for queued messages). +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Timer::queuefun(Timer *tmr) { tmr->Work(); } +#endif + +/*! \brief Virtual worker function - by default it calls the user callback function. + \remark The respective callback parameter format is chosen depending on whether clss is defined or not. +*/ +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::Timer::Work() +{ + if(cback) { + if(clss) + ((bool (*)(flext_base *,void *))cback)(clss,userdata); + else + cback(userdata); + } +} + +#include "flpopns.h" + +#endif // __FLEXT_TIMER_CPP + diff --git a/externals/grill/trunk/flext/source/flutil.cpp b/externals/grill/trunk/flext/source/flutil.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f86598f9f9e3a2635e73a4914f050f74e88c0625 --- /dev/null +++ b/externals/grill/trunk/flext/source/flutil.cpp @@ -0,0 +1,61 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flutil.cpp + \brief Implementation of the various utility functions. +*/ + +#ifndef __FLEXT_UTIL_CPP +#define __FLEXT_UTIL_CPP + +#include "flext.h" +#include <cstring> + +#if FLEXT_OS == FLEXT_OS_WIN +#include <windows.h> +#elif FLEXT_OS == FLEXT_OS_MAC + #if FLEXT_OSAPI != FLEXT_OSAPI_MAC_MACH + #include <MacMemory.h> + #else + #include <Carbon/Carbon.h> + #endif +#endif + +#include "flpushns.h" + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::CopyMem(void *dst,const void *src,int bytes) +{ +#if FLEXT_OS == FLEXT_OS_WIN + MoveMemory(dst,src,bytes); +#elif FLEXT_OS == FLEXT_OS_MAC && !defined(__LP64__) + BlockMoveData(src,dst,bytes); // not available for 64 bits +#else + memmove(dst,src,bytes); +#endif +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ZeroMem(void *dst,int bytes) +{ +#if FLEXT_OS == FLEXT_OS_WIN + ZeroMemory(dst,bytes); +#elif FLEXT_OS == FLEXT_OS_MAC +# ifdef __LP64__ // 64 bits compilation + bzero(dst,bytes); +# else + BlockZero(dst,bytes); +# endif +#else + memset(dst,0,bytes); +#endif +} + +#include "flpopns.h" + +#endif // __FLEXT_UTIL_CPP + + diff --git a/externals/grill/trunk/flext/source/flxlet.cpp b/externals/grill/trunk/flext/source/flxlet.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8e28fe27ae90ece6d6b76133ca3b760541277d9 --- /dev/null +++ b/externals/grill/trunk/flext/source/flxlet.cpp @@ -0,0 +1,120 @@ +/* +flext - C++ layer for Max and Pure Data externals + +Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. +*/ + +/*! \file flxlet.cpp + \brief Implementation of the variable inlet/outlet functionality. +*/ + +#ifndef __FLEXT_XLET_CPP +#define __FLEXT_XLET_CPP + +#include "flext.h" +#include "flinternal.h" +#include <cstring> +#include <cstdarg> + +#include "flpushns.h" + +#define MAXLETS 256 + +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::xlet FLEXT_CLASSDEF(flext_base))::inlist[MAXLETS]; +FLEXT_TEMPIMPL(FLEXT_TEMPSUB(FLEXT_CLASSDEF(flext_base))::xlet FLEXT_CLASSDEF(flext_base))::outlist[MAXLETS]; + +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::xlet::xlet(): tp(xlet_none),desc(NULL) {} +FLEXT_TEMPIMPL(FLEXT_CLASSDEF(flext_base))::xlet::~xlet() { if(desc) delete[] desc; } + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::xlet::Desc(const char *c) +{ + if(desc) delete[] desc; + if(c) { + size_t l = strlen(c); + desc = new char[l+1]; + memcpy(desc,c,l+1); + } + else + desc = NULL; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddInlet(xlettype tp,int mult,const char *desc) +{ + if(UNLIKELY(incnt+mult >= MAXLETS)) + post("%s - too many inlets",thisName()); + else + for(int i = 0; i < mult; ++i) { + xlet &x = inlist[incnt++]; + x.tp = tp; + x.Desc(desc); + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddOutlet(xlettype tp,int mult,const char *desc) +{ + if(UNLIKELY(outcnt+mult >= MAXLETS)) + post("%s - too many outlets",thisName()); + else + for(int i = 0; i < mult; ++i) { + xlet &x = outlist[outcnt++]; + x.tp = tp; + x.Desc(desc); + } +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::DescInlet(int ix,const char *d) +{ + if(UNLIKELY(ix >= incnt)) + post("%s - inlet %i not found",thisName(),ix); + else + inlist[ix].Desc(d); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::DescOutlet(int ix,const char *d) +{ + if(UNLIKELY(ix >= incnt)) + post("%s - outlet %i not found",thisName(),ix); + else + outlist[ix].Desc(d); +} + +FLEXT_TEMPIMPL(unsigned long FLEXT_CLASSDEF(flext_base))::XletCode(xlettype tp,...) +{ + unsigned long code = 0; + + va_list marker; + va_start(marker,tp); + int cnt = 0; + xlettype arg = tp; + for(; arg; ++cnt) { +#ifdef FLEXT_DEBUG + if(cnt > 9) { + error("%s - Too many in/outlets defined - truncated to 9",thisName()); + break; + } +#endif + + code = code*10+(int)arg; + arg = (xlettype)va_arg(marker,int); + } + va_end(marker); + + return code; +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddInlets(unsigned long code) +{ + for(; code; code /= 10) AddInlet((xlettype)(code%10)); +} + +FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext_base))::AddOutlets(unsigned long code) +{ + for(; code; code /= 10) AddOutlet((xlettype)(code%10)); +} + +#include "flpopns.h" + +#endif // __FLEXT_XLET_CPP + diff --git a/externals/grill/trunk/flext/source/lockfree/atomic_int.hpp b/externals/grill/trunk/flext/source/lockfree/atomic_int.hpp new file mode 100644 index 0000000000000000000000000000000000000000..18832ebb88491b81c441c34c0549da3b7dd9de54 --- /dev/null +++ b/externals/grill/trunk/flext/source/lockfree/atomic_int.hpp @@ -0,0 +1,238 @@ +// $Id$ +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_ATOMIC_INT_HPP +#define __LOCKFREE_ATOMIC_INT_HPP + +#include "prefix.hpp" + +namespace lockfree +{ + +#if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) + +template <typename T> +class atomic_int +{ +public: + explicit atomic_int(T v = 0): + value(v) + { + } + + operator T(void) const + { + return __sync_fetch_and_add(&value, 0); + } + + void operator =(T v) + { + value = v; + __sync_synchronize(); + } + + T operator +=(T v) + { + return __sync_add_and_fetch(&value, v); + } + + T operator -=(T v) + { + return __sync_sub_and_fetch(&value, v); + } + + /* prefix operator */ + T operator ++(void) + { + return __sync_add_and_fetch(&value, 1); + } + + /* prefix operator */ + T operator --(void) + { + return __sync_sub_and_fetch(&value, 1); + } + + /* postfix operator */ + T operator ++(int) + { + return __sync_fetch_and_add(&value, 1); + } + + /* postfix operator */ + T operator --(int) + { + return __sync_fetch_and_sub(&value, 1); + } + +private: + mutable T value; +}; + +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) + +template <typename T> +class atomic_int +{ +public: + explicit atomic_int(T v = 0): + value(v) + { + } + + operator T(void) const + { + return __gnu_cxx::__exchange_and_add(&value, 0); + } + + void operator =(T v) + { + value = v; + } + + T operator +=(T v) + { + return __gnu_cxx::__exchange_and_add(&value, v) + v; + } + + T operator -=(T v) + { + return __gnu_cxx::__exchange_and_add(&value, -v) - v; + } + + /* prefix operator */ + T operator ++(void) + { + return operator+=(1); + } + + /* prefix operator */ + T operator --(void) + { + return operator-=(1); + } + + /* postfix operator */ + T operator ++(int) + { + return __gnu_cxx::__exchange_and_add(&value, 1); + } + + /* postfix operator */ + T operator --(int) + { + return __gnu_cxx::__exchange_and_add(&value, -1); + } + +private: + mutable _Atomic_word value; +}; + +#else /* emulate via CAS */ + +template <typename T> +class atomic_int +{ +public: + explicit atomic_int(T v = 0) + { + *this = v; + } + + operator T(void) const + { + memory_barrier(); + return value; + } + + void operator =(T v) + { + value = v; + memory_barrier(); + } + + /* prefix operator */ + T operator ++() + { + return *this += 1; + } + + /* prefix operator */ + T operator --() + { + return *this -= 1; + } + + T operator +=(T v) + { + for(;;) + { + T newv = value+v; + if(likely(CAS(&value,value,newv))) + return newv; + } + } + + T operator -=(T v) + { + for(;;) + { + T newv = value-v; + if(likely(CAS(&value,value,newv))) + return newv; + } + } + + /* postfix operator */ + T operator ++(int) + { + for(;;) + { + T oldv = value; + if(likely(CAS(&value,oldv,oldv+1))) + return oldv; + } + } + + /* postfix operator */ + T operator --(int) + { + for(;;) + { + T oldv = value; + if(likely(CAS(&value,oldv,oldv-1))) + return oldv; + } + } + +private: + T value; +}; + + +#endif + +} // namespace lockfree + +#endif /* __LOCKFREE_ATOMIC_INT_HPP */ diff --git a/externals/grill/trunk/flext/source/lockfree/atomic_ptr.hpp b/externals/grill/trunk/flext/source/lockfree/atomic_ptr.hpp new file mode 100644 index 0000000000000000000000000000000000000000..688dd78aaf85d1357f5ee75ab453d55852d90636 --- /dev/null +++ b/externals/grill/trunk/flext/source/lockfree/atomic_ptr.hpp @@ -0,0 +1,104 @@ +// $Id$ +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_ATOMIC_PTR_HPP +#define __LOCKFREE_ATOMIC_PTR_HPP + +#include "cas.hpp" +#include "branch_hints.hpp" + +#include <cstddef> + +namespace lockfree +{ + using std::size_t; + + template <class T> + class atomic_ptr + { + public: + atomic_ptr() {} + + atomic_ptr(const atomic_ptr &p): ptr(p.ptr),tag(p.tag) {} + + atomic_ptr(T *p,size_t t = 0): ptr(p),tag(t) {} + + /** atomic set operation */ + inline atomic_ptr &operator =(const atomic_ptr &p) + { + for (;;) + { + atomic_ptr current(ptr, tag); + + if(likely(CAS(current, p))) + return *this; + } + } + + inline atomic_ptr &operator()(T *p,size_t t) + { + return operator=(atomic_ptr(p, t) ); + } + + + inline bool operator ==(const atomic_ptr &p) const { return ptr == p.ptr && tag == p.tag; } + + inline bool operator !=(const atomic_ptr &p) const { return !operator ==(p); } + + + inline T * getPtr() const { return ptr; } + + inline void setPtr(T * p) { ptr = p; } + + + inline size_t getTag() const { return tag; } + + inline void setTag(size_t t) { tag = t; } + + inline size_t incTag() { return ++tag; } + + + inline bool CAS(const atomic_ptr &oldval,const atomic_ptr &newval) + { + return lockfree::CAS2(this,oldval.ptr,oldval.tag,newval.ptr,newval.tag); + } + + inline bool CAS(const atomic_ptr &oldval,T *newptr) + { + return lockfree::CAS2(this,oldval.ptr,oldval.tag,newptr,oldval.tag+1); + } + + inline bool CAS(const T *oldptr,size_t oldtag,T *newptr) + { + return lockfree::CAS2(this,oldptr,oldtag,newptr,oldtag+1); + } + + protected: + T * volatile ptr; + size_t volatile tag; + }; + +} // namespace + +#endif /* __LOCKFREE_ATOMIC_PTR_HPP */ diff --git a/externals/grill/trunk/flext/source/lockfree/branch_hints.hpp b/externals/grill/trunk/flext/source/lockfree/branch_hints.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d5a117f9d4de9088afadafb67da4e4e3634e82f3 --- /dev/null +++ b/externals/grill/trunk/flext/source/lockfree/branch_hints.hpp @@ -0,0 +1,53 @@ +// $Id$ +// +// branch hints +// Copyright (C) 2007 Tim Blechmann +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_BRANCH_HINTS_HPP +#define __LOCKFREE_BRANCH_HINTS_HPP + +namespace lockfree +{ + /** \brief hint for the branch prediction */ + inline bool likely(bool expr) + { +#ifdef __GNUC__ + return __builtin_expect(expr, true); +#else + return expr; +#endif + } + + /** \brief hint for the branch prediction */ + inline bool unlikely(bool expr) + { +#ifdef __GNUC__ + return __builtin_expect(expr, false); +#else + return expr; +#endif + } + +} // namespace + +#endif /* __LOCKFREE_BRANCH_HINTS_HPP */ diff --git a/externals/grill/trunk/flext/source/lockfree/cas.hpp b/externals/grill/trunk/flext/source/lockfree/cas.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8451f77b6c5663363b5206049d2d98e507b3e12c --- /dev/null +++ b/externals/grill/trunk/flext/source/lockfree/cas.hpp @@ -0,0 +1,252 @@ +// $Id$ +// +// Copyright (C) 2007-2008 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_CAS_H +#define __LOCKFREE_CAS_H + +#include "prefix.hpp" + +#ifndef _WIN32 +// pthreads are not available under Windows by default and we should not need them there +# include <pthread.h> +#endif + +namespace lockfree +{ + inline void memory_barrier() + { +#if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) + __sync_synchronize(); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__i686__)) + asm("" : : : "memory"); +#elif defined(_MSC_VER) && (_MSC_VER >= 1300) + _ReadWriteBarrier(); +#elif defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4) + OSMemoryBarrier(); +#elif defined(AO_HAVE_nop_full) + AO_nop_full(); +#else +# error no memory barrier implemented for this platform +#endif + } + + template <class C, class D> + inline bool CAS(volatile C * addr,D old,D nw) + { +#if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) + return __sync_bool_compare_and_swap(addr, old, nw); +#elif defined(_MSC_VER) + assert((size_t(addr)&3) == 0); // a runtime check only for debug mode is somehow insufficient.... + return _InterlockedCompareExchange(addr,nw,old) == old; +#elif defined(_WIN32) || defined(_WIN64) + assert((size_t(addr)&3) == 0); // a runtime check only for debug mode is somehow insufficient.... + return InterlockedCompareExchange(addr,nw,old) == old; +#elif defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4) + if(sizeof(D) == 4) + return OSAtomicCompareAndSwap32(old,nw,addr); + else if(sizeof(D) == 8) + return OSAtomicCompareAndSwap64(old,nw,addr); + else + assert(false); +#elif defined(AO_HAVE_compare_and_swap_full) + return AO_compare_and_swap_full(reinterpret_cast<volatile AO_t*>(addr), + reinterpret_cast<AO_t>(old), + reinterpret_cast<AO_t>(nw)); +#else + +# ifdef __GNUC__ +# warning blocking CAS emulation +# else +# pragma message("blocking CAS emulation") +# endif + + pthread_mutex_t guard = PTHREAD_MUTEX_INITIALIZER; + int status = pthread_mutex_lock(&guard); + assert(!status); + + bool ret; + + if (*addr == old) + { + *addr = nw; + ret = true; + } + else + ret = false; + int status2 = pthread_mutex_unlock(&guard); + assert(!status2); + return ret; +#endif + + } + + + template <class C, class D, class E> + inline bool CAS2(C * addr,D old1,E old2,D new1,E new2) + { +#if defined(__GNUC__) && ((__GNUC__ > 4) || ( (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 2) ) ) && (defined(__i686__) || defined(__pentiumpro__) || defined(__nocona__) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)) + struct packed_c + { + D d; + E e; + }; + + union cu + { + packed_c c; + long long l; + }; + + cu old; + old.c.d = old1; + old.c.e = old2; + + cu nw; + nw.c.d = new1; + nw.c.e = new2; + + return __sync_bool_compare_and_swap_8(reinterpret_cast<volatile long long*>(addr), + old.l, + nw.l); +#elif defined(__GNUC__) && ((__GNUC__ > 4) || ( (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 2) ) ) && (defined(__x86_64__) || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)) + struct packed_c + { + D d; + E e; + }; + + union cu + { + packed_c c; + long long l; + }; + + cu old; + old.c.d = old1; + old.c.e = old2; + + cu nw; + nw.c.d = new1; + nw.c.e = new2; + + return __sync_bool_compare_and_swap_16(reinterpret_cast<volatile long long*>(addr), + old.l, + nw.l); +#elif defined(_MSC_VER) + bool ok; + __asm { +# ifdef _WIN32 + mov eax,[old1] + mov edx,[old2] + mov ebx,[new1] + mov ecx,[new2] + mov edi,[addr] + lock cmpxchg8b [edi] +# else + mov rax,[old1] + mov rdx,[old2] + mov rbx,[new1] + mov rcx,[new2] + mov rdi,[addr] + lock cmpxchg16b [rdi] +# endif + setz [ok] + } + return ok; +#elif defined(__GNUC__) && (defined(__i386__) || defined(__i686__) || defined(__x86_64__)) + char result; + if(sizeof(D) == 4 && sizeof(E) == 4) { + #ifndef __PIC__ + __asm__ __volatile__("lock; cmpxchg8b %0; setz %1" + : "=m"(*addr), "=q"(result) + : "m"(*addr), "a" (old1), "d" (old2), + "b" (new1), "c" (new2) : "memory"); + #else + __asm__ __volatile__("push %%ebx; movl %5,%%ebx; lock; cmpxchg8b %0; setz %1; pop %%ebx" + : "=m"(*addr), "=q"(result) + : "m"(*addr), "a" (old1), "d" (old2), + "m" (new1), "c" (new2) : "memory"); + #endif + } + else if(sizeof(D) == 8 && sizeof(E) == 8) { + __asm__ __volatile__("lock; cmpxchg16b %0; setz %1" + : "=m"(*addr), "=q"(result) + : "m"(*addr), "a" (old1), "d" (old2), + "b" (new1), "c" (new2) : "memory"); + } + else + assert(false); + return result != 0; +#elif defined(AO_HAVE_double_compare_and_swap_full) + if (sizeof(D) != sizeof(AO_t) || sizeof(E) != sizeof(AO_t)) { + assert(false); + return false; + } + + return AO_compare_double_and_swap_double_full( + reinterpret_cast<volatile AO_double_t*>(addr), + static_cast<AO_t>(old2), + reinterpret_cast<AO_t>(old1), + static_cast<AO_t>(new2), + reinterpret_cast<AO_t>(new1) + ); +#else + +# ifdef __GNUC__ +# warning blocking CAS2 emulation +# else +# pragma message("blocking CAS2 emulation") +# endif + struct packed_c + { + D d; + E e; + }; + + volatile packed_c * packed_addr = reinterpret_cast<volatile packed_c*>(addr); + + pthread_mutex_t guard = PTHREAD_MUTEX_INITIALIZER; + int status = pthread_mutex_lock(&guard); + assert(!status); + + bool ret; + + if (packed_addr->d == old1 && + packed_addr->e == old2) + { + packed_addr->d = new1; + packed_addr->e = new2; + ret = true; + } + else + ret = false; + int status2 = pthread_mutex_unlock(&guard); + assert(!status2); + return ret; +#endif + } + +} // namespace + +#endif /* __LOCKFREE_CAS_H */ diff --git a/externals/grill/trunk/flext/source/lockfree/fifo.hpp b/externals/grill/trunk/flext/source/lockfree/fifo.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d906bb8062555d935451d13d08a24aff58452a8a --- /dev/null +++ b/externals/grill/trunk/flext/source/lockfree/fifo.hpp @@ -0,0 +1,250 @@ +// $Id$ +// +// lock-free fifo queue from +// Michael, M. M. and Scott, M. L., +// "simple, fast and practical non-blocking and blocking concurrent queue algorithms" +// +// intrusive implementation for c++ +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_FIFO_HPP +#define __LOCKFREE_FIFO_HPP + +#include "cas.hpp" +#include "atomic_ptr.hpp" +#include "branch_hints.hpp" + +#ifdef HAVE_BOOST +# include <boost/type_traits.hpp> +# include <boost/static_assert.hpp> +#else /* HAVE_BOOST */ +# ifdef BOOST_STATIC_ASSERT +# undef BOOST_STATIC_ASSERT +# endif +# define BOOST_STATIC_ASSERT(x) +#endif /* HAVE_BOOST */ + +#include <memory> + +namespace lockfree +{ + struct intrusive_fifo_node; + + typedef atomic_ptr<intrusive_fifo_node> intrusive_fifo_ptr_t; + + struct intrusive_fifo_node + { + intrusive_fifo_ptr_t next; + struct fifo_node * data; + }; + + struct fifo_node + { + intrusive_fifo_node *volatile node; + + protected: + fifo_node(void) + { + node = new intrusive_fifo_node(); + } + + ~fifo_node(void) + { + delete node; + } + + template <class T> friend class intrusive_fifo; + }; + + template <typename T> + class intrusive_fifo + { + BOOST_STATIC_ASSERT((boost::is_base_of<fifo_node,T>::value)); + + public: + intrusive_fifo(void) + { + /* dummy pointer for head/tail */ + intrusive_fifo_node * dummy = new intrusive_fifo_node(); + dummy->next(NULL,0); + head_(dummy,0); + tail_(dummy,0); + } + + ~intrusive_fifo(void) + { + /* client must have freed all members already */ + assert (empty()); + delete head_.getPtr(); + } + + bool empty() const + { + return head_.getPtr() == tail_.getPtr() || (!tail_.getPtr()); + } + + void enqueue(T * instance) + { + /* volatile */ intrusive_fifo_node * node = static_cast<fifo_node*>(instance)->node; + node->next.setPtr(NULL); + node->data = static_cast<fifo_node*>(instance); + + for (;;) + { + intrusive_fifo_ptr_t tail(tail_); + memory_barrier(); + + intrusive_fifo_ptr_t next(tail.getPtr()->next); + memory_barrier(); + + if (likely(tail == tail_)) + { + if (next.getPtr() == 0) + { + if (tail.getPtr()->next.CAS(next,node)) + { + tail_.CAS(tail,node); + return; + } + } + else + tail_.CAS(tail,next); + } + } + } + + T* dequeue (void) + { + T * ret; + for (;;) + { + intrusive_fifo_ptr_t head(head_); + memory_barrier(); + + intrusive_fifo_ptr_t tail(tail_); + /* volatile */ intrusive_fifo_node * next = head.getPtr()->next.getPtr(); + memory_barrier(); + + if (likely(head == head_)) + { + if (head.getPtr() == tail.getPtr()) + { + if (next == 0) + return 0; + tail_.CAS(tail,next); + } + else + { + ret = static_cast<T*>(next->data); + if (head_.CAS(head,next)) + { + ret->node = head.getPtr(); + return ret; + } + } + } + } + } + + private: + intrusive_fifo_ptr_t head_,tail_; + }; + + template <typename T> + class fifo_value_node: + public fifo_node + { + public: + fifo_value_node(T const & v): value(v) {} + + T value; + }; + + template <typename T, class Alloc = std::allocator<T> > + class fifo + : intrusive_fifo<fifo_value_node<T> > + { + public: + ~fifo() + { + fifo_value_node<T> * node; + while((node = intrusive_fifo<fifo_value_node<T> >::dequeue()) != NULL) + free(node); + } + + void enqueue(T const & v) + { + intrusive_fifo<fifo_value_node<T> >::enqueue(alloc(v)); + } + + bool dequeue (T & v) + { + fifo_value_node<T> * node = intrusive_fifo<fifo_value_node<T> >::dequeue(); + if(!node) + return false; + + v = node->value; + free(node); + return true; + } + + private: + +#if 0 + inline fifo_value_node<T> *alloc(const T &k) + { + fifo_value_node<T> *node = allocator.allocate(1); + allocator.construct(node,k); + return node; + } + + inline void free(fifo_value_node<T> *n) + { + assert(n); + allocator.destroy(n); + allocator.deallocate(n,1); + } +#else + // hmmm... static keyword brings 10% speedup... + + static inline fifo_value_node<T> *alloc(const T &k) + { + return new fifo_value_node<T>(k); + } + + static inline void free(fifo_value_node<T> *n) + { + assert(n); + delete n; + } +#endif + + typename Alloc::template rebind<fifo_value_node<T> >::other allocator; + }; +} + +#endif /* __LOCKFREE_FIFO_HPP */ + + + diff --git a/externals/grill/trunk/flext/source/lockfree/prefix.hpp b/externals/grill/trunk/flext/source/lockfree/prefix.hpp new file mode 100644 index 0000000000000000000000000000000000000000..6dde2eaebc1f59f0053ee227c56897ae794f81c7 --- /dev/null +++ b/externals/grill/trunk/flext/source/lockfree/prefix.hpp @@ -0,0 +1,64 @@ +// $Id$ +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + + +#ifndef __LOCKFREE_PREFIX_H +#define __LOCKFREE_PREFIX_H + +#include <cassert> + +#ifdef USE_ATOMIC_OPS + #define AO_REQUIRE_CAS + #define AO_USE_PENTIUM4_INSTRS + + extern "C" { + #include <atomic_ops.h> + } +#endif + +#ifdef _WIN32 + #include <windows.h> +#endif + +#ifdef __APPLE__ + #include <libkern/OSAtomic.h> +#else + #if defined(__GLIBCPP__) || defined(__GLIBCXX__) + #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) + #include <ext/atomicity.h> + #else + #include <bits/atomicity.h> + #endif + #endif +#endif + +#if defined(_MSC_VER) +// \note: Must use /Oi option for VC++ to enable intrinsics + extern "C" { + void __cdecl _ReadWriteBarrier(); + LONG __cdecl _InterlockedCompareExchange(LONG volatile* Dest,LONG Exchange, LONG Comp); + } +#endif + +#endif /* __LOCKFREE_PREFIX_H */ diff --git a/externals/grill/trunk/flext/source/lockfree/stack.hpp b/externals/grill/trunk/flext/source/lockfree/stack.hpp new file mode 100644 index 0000000000000000000000000000000000000000..c8781b828754588a55238166103778cbeb5878be --- /dev/null +++ b/externals/grill/trunk/flext/source/lockfree/stack.hpp @@ -0,0 +1,157 @@ +// $Id$ +// +// lock-free stack +// +// Copyright (C) 2007 Tim Blechmann & Thomas Grill +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; see the file COPYING. If not, write to +// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +// $Revision$ +// $LastChangedRevision$ +// $LastChangedDate$ +// $LastChangedBy$ + +#ifndef __LOCKFREE_STACK_HPP +#define __LOCKFREE_STACK_HPP + +#include "cas.hpp" +#include "atomic_ptr.hpp" +#include "branch_hints.hpp" + +#include <memory> // for std::allocator + +#if HAVE_BOOST +# include <boost/type_traits.hpp> +# include <boost/static_assert.hpp> +#else +# define BOOST_STATIC_ASSERT(x) +#endif + +namespace lockfree +{ + //! nodes for the intrusive_stack must be derived from that + class stack_node + { + template <class T> friend class intrusive_stack; + + public: + stack_node(): next(NULL) {} + + private: + atomic_ptr<stack_node> next; + }; + + //! intrusive lock-free stack implementation with T being the node type (inherited from stack_node) + template <typename T> + class intrusive_stack + { + BOOST_STATIC_ASSERT((boost::is_base_of<stack_node,T>::value)); + + public: + intrusive_stack(): head(NULL) {} + + ~intrusive_stack() + { + assert(empty()); + } + + bool empty() const { return !head.getPtr(); } + + void push(T *node) + { + assert(!node->next.getPtr()); + while(unlikely(!head.CAS(node->next = head,node))); + } + + T *pop() + { + for(;;) { + atomic_ptr<stack_node> current(head); + T *node = static_cast<T *>(current.getPtr()); + if(!node || likely(head.CAS(current,node->next.getPtr()))) { + if(node) node->next.setPtr(NULL); + return node; + } + } + } + + private: + atomic_ptr<stack_node> head; + }; + + + //! node type used by non-intrusive stack + template <typename T> + class stack_value_node + : public stack_node + { + public: + stack_value_node(T const &v): value(v) {} + T value; + }; + + + //! non-intrusive lock-free stack + template <typename T,class Alloc = std::allocator<T> > + class stack + : intrusive_stack<stack_value_node<T> > + { + public: + ~stack() + { + // delete remaining elements + stack_value_node<T> * node; + while((node = intrusive_stack<stack_value_node<T> >::pop()) != NULL) + free(node); + } + + void push(T const &v) + { + intrusive_stack<stack_value_node<T> >::push(alloc(v)); + } + + bool pop(T &v) + { + stack_value_node<T> *node = intrusive_stack<stack_value_node<T> >::pop(); + if(!node) + return false; + v = node->value; + free(node); + return true; + } + + private: + + inline stack_value_node<T> *alloc(const T &k) + { + stack_value_node<T> *node = allocator.allocate(1); + allocator.construct(node,k); + return node; + } + + inline void free(stack_value_node<T> *n) + { + assert(n); + allocator.destroy(n); + allocator.deallocate(n,1); + } + + typename Alloc::template rebind<stack_value_node<T> >::other allocator; + }; + +} // namespace + +#endif diff --git a/externals/grill/trunk/flext/tutorial/Makefile.am b/externals/grill/trunk/flext/tutorial/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..f3247e8146f8d6cca7e55e547132cd3379915b5c --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/Makefile.am @@ -0,0 +1,55 @@ +# +# automake template +# added by tim blechmann +# + +SUBDIRS = \ + adv1 \ + adv2 \ + adv3 \ + attr1 \ + attr2 \ + attr3 \ + bind1 \ + buffer1 \ + lib1 \ + signal1 \ + signal2 \ + simple1 \ + simple2 \ + simple3 \ + sndobj1 \ + stk1 \ + stk2 \ + thread1 \ + thread2 \ + timer1 + + +EXTRA_DIST = \ + readme.txt \ + gpl.txt \ + tutorial.sln + +DIST_SUBDIRS = pd \ + maxmsp \ + adv1 \ + adv2 \ + adv3 \ + attr1 \ + attr2 \ + attr3 \ + bind1 \ + buffer1 \ + lib1 \ + signal1 \ + signal2 \ + simple1 \ + simple2 \ + simple3 \ + sndobj1 \ + stk1 \ + stk2 \ + thread1 \ + thread2 \ + timer1 diff --git a/externals/grill/trunk/flext/tutorial/adv1/Makefile.am b/externals/grill/trunk/flext/tutorial/adv1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..d849ba2fb86e1131698d0714e292f4cfe7bdd541 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = adv1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/adv1/adv1.mcp b/externals/grill/trunk/flext/tutorial/adv1/adv1.mcp new file mode 100755 index 0000000000000000000000000000000000000000..7b89200a8826baa346658cc3770241bce79418e8 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/adv1/adv1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/adv1/adv1.vcproj b/externals/grill/trunk/flext/tutorial/adv1/adv1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..3737a2a886af3c6aec47b22e097b0d165a498504 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv1/adv1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="adv1" + SccProjectName="adv1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/adv1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/adv1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/adv1.pdb" + ImportLibrary=".\msvc/adv1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/adv1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/adv1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/adv1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/adv1.pdb" + ImportLibrary=".\msvc-debug/adv1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/adv1.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/adv1/main.cpp b/externals/grill/trunk/flext/tutorial/adv1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4150800fd481da5ef79f6f85ab89844523a1b7c3 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv1/main.cpp @@ -0,0 +1,101 @@ +/* +flext tutorial - advanced 1 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This is an example of a simplified prepend object +*/ + +#include <flext.h> + +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 +#endif + + +class adv1: + public flext_base +{ + FLEXT_HEADER(adv1,flext_base) + +public: + // constructor with variable argument list + adv1(int argc,t_atom *argv); + +protected: + void m_any(const t_symbol *s,int argc,t_atom *argv); // method which digests anything + + AtomList lst; +private: + FLEXT_CALLBACK_A(m_any); // callback for method "m_any" (with anything argument) +}; + +// instantiate the class (constructor has a variable argument list) +// note the two words in the string: prepend acts as an alias for adv1! +FLEXT_NEW_V("adv1 prepend",adv1) + + + +// constructor + +adv1::adv1(int argc,t_atom *argv) +{ + AddInAnything(); // one inlet that can receive anything + AddOutAnything(); // one outlet for anything + + // register method + FLEXT_ADDMETHOD(0,m_any); // register method "m_any" for inlet 0 + + if(argc != 0) { // check for arg count + // store arg list + lst(argc,argv); + } + else { + // no args given + post("%s - no arguments given",thisName()); + + // tell flext that the initialization was not successful... object will not live + InitProblem(); + } +} + + + +// method + +void adv1::m_any(const t_symbol *s,int argc,t_atom *argv) +{ + // reserve space for as many atoms as possibly necessary + AtomList result(lst.Count()+argc+2); + + // ix is our counter of atoms to output + int ix = 0; + + int i = 0; + if(!IsSymbol(lst[0])) { + // if first element to prepend is no symbol then make it a "list" + SetSymbol(result[ix++],sym_list); + } + // copy atoms to prepend to result list + for(; i < lst.Count(); ++i) CopyAtom(&result[ix++],&lst[i]); + + // if anything is no "list" or "float" then append it to result list + if(s != sym_list && s != sym_float +#if FLEXT_SYS == FLEXT_SYS_MAX + && s != sym_int // in Max integers are system data types +#endif + ) + SetSymbol(result[ix++],s); + + // append pending arguments to result list + for(i = 0; i < argc; ++i) CopyAtom(&result[ix++],argv+i); + + // output result list as an anything + ToOutAnything(0,GetSymbol(result[0]),ix-1,result.Atoms()+1); +} + + diff --git a/externals/grill/trunk/flext/tutorial/adv1/package.txt b/externals/grill/trunk/flext/tutorial/adv1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..f685a0e2ee38ab370db2e4979d53673306244264 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv1/package.txt @@ -0,0 +1,2 @@ +NAME=adv1 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/adv2/Makefile.am b/externals/grill/trunk/flext/tutorial/adv2/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..6daf4f32e708fba6d16a258b5de56f6e2d234dbb --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv2/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = adv2 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/adv2/adv2.mcp b/externals/grill/trunk/flext/tutorial/adv2/adv2.mcp new file mode 100755 index 0000000000000000000000000000000000000000..b46cd6d9df66b8eea0947e1e8981a408b3698657 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/adv2/adv2.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/adv2/adv2.vcproj b/externals/grill/trunk/flext/tutorial/adv2/adv2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..e87ac448f11eb0dfd972e675cb010e233b0ee8b1 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv2/adv2.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="adv2" + SccProjectName="adv2" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/adv2.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/adv2.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/adv2.pdb" + ImportLibrary=".\msvc-debug/adv2.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/adv2.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/adv2.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/adv2.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/adv2.pdb" + ImportLibrary=".\msvc/adv2.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/adv2.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/adv2/main.cpp b/externals/grill/trunk/flext/tutorial/adv2/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6558f5d11affb5b9db5168279e8675e35574a9da --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv2/main.cpp @@ -0,0 +1,100 @@ +/* +flext tutorial - advanced 2 + +Copyright (c) 2002-2006 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +------------------------------------------------------------------------- + +This is an optimized version of the example "simple 3" + +It has the exact same functionality but methods are registered at class setup opposed to +object setup (in the constructor) in "simple 3" + +The advantage of this lies in the fact that the message database needs only be constructed +once for all objects, namely on creation of the first object of this class. +All objects [adv2] will share the same database, saving memory. + +*/ + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500) +#error You need at least flext version 0.5.0 +#endif + +class adv2: + public flext_base +{ + // flext header with a setup function called "setup" + FLEXT_HEADER_S(adv2,flext_base,setup) + +public: + adv2(); + +protected: + void m_tag(); + void m_tag_and_int(int i); + void m_sym(t_symbol *s); + + void m_help(); + +private: + // define the _static_ class setup function + static void setup(t_classid c); + + FLEXT_CALLBACK(m_tag) + FLEXT_CALLBACK_I(m_tag_and_int) + FLEXT_CALLBACK_S(m_sym) + FLEXT_CALLBACK(m_help) +}; + +// instantiate the class (constructor takes no arguments) +FLEXT_NEW("adv2",adv2) + + +adv2::adv2() +{ + // define inlets + AddInAnything(); // add inlet of type anything (index 0) +} + +void adv2::setup(t_classid c) +{ + // register methods: + // notice the naming FLEXT_CADD_METHOD* instead of FLEXT_ADD_METHOD* + // there is also an additional parameter c pointing to the class definition + FLEXT_CADDMETHOD_(c,0,"born",m_tag); + FLEXT_CADDMETHOD_(c,0,"to",m_tag); + FLEXT_CADDMETHOD_(c,0,"hula",m_tag); + FLEXT_CADDMETHOD_I(c,0,"hula",m_tag_and_int); + + FLEXT_CADDMETHOD(c,0,m_sym); + + FLEXT_CADDMETHOD_(c,0,"help",m_help); +} + +void adv2::m_tag() +{ + post("tag recognized"); +} + +void adv2::m_tag_and_int(int i) +{ + post("tag recognized (has int arg: %i)",i); +} + +void adv2::m_sym(t_symbol *s) +{ + post("symbol: %s",GetString(s)); +} + +void adv2::m_help() +{ + post("%s - example for tagged messages",thisName()); +} + + diff --git a/externals/grill/trunk/flext/tutorial/adv2/package.txt b/externals/grill/trunk/flext/tutorial/adv2/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..58b919272770f77a3af9c0a3873f10b909a29761 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv2/package.txt @@ -0,0 +1,2 @@ +NAME=adv2 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/adv3/Makefile.am b/externals/grill/trunk/flext/tutorial/adv3/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..6c083c8061d938ad64d93f5f4bd62f27604d01ff --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv3/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = adv3 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/adv3/adv3.mcp b/externals/grill/trunk/flext/tutorial/adv3/adv3.mcp new file mode 100755 index 0000000000000000000000000000000000000000..a951fec5ce42bf4db8957cf25c29a673f733445e Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/adv3/adv3.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/adv3/adv3.vcproj b/externals/grill/trunk/flext/tutorial/adv3/adv3.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..c52e883594b65dd883a60d3c0e48c8d88d492d36 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv3/adv3.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="adv3" + SccProjectName="adv3" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/adv3.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/adv3.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/adv3.pdb" + ImportLibrary=".\msvc/adv3.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/adv3.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/adv3.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/adv3.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/adv3.pdb" + ImportLibrary=".\msvc-debug/adv3.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/adv3.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/adv3/main.cpp b/externals/grill/trunk/flext/tutorial/adv3/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77f886d71200cc476ad8aa602fed4b69007da8a9 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv3/main.cpp @@ -0,0 +1,153 @@ +/* +flext tutorial - advanced 3 + +Copyright (c) 2002-2006 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +------------------------------------------------------------------------- + +This is a port of Iohannes Zmölnigs "counter" example to the flext paradigm. +Find the original at http://iem.kug.ac.at/pd/externals-HOWTO/node5.html + +The functionality is exactly the same, with one exception: +flext doesn't support default arguments, hence a message "bound 1" will translate into +"bound 1 0" in the original example, but won't be recognized with flext. +This can be easily circumvented by using a method digesting a variable argument list, but +was omitted for the sake of clearness. + +Apart from that you'll notice several differences to the original C object: +- with flext, callbacks have to be declared for all registered methods +- Flext allows the full usage of integer types +- there are no real "passive" methods with flext. + These can be emulated by methods, or more flexibly, attributes (see example "attr3") +- Help symbols can't be defined that freely. This is because in Max/MSP help files always + have the name of the object with a suffix .help appended. + However with flext, a path to the respective help file may be specified +*/ + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 501) +#error You need at least flext version 0.5.1 +#endif + +class adv3: + public flext_base +{ + FLEXT_HEADER_S(adv3,flext_base,setup) + +public: + // constructor with no arguments + adv3(int argc,t_atom *argv): + i_step(1) + { + // --- initialize bounds and step size --- + int f1 = 0,f2 = 0; + switch(argc) { + default: + case 3: + i_step = GetInt(argv[2]); + case 2: + f2 = GetInt(argv[1]); + case 1: + f1 = GetInt(argv[0]); + case 0: + ; + } + if(argc < 2) f2 = f1; + + m_bound(f1,f2); + + i_count = i_down; + + // --- define inlets and outlets --- + AddInAnything("bang, reset, etc."); // default inlet + AddInList("bounds (2 element list)"); // inlet for bounds + AddInInt("step size"); // inlet for step size + + AddOutInt("counter"); // outlet for integer count + AddOutBang("overflow bang"); // outlet for bang + } + +protected: + + void m_reset() + { + i_count = i_down; + } + + void m_set(int argc,t_atom *argv) + { + i_count = argc?GetAInt(argv[0]):0; + } + + void m_bang() + { + int f = i_count; + i_count += i_step; + if(i_down != i_up) { + if((i_step > 0) && (i_count > i_up)) { + i_count = i_down; + ToOutBang(1); + } + else if(i_count < i_down) { + i_count = i_up; + ToOutBang(1); + } + } + ToOutInt(0,f); + } + + void m_bound(int f1,int f2) + { + i_down = f1 < f2?f1:f2; + i_up = f1 > f2?f1:f2; + } + + void m_step(int s) + { + i_step = s; + } + + int i_count,i_down,i_up,i_step; + +private: + + static void setup(t_classid c) + { + // --- set up methods (class scope) --- + + // register a bang method to the default inlet (0) + FLEXT_CADDBANG(c,0,m_bang); + + // set up tagged methods for the default inlet (0) + // the underscore _ after CADDMETHOD indicates that a message tag is used + // no, variable list or anything and all single arguments are recognized automatically, ... + FLEXT_CADDMETHOD_(c,0,"reset",m_reset); + FLEXT_CADDMETHOD_(c,0,"set",m_set); + // ..., more complex types (combinations of types) have to be specified explicitly + FLEXT_CADDMETHOD_II(c,0,"bound",m_bound); // two int arguments + + // set up methods for inlets 1 and 2 + // no message tag used + FLEXT_CADDMETHOD(c,1,m_bound); // variable arg type recognized automatically + FLEXT_CADDMETHOD(c,2,m_step); // single int arg also recognized automatically + } + + // for every registered method a callback has to be declared + FLEXT_CALLBACK(m_bang) + FLEXT_CALLBACK(m_reset) + FLEXT_CALLBACK_V(m_set) + FLEXT_CALLBACK_II(m_bound) + FLEXT_CALLBACK_I(m_step) +}; + +// instantiate the class (constructor has a variable argument list) +// let "counter" be an alternative name +// after the colon define the path/name of the help file (a path has a trailing /, a file has not) +FLEXT_NEW_V("adv3 counter,help/",adv3) + + diff --git a/externals/grill/trunk/flext/tutorial/adv3/package.txt b/externals/grill/trunk/flext/tutorial/adv3/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..9bd894d42bb26a252e1e2bc12e04febd953153cd --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/adv3/package.txt @@ -0,0 +1,2 @@ +NAME=adv3 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/attr1/Makefile.am b/externals/grill/trunk/flext/tutorial/attr1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..000b2a85603dd9823d2da829d33e6e6e5cac4ca5 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = attr1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/attr1/attr1.mcp b/externals/grill/trunk/flext/tutorial/attr1/attr1.mcp new file mode 100755 index 0000000000000000000000000000000000000000..32e4ec8f7346cd8ff4d6bd197390436161dd16d7 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/attr1/attr1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/attr1/attr1.vcproj b/externals/grill/trunk/flext/tutorial/attr1/attr1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..e962984f4e5daab5eeabd059b3bb95bd55da826b --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr1/attr1.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="attr1" + SccProjectName="attr1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/attr1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/attr1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/attr1.pdb" + ImportLibrary=".\msvc-debug/attr1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/attr1.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/attr1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/attr1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/attr1.pdb" + ImportLibrary=".\msvc/attr1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/attr1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/attr1/main.cpp b/externals/grill/trunk/flext/tutorial/attr1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e4abc47b6424d0d6cb8890bb63504e913ea025d2 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr1/main.cpp @@ -0,0 +1,79 @@ +/* +flext tutorial - attributes 1 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This is an example of a simple object doing a float addition +It is a variation of the tutorial "simple 2" +*/ + + +// IMPORTANT: enable attribute processing (specify before inclusion of flext headers!) +// For clarity, this is done here, but you'd better specify it as a compiler definition +// FLEXT_ATTRIBUTES must be 0 or 1, +#define FLEXT_ATTRIBUTES 1 + + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +class attr1: + public flext_base +{ + FLEXT_HEADER(attr1,flext_base) + +public: + // constructor + attr1(); + +protected: + void m_trigger(float f); + + // stored argument + float arg; + +private: + // callback for method "m_trigger" (with one float argument) + FLEXT_CALLBACK_F(m_trigger) + + // define attribute callbacks for variable "arg" (with GET and SET properties) + FLEXT_ATTRVAR_F(arg) +}; + +// instantiate the class +FLEXT_NEW("attr1",attr1) + + +attr1::attr1(): + arg(0) // initialize argument +{ + // define inlets + AddInAnything(); // first inlet of type anything (index 0) + + // define outlets + AddOutFloat(); // one float outlet (has index 0) + + // register methods + FLEXT_ADDMETHOD(0,m_trigger); // register method (for floats) "m_trigger" for inlet 0 + + FLEXT_ADDATTR_VAR1("arg",arg); // register attribute "arg" with variable arg +} + +void attr1::m_trigger(float f) +{ + float res = arg+f; + + // output value to outlet + ToOutFloat(0,res); // (0 stands for the outlet index 0) +} + diff --git a/externals/grill/trunk/flext/tutorial/attr1/package.txt b/externals/grill/trunk/flext/tutorial/attr1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..938feb568a346a1252256247b3bc7e1277eeabf8 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr1/package.txt @@ -0,0 +1,2 @@ +NAME=attr1 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/attr2/Makefile.am b/externals/grill/trunk/flext/tutorial/attr2/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..ed29b067949a9cc5e5b0f14fc99290bdd074f5a5 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr2/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = attr2 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/attr2/attr2.mcp b/externals/grill/trunk/flext/tutorial/attr2/attr2.mcp new file mode 100755 index 0000000000000000000000000000000000000000..c2713289ff6f0976ed644cc7214958178057f780 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/attr2/attr2.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/attr2/attr2.vcproj b/externals/grill/trunk/flext/tutorial/attr2/attr2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..7cce4376f1bf236924f5cec4dff28e11c41183e7 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr2/attr2.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="attr2" + SccProjectName="attr2" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/attr2.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/attr2.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/attr2.pdb" + ImportLibrary=".\msvc/attr2.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/attr2.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/attr2.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/attr2.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/attr2.pdb" + ImportLibrary=".\msvc-debug/attr2.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/attr2.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/attr2/main.cpp b/externals/grill/trunk/flext/tutorial/attr2/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fe61f6da6d186035b6d03347ee5e07e19ca53cb5 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr2/main.cpp @@ -0,0 +1,195 @@ +/* +flext tutorial - attributes 2 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This is an example of an object doing various float operations. + +Methods and attributes are registered at class level (opposed to object level in example "attr1"). +For details, see also example "adv2" + +*/ + + +// IMPORTANT: enable attribute processing (specify before inclusion of flext headers!) +// For clarity, this is done here, but you'd better specify it as a compiler definition +// FLEXT_ATTRIBUTES must be 0 or 1, +#define FLEXT_ATTRIBUTES 1 + + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 +#endif + +#include <math.h> + + +class attr2: + public flext_base +{ + // compulsory flext header with a class setup function + FLEXT_HEADER_S(attr2,flext_base,setup) + +public: + // constructor + attr2(); + +protected: + void m_trigger(float f); + + // stored argument of operation + float arg; + + // stored result + float res; + + enum operation { + op_set,op_add,op_sub,op_mul,op_div,op_pow + } op; + + static const t_symbol *sym_set,*sym_add,*sym_sub,*sym_div,*sym_mul,*sym_pow; + +private: + + static void setup(t_classid); + + // callback for method "m_trigger" (with one float argument) + FLEXT_CALLBACK_F(m_trigger) + + // define attribute callbacks for variable "arg" ("ATTRVAR" means GET and SET) + FLEXT_ATTRVAR_F(arg) + + // define attribute callbacks for variable "res" (GET only) + FLEXT_ATTRGET_F(res) + + // methods for getting/setting the operation mode + void opget(const t_symbol *&s) const; + void opset(const t_symbol *&s); + + // define attribute callbacks for variable "res" (GET only) + FLEXT_CALLGET_S(opget) + FLEXT_CALLSET_S(opset) +}; + +// instantiate the class +FLEXT_NEW("attr2",attr2) + + +// instantiate static variables +const t_symbol + *attr2::sym_set, + *attr2::sym_add,*attr2::sym_sub, + *attr2::sym_div,*attr2::sym_mul, + *attr2::sym_pow; + +void attr2::setup(t_classid c) +{ + // Upon class creation setup some symbols + // This is done only upon creation of of the first "attr2" object + sym_set = MakeSymbol("="); + sym_add = MakeSymbol("+"); + sym_sub = MakeSymbol("-"); + sym_mul = MakeSymbol("*"); + sym_div = MakeSymbol("/"); + sym_pow = MakeSymbol("**"); + + + // setup methods and attributes at class scope + + // register method (for floats) "m_trigger" for inlet 0 + FLEXT_CADDMETHOD(c,0,m_trigger); + + // register attribute "arg" with the variable "arg" + FLEXT_CADDATTR_VAR1(c,"arg",arg); + + // register attribute "result" with variable "res" + FLEXT_CADDATTR_GET(c,"result",res); + + // register attribute "op" with methods "opget" and "opset" + FLEXT_CADDATTR_VAR(c,"op",opget,opset); +} + + +attr2::attr2(): + arg(0),res(0), // initialize argument and result + op(op_set) // initialize operation +{ + // define inlets + AddInAnything(); // first inlet of type anything (index 0) + + // define outlets + AddOutFloat(); // one float outlet (has index 0) +} + +// receive an operand, do the math operation and trigger the output +void attr2::m_trigger(float f) +{ + switch(op) { + case op_set: res = f; break; + case op_add: res = f+arg; break; + case op_sub: res = f-arg; break; + case op_mul: res = f*arg; break; + case op_div: + if(arg) res = f/arg; + else { + post("%s - argument to division is 0: result set to 0",thisName()); + res = 0; + } + break; + case op_pow: res = (float)pow(f,arg); break; +#ifdef FLEXT_DEBUG + default: ERRINTERNAL(); // operation not defined +#endif + } + + // output value to outlet + ToOutFloat(0,res); // (0 stands for the outlet index 0) +} + + +// report the operation mode +void attr2::opget(const t_symbol *&s) const +{ + + switch(op) { + case op_set: s = sym_set; break; + case op_add: s = sym_add; break; + case op_sub: s = sym_sub; break; + case op_mul: s = sym_mul; break; + case op_div: s = sym_div; break; + case op_pow: s = sym_pow; break; +#ifdef FLEXT_DEBUG + default: ERRINTERNAL(); // operation not defined +#endif + } +} + +// set the operation mode +void attr2::opset(const t_symbol *&s) +{ + if(s == sym_set) + op = op_set; + else if(s == sym_add) + op = op_add; + else if(s == sym_sub) + op = op_sub; + else if(s == sym_mul) + op = op_mul; + else if(s == sym_div) + op = op_div; + else if(s == sym_pow) + op = op_pow; + else { + post("%s - operation is not defined, set to =",thisName()); + op = op_set; + } +} + diff --git a/externals/grill/trunk/flext/tutorial/attr2/package.txt b/externals/grill/trunk/flext/tutorial/attr2/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..d028f1b4a4dd28b62a11e34e4865df8a2830b51c --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr2/package.txt @@ -0,0 +1,2 @@ +NAME=attr2 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/attr3/Makefile.am b/externals/grill/trunk/flext/tutorial/attr3/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..eb4befbb134c224b6b5b1e4f90753ebc028b8852 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr3/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = attr3 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/attr3/attr3.mcp b/externals/grill/trunk/flext/tutorial/attr3/attr3.mcp new file mode 100755 index 0000000000000000000000000000000000000000..644c96a6de26ffa310881eef998d5979afda95b9 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/attr3/attr3.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/attr3/attr3.vcproj b/externals/grill/trunk/flext/tutorial/attr3/attr3.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..0e2a06805ea850a04f3deea87c2acc2069997e54 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr3/attr3.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="attr3" + SccProjectName="attr3" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/attr3.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/attr3.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/attr3.pdb" + ImportLibrary=".\msvc/attr3.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/attr3.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/attr3.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/attr3.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/attr3.pdb" + ImportLibrary=".\msvc-debug/attr3.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/attr3.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/attr3/main.cpp b/externals/grill/trunk/flext/tutorial/attr3/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8d37f4676ae4dc15bbf0a18a8afb72f402d89fe1 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr3/main.cpp @@ -0,0 +1,157 @@ +/* +flext tutorial - attributes 3 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This is tutorial example "advanced 3" with the usage of attributes. + +*/ + + +// IMPORTANT: enable attribute processing (specify before inclusion of flext headers!) +// For clarity, this is done here, but you'd better specify it as a compiler definition +// FLEXT_ATTRIBUTES must be 0 or 1, +#define FLEXT_ATTRIBUTES 1 + + +// include flext header +#include <flext.h> + + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 +#endif + + +class attr3: + public flext_base +{ + FLEXT_HEADER_S(attr3,flext_base,setup) + +public: + // constructor with no arguments + // initial values are set by attributes at creation time (see help file) + attr3(): + // initialize data members + i_down(0),i_up(0),i_count(0),i_step(1) + { + // --- define inlets and outlets --- + AddInAnything(); // default inlet + AddInList(); // inlet for bounds + AddInInt(); // inlet for step size + + AddOutInt(); // outlet for integer count + AddOutBang(); // outlet for bang + } + +protected: + + void m_reset() { i_count = i_down; } + + void m_set(int argc,t_atom *argv) + { + i_count = argc?GetAInt(argv[0]):0; + } + + void m_bang() + { + int f = i_count; + i_count += i_step; + if(i_down != i_up) { + if((i_step > 0) && (i_count > i_up)) { + i_count = i_down; + ToOutBang(1); + } + else if(i_count < i_down) { + i_count = i_up; + ToOutBang(1); + } + } + ToOutInt(0,f); + } + + void m_bounds(int f1,int f2) + { + i_down = f1 < f2?f1:f2; + i_up = f1 > f2?f1:f2; + } + + void m_step(int s) { i_step = s; } + + + // setter method of bounds variables + void ms_bounds(const AtomList &l) + { + if(l.Count() == 2 && CanbeInt(l[0]) && CanbeInt(l[1])) + // if it is a two element integer list use m_bounds method + m_bounds(GetAInt(l[0]),GetAInt(l[1])); + else + // else post a warning + post("%s - 'bounds' needs two integer parameters",thisName()); + } + + // getter method of bounds variables + void mg_bounds(AtomList &l) const + { + l(2); // initialize two element list + SetInt(l[0],i_down); // set first element + SetInt(l[1],i_up); // set second element + } + + + int i_count,i_down,i_up,i_step; + +private: + + static void setup(t_classid c) + { + // --- set up methods (class scope) --- + + // register a bang method to the default inlet (0) + FLEXT_CADDBANG(c,0,m_bang); + + // set up tagged methods for the default inlet (0) + FLEXT_CADDMETHOD_(c,0,"reset",m_reset); + FLEXT_CADDMETHOD_(c,0,"set",m_set); + + // set up methods for inlets 1 and 2 + // no message tag used + FLEXT_CADDMETHOD(c,1,m_bounds); // variable arg type recognized automatically + FLEXT_CADDMETHOD(c,2,m_step); // single int arg also recognized automatically + + // --- set up attributes (class scope) --- + + // these have equally named getters and setters + // see the wrappers below + FLEXT_CADDATTR_VAR1(c,"count",i_count); + FLEXT_CADDATTR_VAR1(c,"step",i_step); + + // bounds has differently named getter and setter functions + // see the wrappers below + FLEXT_CADDATTR_VAR(c,"bounds",mg_bounds,ms_bounds); + } + + // normal method callbacks for bang and reset + FLEXT_CALLBACK(m_bang) + FLEXT_CALLBACK(m_reset) + + FLEXT_CALLBACK_V(m_set) // normal method wrapper for m_set + FLEXT_ATTRVAR_I(i_count) // wrapper functions (get and set) for integer variable i_count + + FLEXT_CALLBACK_II(m_bounds) // normal method wrapper for m_bounds + FLEXT_CALLVAR_V(mg_bounds,ms_bounds) // getter and setter method of bounds + + FLEXT_CALLBACK_I(m_step) // normal method wrapper for m_step + FLEXT_ATTRVAR_I(i_step) // wrapper functions (get and set) for integer variable i_step +}; + + +// instantiate the class (constructor takes no arguments) +FLEXT_NEW("attr3",attr3) + + diff --git a/externals/grill/trunk/flext/tutorial/attr3/package.txt b/externals/grill/trunk/flext/tutorial/attr3/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..a87c4e1ec78ed59bdc6fad04a235ff646f3abfb2 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/attr3/package.txt @@ -0,0 +1,2 @@ +NAME=attr3 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/bind1/Makefile.am b/externals/grill/trunk/flext/tutorial/bind1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..085de2d2bfd0bd77dafd00b6b52d46f6fc1c9eef --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/bind1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = bind1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/bind1/bind1.mcp b/externals/grill/trunk/flext/tutorial/bind1/bind1.mcp new file mode 100755 index 0000000000000000000000000000000000000000..750d275bb6d215023080925dff2658ee5d3a4207 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/bind1/bind1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/bind1/bind1.vcproj b/externals/grill/trunk/flext/tutorial/bind1/bind1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..b0a3a2daa60d3719b77d388eb7fea191fdcd0393 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/bind1/bind1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="bind1" + SccProjectName="max/flext/tutorial/bind1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/bind1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile="msvc-debug/bind1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/bind1.pdb" + ImportLibrary=".\msvc-debug/bind1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/bind1.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/bind1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/bind1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/bind1.pdb" + ImportLibrary=".\msvc/bind1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/bind1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/bind1/main.cpp b/externals/grill/trunk/flext/tutorial/bind1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..debfa68aa2e3da96471e44a157d957f4a58a4621 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/bind1/main.cpp @@ -0,0 +1,134 @@ +/* +flext tutorial - bind 1 + +Copyright (c) 2003 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. + +------------------------------------------------------------------------- + +This is an example of a simple object demonstrating method to symbol binding and message forwarding +*/ + + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +// define the class that stands for a pd/Max object + +class bind1: + // inherit from basic flext class + public flext_base +{ + // obligatory flext header (class name,base class name) featuring a setup function + FLEXT_HEADER_S(bind1,flext_base,setup) + +public: + // constructor with no arguments + bind1() + { + // define inlets: + // first inlet must always be of type anything (or signal for dsp objects) + AddInAnything("message inlet"); // add one inlet for any message + AddInAnything("forwarding inlet"); // add one inlet for any message + + AddOutAnything("bound message"); // output received bound message + } + + /* + no destructor necessary here: + flext frees all eventually remaining bound symbols when the object is destroyed + (but NOT the data that can be passed via the FLEXT_BINDMETHOD call!) + */ + +protected: + const t_symbol *bufname; + buffer *buf; + + // bind object + void m_bind(const t_symbol *s) + { + if(!Bind(s)) { + post("%s (%s) - Binding failed",thisName(),GetString(thisTag())); + } + } + + // unbind object + void m_unbind(const t_symbol *s) + { + if(!Unbind(s)) { + post("%s (%s) - Binding failed",thisName(),GetString(thisTag())); + } + } + + // bind method + void m_bindmethod(const t_symbol *s) + { + if(!FLEXT_BINDMETHOD(s,m_bound,NULL)) { + post("%s (%s) - Binding failed",thisName(),GetString(thisTag())); + } + } + + // unbind method + void m_unbindmethod(const t_symbol *s) + { + if(!FLEXT_UNBINDMETHOD(s)) { + post("%s (%s) - Binding failed",thisName(),GetString(thisTag())); + } + } + + // forward message + void m_forward(const t_symbol *s,int argc,const t_atom *argv) + { + Forward(s,argc,argv); + } + + // method for symbol-bound messages + void m_bound(const t_symbol *sym,int argc,const t_atom *argv,void *data) + { + ToOutAnything(0,sym,argc,argv); + } + + // method for binding test + void m_test(float value) + { + post("%s - TEST METHOD: value %f",thisName(),value); + } + +private: + static void setup(t_classid c) + { + // register methods + + FLEXT_CADDMETHOD_(c,0,"bind",m_bind); // register method "bind" for inlet 0 + FLEXT_CADDMETHOD_(c,0,"unbind",m_unbind); // register method "unbind" for inlet 0 + FLEXT_CADDMETHOD_(c,0,"bindmethod",m_bindmethod); // register method "bindmethod" for inlet 0 + FLEXT_CADDMETHOD_(c,0,"unbindmethod",m_unbindmethod); // register method "unbindmethod" for inlet 0 + + FLEXT_CADDMETHOD_(c,0,"test",m_test); // register method m_test for inlet 0 + + FLEXT_CADDMETHOD(c,1,m_forward); // register method m_forward for inlet 1 + } + + FLEXT_CALLBACK_S(m_bind) // wrapper for method m_bind (with symbol argument) + FLEXT_CALLBACK_S(m_unbind) // wrapper for method m_unbind (with symbol argument) + FLEXT_CALLBACK_S(m_bindmethod) // wrapper for method m_bindmethod (with symbol argument) + FLEXT_CALLBACK_S(m_unbindmethod) // wrapper for method m_unbindmethod (with symbol argument) + + FLEXT_CALLBACK_A(m_forward) // wrapper for method m_forward (with anything argument) + + FLEXT_CALLBACK_AX(m_bound) // wrapper for method m_bound (anything+data arguments) + FLEXT_CALLBACK_F(m_test) // wrapper for method m_test (one float argument) +}; + +// instantiate the class +FLEXT_NEW("bind1",bind1) + + + diff --git a/externals/grill/trunk/flext/tutorial/bind1/package.txt b/externals/grill/trunk/flext/tutorial/bind1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..c7e8235923bdffed8c666a4a1bc6481c92a7d29e --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/bind1/package.txt @@ -0,0 +1,2 @@ +NAME=bind1 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/buffer1/Makefile.am b/externals/grill/trunk/flext/tutorial/buffer1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..05a9b98a7ac5dec10ff74b53e23a7497d1d63ca1 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/buffer1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = buffer1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/buffer1/buffer1.mcp b/externals/grill/trunk/flext/tutorial/buffer1/buffer1.mcp new file mode 100755 index 0000000000000000000000000000000000000000..31671b117c290c4d33d59c3b2a2c984c123b6c5b Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/buffer1/buffer1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/buffer1/buffer1.vcproj b/externals/grill/trunk/flext/tutorial/buffer1/buffer1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..c583befb4d2781dd698a943e285d6250ceb5edaf --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/buffer1/buffer1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="buffer1" + SccProjectName="max/flext/tutorial/buffer1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/buffer1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile="msvc-debug/buffer1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/buffer1.pdb" + ImportLibrary=".\msvc-debug/buffer1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/buffer1.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/buffer1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/buffer1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/buffer1.pdb" + ImportLibrary=".\msvc/buffer1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/buffer1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/buffer1/main.cpp b/externals/grill/trunk/flext/tutorial/buffer1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..25ce4bc4c60a4b24b237dee66f3970a76f9bebe2 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/buffer1/main.cpp @@ -0,0 +1,258 @@ +/* +flext tutorial - buffer 1 + +Copyright (c) 2003-2010 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. + +------------------------------------------------------------------------- + +This is an example of a simple object doing some basic buffer operation +*/ + + +// IMPORTANT: enable attribute processing (specify before inclusion of flext headers!) +// For clarity, this is done here, but you'd better specify it as a compiler definition +// FLEXT_ATTRIBUTES must be 0 or 1, +#define FLEXT_ATTRIBUTES 1 + + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +// define the class that stands for a pd/Max object + +class buffer1: + // inherit from basic flext class + public flext_base +{ + // obligatory flext header (class name,base class name) featuring a setup function + FLEXT_HEADER_S(buffer1,flext_base,setup) + +public: + // constructor with a variable argument list + buffer1(int argc,const t_atom *argv); + +protected: + const t_symbol *bufname; + buffer *buf; + + // set new buffer (or none if name omitted) + void m_set(int argc,const t_atom *argv); + + // get buffer name + void mg_buf(AtomList &lst) const; + // set buffer name (simply reuse m_set method) + inline void ms_buf(const AtomList &lst) { m_set(lst.Count(),lst.Atoms()); } + + // get buffer channels + inline void mg_chns(int &chns) { chns = Check()?buf->Channels():0; } + + // get buffer length in frames + inline void mg_frames(int &frames) { frames = Check()?buf->Frames():0; } + // set buffer length in frames + inline void ms_frames(int frames) { if(Check()) buf->Frames(frames); } + + // get sample (index channel) + void m_peek(int argc,const t_atom *argv); + // set sample (index value channel) + void m_poke(int argc,const t_atom *argv); + + // delete eventual existing buffer + void Clear(); + + // check and eventually update buffer reference (return true if valid) + bool Check(); + +private: + static void setup(t_classid c); + + FLEXT_CALLBACK_V(m_set) // wrapper for method m_set (with variable argument list) + FLEXT_CALLBACK_V(m_peek) // wrapper for method m_peek (with variable argument list) + FLEXT_CALLBACK_V(m_poke) // wrapper for method m_poke (with variable argument list) + + FLEXT_CALLVAR_V(mg_buf,ms_buf) // wrappers for attribute getter/setter mg_buffer/ms_buffer (with variable argument list) + FLEXT_CALLGET_I(mg_chns) // wrappers for attribute getter mg_chns (with integer arguments) + FLEXT_CALLVAR_I(mg_frames,ms_frames) // wrappers for attribute getter/setter mg_frames/ms_frames (with integer arguments) +}; + +// instantiate the class +FLEXT_NEW_V("buffer1",buffer1) + + +void buffer1::setup(t_classid c) +{ + // register methods and attributes + + FLEXT_CADDMETHOD_(c,0,"set",m_set); // register method "set" for inlet 0 + FLEXT_CADDMETHOD_(c,0,"peek",m_peek); // register method "peek" for inlet 0 + FLEXT_CADDMETHOD_(c,0,"poke",m_poke); // register method "poke" for inlet 0 + + FLEXT_CADDATTR_VAR(c,"buffer",mg_buf,ms_buf); // register attribute "buffer" + FLEXT_CADDATTR_GET(c,"channels",mg_chns); // register attribute "channels" + FLEXT_CADDATTR_VAR(c,"frames",mg_frames,ms_frames); // register attribute "frames" +} + + +buffer1::buffer1(int argc,const t_atom *argv): + // clear buffer + buf(NULL),bufname(NULL) +{ + // define inlets: + // first inlet must always be of type anything (or signal for dsp objects) + AddInAnything("message inlet"); // add one inlet for any message + + // peek outlet + AddOutFloat("peek value outlet"); + + // set buffer according to creation arguments + m_set(argc,argv); +} + + +void buffer1::Clear() +{ + if(buf) { + delete buf; + buf = NULL; bufname = NULL; + } +} + +bool buffer1::Check() +{ + if(!buf || !buf->Valid()) { + post("%s (%s) - no valid buffer defined",thisName(),GetString(thisTag())); + // return zero length + return false; + } + else { + if(buf->Update()) { + // buffer parameters have been updated + if(buf->Valid()) { + post("%s (%s) - updated buffer reference",thisName(),GetString(thisTag())); + return true; + } + else { + post("%s (%s) - buffer has become invalid",thisName(),GetString(thisTag())); + return false; + } + } + else + return true; + } +} + +void buffer1::m_set(int argc,const t_atom *argv) +{ + if(argc == 0) { + // argument list is empty + + // clear existing buffer + Clear(); + } + else if(argc == 1 && IsSymbol(argv[0])) { + // one symbol given as argument + + // clear existing buffer + Clear(); + // save buffer name + bufname = GetSymbol(argv[0]); + // make new reference to system buffer object + buf = new buffer(bufname); + + if(!buf->Ok()) { + post("%s (%s) - warning: buffer is currently not valid!",thisName(),GetString(thisTag())); + } + } + else { + // invalid argument list, leave buffer as is but issue error message to console + post("%s (%s) - message argument must be a symbol (or left blank)",thisName(),GetString(thisTag())); + } +} + +void buffer1::mg_buf(AtomList &lst) const +{ + if(buf) { + // buffer exists: return buffer name + lst(1); SetSymbol(lst[0],bufname); + } + else + // no buffer: set empty list + lst(0); +} + + +void buffer1::m_poke(int argc,const t_atom *argv) +{ + // if buffer is invalid bail out + if(!Check()) return; + + bool ok = true; + int ix,chn = 0; + float val; + + if(argc == 3) { + if(CanbeInt(argv[2])) + // get channel index + chn = GetAInt(argv[2]); + else + ok = false; + } + + if(ok && (argc == 2 || argc == 3) && CanbeInt(argv[0]) && CanbeFloat(argv[1])) { + // get frame index + ix = GetAInt(argv[0]); + // get value + val = GetAFloat(argv[1]); + } + else + ok = false; + + if(ok) { + // correct syntax, set sample and trigger display + (*buf)[ix] = val; + buf->Dirty(true); + } + else + post("%s (%s) - syntax error - use \"poke index value [channel]\"",thisName(),GetString(thisTag())); +} + +void buffer1::m_peek(int argc,const t_atom *argv) +{ + // if buffer is invalid bail out + if(!Check()) return; + + bool ok = true; + int ix,chn = 0; + + if(argc == 2) { + if(CanbeInt(argv[1])) + // get channel index + chn = GetAInt(argv[1]); + else + ok = false; + } + + if(ok && (argc == 1 || argc == 2) && CanbeInt(argv[0])) { + // get frame index + ix = GetAInt(argv[0]); + } + else + ok = false; + + if(ok) + // correct syntax, output value + ToOutFloat(0,(*buf)[ix]); + else + post("%s (%s) - syntax error - use \"peek index [channel]\"",thisName(),GetString(thisTag())); +} + + + + diff --git a/externals/grill/trunk/flext/tutorial/buffer1/package.txt b/externals/grill/trunk/flext/tutorial/buffer1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..2e8fceec204b584a196e8f882bc0bc47d38a6e31 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/buffer1/package.txt @@ -0,0 +1,2 @@ +NAME=buffer1 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/build.bat b/externals/grill/trunk/flext/tutorial/build.bat new file mode 100644 index 0000000000000000000000000000000000000000..431454d4b362608b98ea09a3b20f27dacc6309c9 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/build.bat @@ -0,0 +1,32 @@ +@echo off + +if "%1"=="" goto syntax +if "%2"=="" goto syntax + +rem first check configuration +call ..\build.bat %1 %2 config "PKGINFO=" "NAME=tutorial" "SRCS=." +if errorlevel 1 goto end + +for /D %%i in (*) do ( + pushd %%i + if exist package.txt ( + call ..\..\build.bat %1 %2 + ) + popd +) + +goto end + +rem ----------------------------------------- +:syntax + +echo . +echo SYNTAX: build [system] [compiler] +echo system ... pd / max +echo compiler ... msvc / gcc / mingw / cygwin / bcc / icc +echo . +echo Please make sure that your make program and compiler can be accessed with the +echo system path and that all relevant environment variables are properly set. +echo . + +:end diff --git a/externals/grill/trunk/flext/tutorial/build.sh b/externals/grill/trunk/flext/tutorial/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..6ea19cb19ef22e25d85bd08a3a23d0492f3d6136 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/build.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +if + [ -n "$1" -a -n "$2" ] +then + # make config first + if + bash ../build.sh $1 $2 config "PKGINFO=" "NAME=tutorial" "SRCS=\"\"" + then + for i in * ; do + if [ -e $i/package.txt ] ; then + pushd $i + bash ../../build.sh $1 $2 + popd + fi + done + fi +else + echo + echo SYNTAX: build.sh [platform] [system] [compiler] + echo system ..... pd / max + echo compiler ... msvc / gcc / mingw / cygwin / bcc / icc + echo + echo Please make sure that your make program and compiler can be accessed with the + echo system path and that all relevant environment variables are properly set. + echo +fi diff --git a/externals/grill/trunk/flext/tutorial/gpl.txt b/externals/grill/trunk/flext/tutorial/gpl.txt new file mode 100644 index 0000000000000000000000000000000000000000..5ea29a7df45b73059f49c2c5c2ac65a134aa0808 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/gpl.txt @@ -0,0 +1,346 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + diff --git a/externals/grill/trunk/flext/tutorial/lib1/Makefile.am b/externals/grill/trunk/flext/tutorial/lib1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..6083365d620a1b406ec3153d09af8eec40b80575 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/lib1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = lib1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/lib1/lib1.mcp b/externals/grill/trunk/flext/tutorial/lib1/lib1.mcp new file mode 100755 index 0000000000000000000000000000000000000000..afa029c5dc6a335e1f861be10acb325c6f5bcf87 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/lib1/lib1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/lib1/lib1.vcproj b/externals/grill/trunk/flext/tutorial/lib1/lib1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..3c71315144f67165527ee4e4cfdc36e468b43f9c --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/lib1/lib1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="lib1" + SccProjectName="lib1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/lib1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/lib1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/lib1.pdb" + ImportLibrary=".\msvc-debug/lib1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/lib1.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/lib1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/lib1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/lib1.pdb" + ImportLibrary=".\msvc/lib1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/lib1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/lib1/main.cpp b/externals/grill/trunk/flext/tutorial/lib1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e90c154d52413137cc2a4e972d3efefadf8cc765 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/lib1/main.cpp @@ -0,0 +1,132 @@ +/* +flext tutorial - library 1 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This is an example of an external library containing a few simple objects + +It uses attributes, so be sure that you've already worked through attr1 and attr2 + +*/ + +// Enable attribute processing +// For clarity, this is done here, but you'd better specify it as a compiler definition +#define FLEXT_ATTRIBUTES 1 + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +// ------------------------------------------------------------------------------------- +// Define the base class +// Note that you don't have to instantiate the base class (with FLEXT_NEW or variants) + +class libbase: + // inherit from basic flext class + public flext_base +{ + // obligatory flext header (class name,base class name) + FLEXT_HEADER(libbase,flext_base) + +public: + // constructor + libbase(); + +protected: + void Output(float f) const { ToOutFloat(0,f); } + + // method for floats into left inlet + virtual void m_trigger(float f) = 0; + + float arg; // argument variable +private: + FLEXT_CALLBACK_F(m_trigger) // callback for method "m_trigger" (with one float argument) + FLEXT_ATTRVAR_F(arg) +}; + +libbase::libbase(): + arg(0) // initialize argument +{ + // define inlets: + // first inlet must always by of type anything (or signal for dsp objects) + AddInAnything(); // add one inlet for any message + + // define outlets: + AddOutFloat(); // add one float outlet (has index 0) + + // register methods + FLEXT_ADDMETHOD(0,m_trigger); // register method (for float messages) "m_float" for inlet 0 + + // register attributes + FLEXT_ADDATTR_VAR1("arg",arg); // register attribute "arg" +} + + +// ------------------------------------------------------------------ +// Define the actual library objects (derived from the base class) +// These classes have an implementation of the virtual function m_trigger + +class libadd: + public libbase +{ + // obligatory flext header, inherit from libbase + FLEXT_HEADER(libadd,libbase) +public: + virtual void m_trigger(float f) { Output(f+arg); } +}; + +FLEXT_LIB("lib1.+",libadd); + + + +class libsub: + public libbase +{ + // obligatory flext header, inherit from libbase + FLEXT_HEADER(libsub,libbase) +public: + virtual void m_trigger(float f) { Output(f-arg); } +}; + +FLEXT_LIB("lib1.-",libsub); + + + +class libmul: + public libbase +{ + // obligatory flext header, inherit from libbase + FLEXT_HEADER(libmul,libbase) +public: + virtual void m_trigger(float f) { Output(f*arg); } +}; + +FLEXT_LIB("lib1.*",libmul); + + +// ------------------------------------------------ +// Do the library setup + +static void lib_setup() +{ + post("flext tutorial lib1, (C)2002 Thomas Grill"); + post("lib1: lib1.+ lib1.- lib1.*"); + post(""); + + // call the objects' setup routines + FLEXT_SETUP(libadd); + FLEXT_SETUP(libsub); + FLEXT_SETUP(libmul); +} + +// setup the library +FLEXT_LIB_SETUP(lib1,lib_setup) diff --git a/externals/grill/trunk/flext/tutorial/lib1/package.txt b/externals/grill/trunk/flext/tutorial/lib1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..1a60aa126c561b1cdef414d8a2803710fcd035b5 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/lib1/package.txt @@ -0,0 +1,2 @@ +NAME=lib1 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/license.txt b/externals/grill/trunk/flext/tutorial/license.txt new file mode 100644 index 0000000000000000000000000000000000000000..d48095bd701aef4c09863865b87d0b1e99f726bf --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/license.txt @@ -0,0 +1,50 @@ +flext - C++ layer for Max/MSP and pd (pure data) externals +Copyright (C) 2001-2006 Thomas Grill + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +In the official flext distribution, the GNU General Public License is +in the file gpl.txt + +--------------------------------------------------------- + + OTHER COPYRIGHT NOTICES + +--------------------------------------------------------- +This package uses a lot of code from GEM by Mark Danks + +See the license text below: + +--- GEM -------------------------------------- +GEM - Graphics Environment for Multimedia +Copyright (C) 1997-2000 Mark Danks + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +In the official GEM distribution, the GNU General Public License is +in the file GnuGPL.LICENSE + diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/Makefile.am b/externals/grill/trunk/flext/tutorial/maxmsp/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..63406221370f92e4027c7ed999fdb83df58a72b9 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/maxmsp/Makefile.am @@ -0,0 +1,6 @@ +# +# automake template +# added by tim blechmann +# + +EXTRA_DIST = *.pat \ No newline at end of file diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv1.pat new file mode 100644 index 0000000000000000000000000000000000000000..f086ab57ab3d25dae4724747b42c2c90c2dff7e0 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv2.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv2.pat new file mode 100644 index 0000000000000000000000000000000000000000..b6aa006523b8f52a09b29a863c09ebb6338ce7c3 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv2.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv3.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv3.pat new file mode 100644 index 0000000000000000000000000000000000000000..1f0412572c3024f2f65894a7af8bc5298df420c1 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-adv3.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr1.pat new file mode 100644 index 0000000000000000000000000000000000000000..5dc46f10698aff9960f5cf2b7f4723dd6d19b28c Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr2.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr2.pat new file mode 100644 index 0000000000000000000000000000000000000000..aab02c9285aaa0cfa32dad2920d961133c2506cc Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr2.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr3.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr3.pat new file mode 100644 index 0000000000000000000000000000000000000000..7ef7292f82124bdd67789eca98ed94bc805cbf9e Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-attr3.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-bind1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-bind1.pat new file mode 100644 index 0000000000000000000000000000000000000000..96421f2db3e5431b3690a5ce3e96241193166a6c Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-bind1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-buffer1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-buffer1.pat new file mode 100644 index 0000000000000000000000000000000000000000..979774ac265aaa9110adba7dc53b5cd5004a0a7b Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-buffer1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-lib1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-lib1.pat new file mode 100644 index 0000000000000000000000000000000000000000..26f65f2b34b2460eeea3c4a00b448ced254fcb50 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-lib1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-signal1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-signal1.pat new file mode 100644 index 0000000000000000000000000000000000000000..aa50e2e39510927f7f56eb106434110167a4ae20 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-signal1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-signal2.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-signal2.pat new file mode 100644 index 0000000000000000000000000000000000000000..21c12f8827ac75ad84d092b74f85f9ad53276acc Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-signal2.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple1.pat new file mode 100644 index 0000000000000000000000000000000000000000..133eefe98786a1fdc072300aba32b6ff57475e6a Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple2.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple2.pat new file mode 100644 index 0000000000000000000000000000000000000000..acc7474448ec1d49f8420a3d1dc46ea118b12818 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple2.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple3.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple3.pat new file mode 100644 index 0000000000000000000000000000000000000000..7dda678c1ecb0ec43b12249b4fb0fc39370f9028 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-simple3.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-thread1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-thread1.pat new file mode 100644 index 0000000000000000000000000000000000000000..cd204b4a329d5c45427e0c68753b044534eb68cf Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-thread1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-thread2.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-thread2.pat new file mode 100644 index 0000000000000000000000000000000000000000..d68690c4e68880394b2cfc8952b43b64df0857ee Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-thread2.pat differ diff --git a/externals/grill/trunk/flext/tutorial/maxmsp/ex-timer1.pat b/externals/grill/trunk/flext/tutorial/maxmsp/ex-timer1.pat new file mode 100644 index 0000000000000000000000000000000000000000..d3828986a3340bb7e7e37e8ed66ab3712c0f3261 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/maxmsp/ex-timer1.pat differ diff --git a/externals/grill/trunk/flext/tutorial/pd/Makefile.am b/externals/grill/trunk/flext/tutorial/pd/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..d2f5ad4d3a7fbc366ea532763bd6bd8679146eb9 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/Makefile.am @@ -0,0 +1,6 @@ +# +# automake template +# added by tim blechmann +# + +EXTRA_DIST = *.pd \ No newline at end of file diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-adv1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-adv1.pd new file mode 100644 index 0000000000000000000000000000000000000000..8dd10bc1038e82fcd93ff0e5cfaca79a7a244e4a --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-adv1.pd @@ -0,0 +1,23 @@ +#N canvas 46 58 592 347 12; +#X msg 34 92 or two words; +#X msg 169 93 2 3; +#X msg 48 291 one or two words; +#X obj 72 213 print result; +#X obj 49 172 adv1 one; +#X obj 48 263 prepend set; +#X text 162 257 you can also use "prepend"; +#X obj 16 8 cnv 15 550 40 empty empty adv1 10 22 0 24 -260818 -1 0 +; +#X text 175 28 http://grrrr.org; +#X text 199 214 watch the console!; +#X text 210 110 send the object various messages; +#X text 160 274 (if adv1 has already been loaded); +#X text 145 10 flext tutorial \, (C)2002-2006 Thomas Grill; +#X obj 66 127 nbx 3 18 0 100 0 0 empty empty empty 0 -6 0 14 -262144 +-1 -1 24 256; +#X connect 0 0 4 0; +#X connect 1 0 4 0; +#X connect 4 0 3 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X connect 13 0 4 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-adv2.pd b/externals/grill/trunk/flext/tutorial/pd/ex-adv2.pd new file mode 100644 index 0000000000000000000000000000000000000000..b4fa1ce46f84176eaf88e31884b925de1263a024 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-adv2.pd @@ -0,0 +1,23 @@ +#N canvas 329 97 595 356 12; +#X msg 26 97 help; +#X msg 123 146 born; +#X msg 172 147 to; +#X msg 214 149 hula; +#X msg 228 192 hula 1; +#X text 261 150 tag without argument; +#X text 297 190 tag and argument; +#X text 72 97 print a help message; +#X obj 16 7 cnv 15 550 40 empty empty adv2 10 22 0 24 -260818 -1 0 +; +#X text 146 27 http://grrrr.org; +#X obj 148 293 adv2; +#X text 21 49 this is identical to the simple3 example; +#X text 145 9 flext tutorial \, (C)2002-2006 Thomas Grill; +#X text 345 231 symbol message; +#X msg 228 230 symbol yeah; +#X connect 0 0 10 0; +#X connect 1 0 10 0; +#X connect 2 0 10 0; +#X connect 3 0 10 0; +#X connect 4 0 10 0; +#X connect 14 0 10 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-adv3.pd b/externals/grill/trunk/flext/tutorial/pd/ex-adv3.pd new file mode 100644 index 0000000000000000000000000000000000000000..0fdfc735b8ed7081abe79eee5a8f672274a6d188 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-adv3.pd @@ -0,0 +1,40 @@ +#N canvas 175 139 603 361 12; +#X obj 16 7 cnv 15 550 40 empty empty adv3 10 22 0 24 -260818 -1 0 +; +#X text 174 28 http://grrrr.org; +#X obj 229 266 adv3 2 5 1; +#X obj 305 303 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 223 300 nbx 5 18 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 2 256; +#X msg 269 130 1 10; +#X msg 389 128 1; +#X msg 429 128 -1; +#X msg 469 128 2; +#X obj 88 129 bng 25 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 +-1; +#X msg 317 130 7 2; +#X text 325 300 end has been reached; +#X obj 157 127 nbx 5 18 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 25 256; +#X msg 158 150 set \$1; +#X text 72 108 trigger; +#X text 147 108 set counter; +#X text 264 109 set bounds; +#X text 390 106 set step size; +#X msg 80 196 reset; +#X text 83 176 reset; +#X text 174 8 flext tutorial \, (C)2002-2006 Thomas Grill; +#X text 21 49 this is a port of IOhannes Zmoelnigs "counter" example +; +#X connect 2 0 4 0; +#X connect 2 1 3 0; +#X connect 5 0 2 1; +#X connect 6 0 2 2; +#X connect 7 0 2 2; +#X connect 8 0 2 2; +#X connect 9 0 2 0; +#X connect 10 0 2 1; +#X connect 12 0 13 0; +#X connect 13 0 2 0; +#X connect 18 0 2 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-attr1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-attr1.pd new file mode 100644 index 0000000000000000000000000000000000000000..27ab0bb6a4d46213265dd67b60087302dde8fd3f --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-attr1.pd @@ -0,0 +1,31 @@ +#N canvas 70 150 694 465 12; +#X obj 59 296 attr1 @arg 3; +#X text 114 273 attribute as a creation arg; +#X msg 160 98 getattributes; +#X text 167 319 there is one additional outlet; +#X text 167 334 for all attribute-enabled objects; +#X obj 150 367 print; +#X msg 160 141 getarg; +#X text 12 92 trigger output; +#X msg 160 203 arg \$1; +#X text 230 191 set attribute "arg"; +#X text 295 98 query object attributes (watch console); +#X text 228 142 query attribute "arg" (watch console); +#X obj 16 8 cnv 15 550 40 empty empty attr1 10 22 0 24 -260818 -1 0 +; +#X text 175 28 http://grrrr.org; +#X text 26 388 result; +#X obj 23 114 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 29 370 nbx 7 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 12 +-228992 -1 -1 0 256; +#X obj 161 181 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X text 175 10 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 0 0 16 0; +#X connect 0 1 5 0; +#X connect 2 0 0 0; +#X connect 6 0 0 0; +#X connect 8 0 0 0; +#X connect 15 0 0 0; +#X connect 17 0 8 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-attr2.pd b/externals/grill/trunk/flext/tutorial/pd/ex-attr2.pd new file mode 100644 index 0000000000000000000000000000000000000000..4e377725d2225db7bf8b5780937b24129895f2d7 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-attr2.pd @@ -0,0 +1,47 @@ +#N canvas 364 29 620 426 12; +#X msg 22 88 getattributes; +#X text 264 326 there is one additional outlet; +#X text 264 341 for all attribute-enabled objects; +#X obj 246 365 print; +#X msg 22 124 getarg; +#X text 14 218 trigger output; +#X msg 270 263 arg \$1; +#X text 159 87 query object attributes (watch console); +#X msg 95 124 getop; +#X obj 158 306 attr2 @op +; +#X text 251 124 query attributes; +#X text 332 179 set attributes; +#X msg 168 169 op +; +#X msg 167 194 op -; +#X msg 218 169 op *; +#X msg 268 193 op **; +#X msg 268 169 op =; +#X msg 218 193 op /; +#X msg 157 124 getresult; +#X obj 16 8 cnv 15 550 40 empty empty attr2 10 22 0 24 -260818 -1 0 +; +#X text 173 28 http://grrrr.org; +#X text 90 367 result; +#X obj 22 240 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 270 242 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 150 367 nbx 7 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 12 +-228992 -1 -1 0 256; +#X text 171 10 flext tutorial \, (C)2002-2006 Thomas Grill; +#X text 327 243 set argument; +#X connect 0 0 9 0; +#X connect 4 0 9 0; +#X connect 6 0 9 0; +#X connect 8 0 9 0; +#X connect 9 0 24 0; +#X connect 9 1 3 0; +#X connect 12 0 9 0; +#X connect 13 0 9 0; +#X connect 14 0 9 0; +#X connect 15 0 9 0; +#X connect 16 0 9 0; +#X connect 17 0 9 0; +#X connect 18 0 9 0; +#X connect 22 0 9 0; +#X connect 23 0 6 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-attr3.pd b/externals/grill/trunk/flext/tutorial/pd/ex-attr3.pd new file mode 100644 index 0000000000000000000000000000000000000000..b2832c18700290d2d80b351a9deaca9f7ef08395 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-attr3.pd @@ -0,0 +1,60 @@ +#N canvas 175 139 607 457 12; +#X obj 16 7 cnv 15 550 40 empty empty attr3 10 22 0 24 -260818 -1 0 +; +#X text 174 28 http://grrrr.org; +#X obj 293 364 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 196 361 nbx 5 18 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 12 +-228992 -1 -1 2 256; +#X msg 296 126 1 10; +#X msg 419 127 1; +#X msg 459 127 -1; +#X msg 498 127 2; +#X obj 36 128 bng 25 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 +-1; +#X msg 344 126 7 2; +#X obj 173 119 nbx 5 18 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 12 +-228992 -1 -1 20 256; +#X msg 174 142 set \$1; +#X text 20 107 trigger; +#X text 163 100 set counter; +#X text 291 105 set bounds; +#X text 420 105 set step size; +#X msg 97 135 reset; +#X text 100 115 reset; +#X text 21 64 with attributes; +#X obj 197 327 attr3 @bounds 2 5 @step 1; +#X msg 32 195 getattributes; +#X obj 392 363 print; +#X text 385 381 attributes; +#X msg 32 237 getcount; +#X msg 388 232 getstep; +#X text 22 178 list all attributes; +#X msg 32 266 count 3; +#X text 117 238 get count; +#X text 112 266 set count; +#X msg 387 259 step 3; +#X text 21 49 this is a port of IOhannes Zmoelnigs "counter" example +; +#X msg 258 234 getbounds; +#X msg 257 261 bounds 5 15; +#X text 174 8 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 4 0 19 1; +#X connect 5 0 19 2; +#X connect 6 0 19 2; +#X connect 7 0 19 2; +#X connect 8 0 19 0; +#X connect 9 0 19 1; +#X connect 10 0 11 0; +#X connect 11 0 19 0; +#X connect 16 0 19 0; +#X connect 19 0 3 0; +#X connect 19 1 2 0; +#X connect 19 2 21 0; +#X connect 20 0 19 0; +#X connect 23 0 19 0; +#X connect 24 0 19 0; +#X connect 26 0 19 0; +#X connect 29 0 19 0; +#X connect 31 0 19 0; +#X connect 32 0 19 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-bind1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-bind1.pd new file mode 100644 index 0000000000000000000000000000000000000000..355b97e88b9c588872b84f1eb645fade0a4d4f87 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-bind1.pd @@ -0,0 +1,55 @@ +#N canvas 405 36 626 400 12; +#X obj 15 8 cnv 15 550 40 empty empty bind1 10 22 0 24 -260818 -1 0 +; +#X text 175 28 http://grrrr.org; +#X text 175 8 flext tutorial \, (C)2002-2006 Thomas Grill; +#X obj 14 330 bind1; +#X text 48 72 bind object to symbol; +#X msg 50 94 bind sym1; +#X msg 174 94 bind sym2; +#X msg 48 126 unbind sym1; +#X msg 173 125 unbind sym2; +#X text 43 159 bind object to symbol; +#X msg 45 181 bindmethod sym1; +#X msg 47 213 unbindmethod sym1; +#X msg 227 181 bindmethod sym2; +#X msg 230 212 unbindmethod sym2; +#X obj 13 359 print OUT; +#X text 109 358 watch the console!; +#X obj 351 103 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262131 -1 -1 0 256; +#X obj 446 103 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262131 -1 -1 0 256; +#X msg 351 122 test \$1; +#X msg 446 122 test \$1; +#X msg 521 100 1 2 3; +#X obj 351 155 s sym1; +#X obj 446 155 s sym2; +#X text 349 67 send message to bound; +#X text 350 81 object or method; +#X obj 345 272 r sym3; +#X text 344 250 receive forwarded message; +#X obj 347 299 print MSG; +#X text 47 258 receive forwarded message; +#X msg 48 279 sym3 myforward; +#X obj 202 280 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262131 -1 -1 0 256; +#X msg 201 297 sym3 \$1; +#X connect 3 0 14 0; +#X connect 5 0 3 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X connect 10 0 3 0; +#X connect 11 0 3 0; +#X connect 12 0 3 0; +#X connect 13 0 3 0; +#X connect 16 0 18 0; +#X connect 17 0 19 0; +#X connect 18 0 21 0; +#X connect 19 0 22 0; +#X connect 20 0 22 0; +#X connect 25 0 27 0; +#X connect 29 0 3 1; +#X connect 30 0 31 0; +#X connect 31 0 3 1; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-buffer1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-buffer1.pd new file mode 100644 index 0000000000000000000000000000000000000000..09d0655a5328704437aaf3552ec2438ae0e50f53 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-buffer1.pd @@ -0,0 +1,121 @@ +#N canvas 94 140 763 489 12; +#X obj 11 -12 cnv 15 550 40 empty empty buffer1 10 22 0 24 -260818 +-1 0; +#X text 178 8 http://grrrr.org; +#X text 178 -12 flext tutorial \, (C)2002-2006 Thomas Grill; +#N canvas 0 22 450 300 graph1 0; +#X array buf1 1000 float 1; +#A 0 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 +-0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 +-0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 +-0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 +-0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 +-0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 +-0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 -0.0142856 +-0.0142856 -0.0142856 -0.0114285 -0.00857134 -0.00571423 -0.00285711 +5.58794e-10 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 +-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 +-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 +-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 +-0 -0 0.51 0.51 0 0 0 0 0 0 0 0 0 0 0 0 0 0.51 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 -0 -0 0.51 0.51 -5.58794e-10 0.00285711 0.00571423 0.00857134 +0.0114285 0.0142856 0.0166665 0.0190474 0.0214283 0.0238093 0.0261902 +0.0285711 0.030952 0.033333 0.0357139 0.51 0.0404758 0.51 0.0452376 +0.0476185 0.0499995 0.0523804 0.0547613 0.0571422 0.0595232 0.0619041 +0.064285 0.0666659 0.0690469 0.51 0.0738087 0.0761897 0.0785706 0.0809515 +0.0833325 0.0857134 0.0857134 0.0857134 0.0857134 0.0857134 0.0857134 +0.51 0.0799992 0.51 0.0742849 0.0571423 0 0 0 0 0.51 0 0 0 0 0 0 0 +0 0 0.51 0 0 0 0 0 0.51 0 0 0 0 0 0.51 0 0.51 0 0 0.51 0 0 0.51 0 0.51 +0 0.51 0.51 0 0.51 0.51 0 0 0 0 0 0.51 0 0 0 0 0 0.51 0 0 0.51 0 0 +0 0 0 0.51 0 0 0 0 0 0 0 0.51 0 0 0 0 0 0 0 0.51 0 0 0 0 0.51 0 0 0 +0 0 0 0.51 0 0 0 0 0 0 0 0 0 0 0.51 0 0 0 0 0 0 0 0 0.51 0.51 0 0 0.51 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0.00357139 0.00714278 0.0107142 +0.0142856 0.0171427 0.0199998 0.0228569 0.025714 0.0285711 0.0314283 +0.0342854 0.0371425 0.0399996 0.0428567 0.0457138 0.0485709 0.051428 +0.0542852 0.0571423 0.0599994 0.0628565 0.0657136 0.0685707 0.0714278 +0.0728564 0.0742849 0.0757135 0.077142 0.0785706 0.0799991 0.0814277 +0.0828563 0.0842848 0.0857134 0.0857134 0.0857134 0.0857134 0.0857134 +0.0857134 0.0857134 0.0857134 0.0857134 0.0857134 0.0857134 0.0857134 +0.0857134 0.0857134 0.0857134 0.0857134 0.0828563 0.0799992 0.077142 +0.0742849 0.0714278 0.0714278 0.0714278 0.0714278 0.0714278 0.0714278 +0.0714278 0.0714278 0.0714278 0.0714278 0.0714278 0.0685707 0.0657136 +0.0628565 0.0599994 0.0571423 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0; +#X coords 0 1 999 -1 200 140 1; +#X restore 539 49 graph; +#N canvas 0 22 450 300 graph1 0; +#X array buf2 300 float 1; +#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; +#X coords 0 1 299 -1 200 140 1; +#X restore 539 194 graph; +#X obj 24 406 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262131 -1 -1 1.06 256; +#X text 19 423 peek value; +#X obj 137 400 print A; +#X text 137 421 print attributes to the console; +#X msg 41 46 set; +#X msg 65 98 set buf1; +#X msg 154 98 buffer buf2; +#X msg 65 129 getbuffer; +#X text 164 129 query current buffer; +#X text 73 43 set no buffer; +#X text 68 78 set buffer; +#X msg 84 185 frames 1000; +#X msg 85 213 getframes; +#X text 199 185 set buffer length; +#X text 184 213 query buffer length; +#X msg 16 265 getchannels; +#X text 23 290 always 1 for PD!; +#X obj 231 281 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262131 -1 -1 13 256; +#X obj 336 281 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262131 -1 -1 91 256; +#X obj 394 281 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262131 -1 -1 0.51 256; +#X obj 334 304 pack 0 0; +#X msg 335 331 poke \$1 \$2 0; +#X msg 230 331 peek \$1 0; +#X text 230 258 get sample; +#X text 338 258 set sample; +#X text 348 363 the change is not immediately seen on PD; +#X text 350 376 (you'll have to draw in the window); +#X obj 24 368 buffer1; +#X connect 9 0 32 0; +#X connect 10 0 32 0; +#X connect 11 0 32 0; +#X connect 12 0 32 0; +#X connect 16 0 32 0; +#X connect 17 0 32 0; +#X connect 20 0 32 0; +#X connect 22 0 27 0; +#X connect 23 0 25 0; +#X connect 24 0 25 1; +#X connect 25 0 26 0; +#X connect 26 0 32 0; +#X connect 27 0 32 0; +#X connect 32 0 5 0; +#X connect 32 1 7 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-lib1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-lib1.pd new file mode 100644 index 0000000000000000000000000000000000000000..1f1390b2562cf0dc83369d96a72068303398fb9b --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-lib1.pd @@ -0,0 +1,51 @@ +#N canvas 120 205 580 295 12; +#X msg 102 172 arg \$1; +#X obj 30 208 lib1.+ @arg 3; +#X text 101 124 set arg; +#X msg 285 171 arg \$1; +#X text 284 125 set arg; +#X msg 472 174 arg \$1; +#X text 471 128 set arg; +#X obj 392 212 lib1.* @arg 2; +#X obj 210 210 lib1.- @arg 7; +#X text 25 123 trigger; +#X text 207 127 trigger; +#X text 391 128 trigger; +#X obj 16 8 cnv 15 550 40 empty empty lib1 10 22 0 24 -260818 -1 0 +; +#X text 173 28 http://grrrr.org; +#X obj 30 147 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 101 146 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 212 147 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 284 149 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 394 149 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 472 152 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X obj 30 241 nbx 7 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 12 +-228992 -1 -1 0 256; +#X obj 210 241 nbx 7 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 12 +-228992 -1 -1 0 256; +#X obj 392 241 nbx 7 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 12 +-228992 -1 -1 0 256; +#X text 25 56 In order to use the objects the library must have been +; +#X text 26 74 loaded at PD startup (with the "-lib lib1" argument) +; +#X text 173 8 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 0 0 1 0; +#X connect 1 0 20 0; +#X connect 3 0 8 0; +#X connect 5 0 7 0; +#X connect 7 0 22 0; +#X connect 8 0 21 0; +#X connect 14 0 1 0; +#X connect 15 0 0 0; +#X connect 16 0 8 0; +#X connect 17 0 3 0; +#X connect 18 0 7 0; +#X connect 19 0 5 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-signal1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-signal1.pd new file mode 100644 index 0000000000000000000000000000000000000000..45b9a94c9c7eb075ff0225b4e04568e2aad14d09 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-signal1.pd @@ -0,0 +1,27 @@ +#N canvas 335 232 586 291 12; +#X obj 250 121 hsl 128 15 0 1 0 0 empty empty empty 20 8 0 8 -261681 +-1 -1 0 1; +#X obj 28 121 osc~ 440; +#X obj 87 248 dac~; +#X obj 123 121 osc~ 880; +#X obj 97 175 signal1~; +#X obj 16 8 cnv 15 550 40 empty empty signal1 10 22 0 24 -260818 -1 +0; +#X text 175 28 http://grrrr.org; +#X text 342 138 control the mixing; +#X text 166 210 adjust the volume; +#X obj 97 209 *~ 0.5; +#X text 25 102 source 1; +#X text 125 101 source 2; +#X obj 248 143 nbx 5 16 0 1 0 0 empty empty empty 0 -6 0 12 -261681 +-1 -1 0 256; +#X text 175 8 flext tutorial \, (C)2002-2006 Thomas Grill; +#X text 21 51 this is a port of IOhannes Zmoelnigs pan~ example; +#X text 21 66 done by Frank Barknecht; +#X connect 0 0 12 0; +#X connect 1 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 9 0; +#X connect 9 0 2 0; +#X connect 9 0 2 1; +#X connect 12 0 4 2; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-signal2.pd b/externals/grill/trunk/flext/tutorial/pd/ex-signal2.pd new file mode 100644 index 0000000000000000000000000000000000000000..750828a04cbfd53ab1b7c4fbe177b1fe6b2d96a2 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-signal2.pd @@ -0,0 +1,25 @@ +#N canvas 41 125 585 250 12; +#X obj 109 126 signal2~; +#X obj 104 81 bng 25 250 50 0 empty empty empty 0 -6 0 8 -261681 -1 +-1; +#X text 136 87 bang to get audio system parameters; +#X text 261 205 channels in and out; +#X obj 16 8 cnv 15 550 40 empty empty signal2 10 22 0 24 -260818 -1 +0; +#X text 175 28 http://grrrr.org; +#X obj 66 184 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 158 184 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 261 184 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 353 184 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X text 40 204 samplerate; +#X text 156 204 blocksize; +#X text 173 10 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 0 0 6 0; +#X connect 0 1 7 0; +#X connect 0 2 8 0; +#X connect 0 3 9 0; +#X connect 1 0 0 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-simple1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-simple1.pd new file mode 100644 index 0000000000000000000000000000000000000000..271afd0b73f7f3be7bf89dcbcd5176ccbfbfe0d7 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-simple1.pd @@ -0,0 +1,12 @@ +#N canvas 85 178 594 230 12; +#X obj 40 129 simple1; +#X obj 16 8 cnv 15 550 40 empty empty simple1 10 22 0 24 -260818 -1 +0; +#X text 167 30 http://grrrr.org; +#X obj 41 94 nbx 4 16 -999 999 0 0 empty empty input 0 -6 0 12 -261681 +-1 -1 35 256; +#X obj 39 171 nbx 7 16 -1e+37 1e+37 0 0 empty empty inverse 0 -6 0 +12 -228992 -1 -1 0.0285714 256; +#X text 167 10 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 0 0 4 0; +#X connect 3 0 0 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-simple2.pd b/externals/grill/trunk/flext/tutorial/pd/ex-simple2.pd new file mode 100644 index 0000000000000000000000000000000000000000..c379cd5b6e919a1a75f05ee767716709577dfdec --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-simple2.pd @@ -0,0 +1,16 @@ +#N canvas 72 265 599 317 12; +#X obj 42 196 simple2 3; +#X text 121 177 default argument; +#X obj 16 8 cnv 15 550 40 empty empty simple2 10 22 0 24 -260818 -1 +0; +#X text 167 29 http://grrrr.org; +#X obj 41 110 nbx 4 16 -999 999 0 0 empty empty triggering 0 -6 0 12 +-261681 -1 -1 0 256; +#X obj 148 110 nbx 4 16 -999 999 0 0 empty empty non-triggering 0 -6 +0 12 -261681 -1 -1 0 256; +#X obj 42 239 nbx 7 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 12 +-228992 -1 -1 0 256; +#X text 167 11 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 0 0 6 0; +#X connect 4 0 0 0; +#X connect 5 0 0 1; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-simple3.pd b/externals/grill/trunk/flext/tutorial/pd/ex-simple3.pd new file mode 100644 index 0000000000000000000000000000000000000000..fbdafca5fb6157c548dc02dc6c20438d17985781 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-simple3.pd @@ -0,0 +1,22 @@ +#N canvas 329 97 593 354 12; +#X msg 22 87 help; +#X msg 119 136 born; +#X msg 168 137 to; +#X msg 210 139 hula; +#X msg 224 182 hula 1; +#X obj 144 283 simple3; +#X text 257 140 tag without argument; +#X text 293 180 tag and argument; +#X text 68 87 print a help message; +#X obj 16 8 cnv 15 550 40 empty empty simple3 10 22 0 24 -260818 -1 +0; +#X text 174 28 http://grrrr.org; +#X text 174 10 flext tutorial \, (C)2002-2006 Thomas Grill; +#X msg 224 220 symbol yeah; +#X text 350 219 symbol message; +#X connect 0 0 5 0; +#X connect 1 0 5 0; +#X connect 2 0 5 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 12 0 5 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-sndobj1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-sndobj1.pd new file mode 100644 index 0000000000000000000000000000000000000000..01ee937c358b2de3c08406fa9cf633037f5ef278 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-sndobj1.pd @@ -0,0 +1,34 @@ +#N canvas 405 36 584 392 12; +#X obj 56 348 dac~; +#X obj 15 8 cnv 15 550 40 empty empty sndobj1 10 22 0 24 -260818 -1 +0; +#X text 175 28 http://grrrr.org; +#X text 170 285 adjust the volume; +#X text 35 97 source; +#X obj 171 268 hsl 128 15 0.01 1 1 0 empty empty empty -2 -6 0 8 -261681 +-1 -1 0 1; +#X msg 160 148 shL \$1; +#X msg 218 148 shR \$1; +#X obj 244 84 hsl 128 15 0.5 2 1 0 empty empty empty -2 -6 0 8 -261681 +-1 -1 0 1; +#X obj 244 104 hsl 128 15 0.5 2 1 0 empty empty empty -2 -6 0 8 -261681 +-1 -1 0 1; +#X text 149 82 pitch left; +#X text 149 102 pitch right; +#X obj 31 119 osc~ 442; +#X obj 32 226 sndobj1~ @shL 0.7 @shR 1.2; +#X obj 32 304 *~ 0.3; +#X obj 91 304 *~ 0.3; +#X text 175 8 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 5 0 14 1; +#X connect 5 0 15 1; +#X connect 6 0 13 0; +#X connect 7 0 13 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X connect 12 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 14 0; +#X connect 13 1 15 0; +#X connect 14 0 0 0; +#X connect 15 0 0 1; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-stk1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-stk1.pd new file mode 100644 index 0000000000000000000000000000000000000000..b61b9833e4479e958116b81c181e9fb680c54919 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-stk1.pd @@ -0,0 +1,15 @@ +#N canvas 237 9 577 257 12; +#X obj 66 186 dac~; +#X obj 15 8 cnv 15 550 40 empty empty stk1 10 22 0 24 -260818 -1 0 +; +#X text 175 28 http://grrrr.org; +#X text 184 118 adjust the volume; +#X obj 185 101 hsl 128 15 0.01 1 1 0 empty empty empty -2 -6 0 8 -261681 +-1 -1 0 1; +#X obj 76 132 *~ 0.3; +#X text 175 8 flext tutorial \, (C)2002-2006 Thomas Grill; +#X obj 76 86 stk1~; +#X connect 4 0 5 1; +#X connect 5 0 0 0; +#X connect 5 0 0 1; +#X connect 7 0 5 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-stk2.pd b/externals/grill/trunk/flext/tutorial/pd/ex-stk2.pd new file mode 100644 index 0000000000000000000000000000000000000000..6ce56330e8add9ee81bf3fe0a5aa89a8052f63c3 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-stk2.pd @@ -0,0 +1,32 @@ +#N canvas 245 28 594 364 12; +#X obj 68 318 dac~; +#X obj 15 8 cnv 15 550 40 empty empty stk2 10 22 0 24 -260818 -1 0 +; +#X text 175 28 http://grrrr.org; +#X text 193 229 adjust the volume; +#X obj 194 212 hsl 128 15 0.01 1 1 0 empty empty empty -2 -6 0 8 -261681 +-1 -1 0 1; +#X obj 68 263 *~ 0.3; +#X text 175 8 flext tutorial \, (C)2002-2006 Thomas Grill; +#X obj 68 215 stk2~; +#X obj 125 263 *~ 0.3; +#X msg 183 139 shL \$1; +#X msg 241 139 shR \$1; +#X obj 267 77 hsl 128 15 0.5 2 1 0 empty empty empty -2 -6 0 8 -261681 +-1 -1 0 1; +#X obj 267 95 hsl 128 15 0.5 2 1 0 empty empty empty -2 -6 0 8 -261681 +-1 -1 0 1; +#X text 172 73 pitch left; +#X text 172 93 pitch right; +#X obj 68 78 osc~ 442; +#X connect 4 0 5 1; +#X connect 4 0 8 1; +#X connect 5 0 0 0; +#X connect 7 0 5 0; +#X connect 7 1 8 0; +#X connect 8 0 0 1; +#X connect 9 0 7 0; +#X connect 10 0 7 0; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 15 0 7 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-thread1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-thread1.pd new file mode 100644 index 0000000000000000000000000000000000000000..38707f44e1d1d62140ae8319707a8aafbf2291a4 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-thread1.pd @@ -0,0 +1,43 @@ +#N canvas 105 266 608 311 12; +#X obj 39 91 bng 25 250 50 0 empty empty start 0 -6 0 8 -261681 -1 +-1; +#X obj 130 231 thread1; +#X obj 228 233 thread1; +#X obj 324 231 thread1; +#X obj 422 232 thread1; +#X obj 131 185 delay 200; +#X obj 228 185 delay 200; +#X obj 325 185 delay 200; +#X obj 421 185 delay 200; +#X text 78 85 click to start; +#X text 126 103 (if you click twice \, the same thread is started a +second time); +#X obj 16 8 cnv 15 550 40 empty empty thread1 10 22 0 24 -260818 -1 +0; +#X text 170 29 http://grrrr.org; +#X obj 131 262 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 229 263 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 323 261 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 423 261 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 39 229 thread1; +#X obj 39 262 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X text 170 11 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 0 0 5 0; +#X connect 0 0 17 0; +#X connect 1 0 13 0; +#X connect 2 0 14 0; +#X connect 3 0 15 0; +#X connect 4 0 16 0; +#X connect 5 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 0 7 0; +#X connect 7 0 3 0; +#X connect 7 0 8 0; +#X connect 8 0 4 0; +#X connect 17 0 18 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-thread2.pd b/externals/grill/trunk/flext/tutorial/pd/ex-thread2.pd new file mode 100644 index 0000000000000000000000000000000000000000..4d72392fd021f1a989f30d64d5b78a7e4c5af351 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-thread2.pd @@ -0,0 +1,47 @@ +#N canvas 116 192 593 338 12; +#X msg 84 188 stop; +#X msg 255 192 stop; +#X obj 199 99 bng 25 250 50 0 empty empty empty 0 -6 0 8 -261681 -1 +-1; +#X obj 291 99 bng 25 250 50 0 empty empty empty 0 -6 0 8 -261681 -1 +-1; +#X text 191 78 start; +#X text 283 77 stop; +#X msg 39 188 0; +#X msg 210 192 0; +#X msg 423 190 stop; +#X msg 378 190 0; +#X obj 404 229 thread2 50; +#X obj 232 229 thread2 15; +#X obj 66 228 thread2 3; +#X msg 133 188 text; +#X msg 302 192 text; +#X msg 470 190 text; +#X obj 16 8 cnv 15 550 40 empty empty thread2 10 22 0 24 -260818 -1 +0; +#X text 173 29 http://grrrr.org; +#X obj 65 264 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 231 265 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X obj 403 267 nbx 5 16 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 +12 -228992 -1 -1 0 256; +#X text 173 11 flext tutorial \, (C)2002-2006 Thomas Grill; +#X connect 0 0 12 0; +#X connect 1 0 11 0; +#X connect 2 0 6 0; +#X connect 2 0 7 0; +#X connect 2 0 9 0; +#X connect 3 0 0 0; +#X connect 3 0 1 0; +#X connect 3 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 11 0; +#X connect 8 0 10 0; +#X connect 9 0 10 0; +#X connect 10 0 20 0; +#X connect 11 0 19 0; +#X connect 12 0 18 0; +#X connect 13 0 12 0; +#X connect 14 0 11 0; +#X connect 15 0 10 0; diff --git a/externals/grill/trunk/flext/tutorial/pd/ex-timer1.pd b/externals/grill/trunk/flext/tutorial/pd/ex-timer1.pd new file mode 100644 index 0000000000000000000000000000000000000000..303d8f2662aa84265a0672bec1bdd6321a03cf68 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/pd/ex-timer1.pd @@ -0,0 +1,62 @@ +#N canvas 110 259 825 368 12; +#X obj 16 8 cnv 15 550 40 empty empty timer1 10 22 0 24 -260818 -1 +0; +#X text 167 30 http://grrrr.org; +#X text 167 10 flext tutorial \, (C)2003-2006 Thomas Grill; +#X obj 241 241 timer1; +#X obj 241 267 print; +#X msg 105 104 resetA; +#X msg 176 104 resetB; +#X msg 260 147 oneshotA \$1; +#X obj 259 124 f 100; +#X obj 303 107 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262144 -1 -1 0 256; +#X obj 260 105 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 +-1; +#X obj 382 124 f 100; +#X obj 426 107 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262144 -1 -1 0 256; +#X obj 383 105 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 +-1; +#X obj 515 124 f 100; +#X obj 559 107 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262144 -1 -1 0 256; +#X obj 516 105 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 +-1; +#X obj 652 123 f 100; +#X obj 696 106 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 +-262144 -1 -1 0 256; +#X obj 653 104 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 +-1; +#X msg 383 147 oneshotB \$1; +#X msg 516 147 periodicA \$1; +#X msg 653 146 periodicB \$1; +#X text 119 82 reset timer; +#X text 275 81 trigger single event; +#X text 523 80 trigger periodic event; +#X msg 30 161 gettime; +#X msg 30 191 getostime; +#X text 106 162 get time; +#X text 127 191 get OS time; +#X connect 3 0 4 0; +#X connect 3 1 4 0; +#X connect 5 0 3 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 7 0; +#X connect 9 0 8 1; +#X connect 10 0 8 0; +#X connect 11 0 20 0; +#X connect 12 0 11 1; +#X connect 13 0 11 0; +#X connect 14 0 21 0; +#X connect 15 0 14 1; +#X connect 16 0 14 0; +#X connect 17 0 22 0; +#X connect 18 0 17 1; +#X connect 19 0 17 0; +#X connect 20 0 3 0; +#X connect 21 0 3 0; +#X connect 22 0 3 0; +#X connect 26 0 3 0; +#X connect 27 0 3 0; diff --git a/externals/grill/trunk/flext/tutorial/readme.txt b/externals/grill/trunk/flext/tutorial/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..beecb20e7edf3188dd8ff72eef2d16db2d9f15bd --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/readme.txt @@ -0,0 +1,77 @@ +flext - C++ layer for Max/MSP and pd (pure data) externals +tutorial examples + +Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +---------------------------------------------------------------------------- + +These are a few examples to demonstrate some flext features. +Contribution of examples to the package is higly appreciated! + +---------------------------------------------------------------------------- + +The recommended order to go through the tutorial examples is the following: + +1) simple* +2) adv* +3) attr* +4) timer* +5) signal* +6) lib* +7) thread* + +and, if needed +8) sndobj* and/or stk* + +if you choose to compile with SndObj support you will need the respective library +download from: http://www.may.ie/academic/music/musictec/SndObj/main.html + +if you choose to compile with STK support you will need the respective package and build a library +download from: http://ccrma-www.stanford.edu/software/stk/ +Under linux you can create such a library from the STK directory with: +"g++ -c -pipe -I include -D __LINUX_OSS__ src/*.cpp && ar r libstk.a *.o && rm -f *.o" + + +---------------------------------------------------------------------------- + +The package should at least compile (and is tested) with the following compilers: + +pd - Windows: +------------- +o Microsoft Visual C++ 6: edit "config-pd-msvc.txt" & run "build-pd-msvc.bat" + +o Borland C++ 5.5 (free): edit "config-pd-bcc.txt" & run "build-pd-bcc.bat" + (no threading support for that compiler!) + +o Cygwin: edit "config-pd-cygwin.txt" & run "sh build-pd-cygwin.sh" + (no threading support for that compiler!) + +pd - linux: +----------- +o GCC: edit "config-pd-linux.txt" & run "sh build-pd-linux.sh" + +pd - MacOSX: +----------- +o GCC: edit "config-pd-darwin.txt" & run "sh build-pd-darwin.sh" + + +Max/MSP - MacOS 9: +------------------ +o Metrowerks CodeWarrior V6: edit & use the several ".cw" project files + +You must have the following "Source Trees" defined: +"flext" - Pointing to the flext main directory +"Cycling74" - Pointing to the Cycling 74 SDK + +Max/MSP - MacOSX: +------------------ +o Metrowerks CodeWarrior V6: edit & use the several ".cw" project files + +You must have the following "Source Trees" defined: +"OS X Volume" - Pointing to your OSX boot drive +"flext" - Pointing to the flext main directory +"Cycling74 OSX" - Pointing to the Cycling 74 SDK for xmax +"MP SDK" - Pointing to the Multiprocessing SDK (for threading support) + diff --git a/externals/grill/trunk/flext/tutorial/signal1/Makefile.am b/externals/grill/trunk/flext/tutorial/signal1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..857be41e5b4091bcd92dcdba97578a27018f8c22 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/signal1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = signal1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/signal1/main.cpp b/externals/grill/trunk/flext/tutorial/signal1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3714e1f660646a262313b4238ea37b68a0a50269 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/signal1/main.cpp @@ -0,0 +1,129 @@ +// signal1~ - a flext tutorial external written by Frank Barknecht +// +// This is a commented port of the pan~ example from the PD-Externals-Howto to +// illustrate the usage of flext. You can get the original code at +// http://iem.kug.ac.at/pd/externals-HOWTO/ + +#include <flext.h> + +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 +#endif + + +// A flext dsp external ("tilde object") inherits from the class flext_dsp +class signal1: + public flext_dsp +{ + // Each external that is written in C++ needs to use #defines + // from flbase.h + // + // The define + // + // FLEXT_HEADER(NEW_CLASS, PARENT_CLASS) + // + // should be somewhere in your dsp file. + // A good place is here: + + FLEXT_HEADER(signal1, flext_dsp) + + public: + signal1(): + f_pan(0) // initialize f_pan + { + // The constructor of your class is responsible for + // setting up inlets and outlets and for registering + // inlet-methods: + // The descriptions of the inlets and outlets are output + // via the Max/MSP assist method (when mousing over them in edit mode). + // PD will hopefully provide such a feature as well soon + + AddInSignal("left audio in"); // left audio in + AddInSignal("right audio in"); // right audio in + AddInFloat("panning parameter"); // 1 float in + AddOutSignal("audio out"); // 1 audio out + + // Now we need to bind the handler function to our + // panning inlet, which is inlet 2 (counting all inlets + // from 0). We want the function "setPan" to get + // called on incoming float messages: + + FLEXT_ADDMETHOD(2,setPan); + + // We're done constructing: + post("-- pan~ with flext ---"); + + } // end of constructor + + + protected: + // here we declare the virtual DSP function + virtual void m_signal(int n, float *const *in, float *const *out); + private: + float f_pan; // holds our panning factor + + // Before we can use "setPan" as a handler, we must register this + // function as a callback to PD or Max. This is done using the + // FLEXT_CALLBACK* macros. There are several of them. + // + // FLEXT_CALLBACK_F is a shortcut, that registers a function + // expecting one float arg (thus ending in "_F"). There are + // other shortcuts that register other types of functions. Look + // into flext.h. No semicolon at the end of line!!! + FLEXT_CALLBACK_F(setPan) + + // Now setPan can get declared and defined here. + void setPan(float f) + { + // set our private panning factor "f_pan" to the inlet + // value float "f" in the intervall [0,1] + f_pan = (f<0) ? 0.0f : (f>1) ? 1.0f : f ; + + // if you want to debug if this worked, comment out the + // following line: + //post("Set panning to %.2f, maybe clipped from %.2f", f_pan,f); + } // end setPan +}; // end of class declaration for signal1 + + +// Before we can run our signal1-class in PD, the object has to be registered as a +// PD object. Otherwise it would be a simple C++-class, and what good would +// that be for? Registering is made easy with the FLEXT_NEW_* macros defined +// in flext.h. For tilde objects without arguments call: + +FLEXT_NEW_DSP("signal1~ pan~", signal1) +// T.Grill: there are two names for the object: signal1~ as main name and pan~ as its alias + +// Now we define our DSP function. It gets this arguments: +// +// int n: length of signal vector. Loop over this for your signal processing. +// float *const *in, float *const *out: +// These are arrays of the signals in the objects signal inlets rsp. +// oulets. We come to that later inside the function. + +void signal1::m_signal(int n, float *const *in, float *const *out) +{ + + const float *ins1 = in[0]; + const float *ins2 = in[1]; + // As said above "in" holds a list of the signal vectors in all inlets. + // After these two lines, ins1 holds the signal vector ofthe first + // inlet, index 0, and ins2 holds the signal vector of the second + // inlet, with index 1. + + float *outs = out[0]; + // Now outs holds the signal vector at the one signal outlet we have. + + // We are now ready for the main signal loop + while (n--) + { + + // The "++" after the pointers outs, ins1 and ins2 walks us + // through the signal vector with each n, of course. Before + // each step we change the signal value in the outlet *outs + // according to our panning factor "f_pan" and according to the + // signals at the two signal inlets, *ins1 and *ins2 + + *outs++ = (*ins1++) * (1-f_pan) + (*ins2++) * f_pan; + } +} // end m_signal diff --git a/externals/grill/trunk/flext/tutorial/signal1/package.txt b/externals/grill/trunk/flext/tutorial/signal1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..b486185890f30f6f91ea39166e0456b755855f93 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/signal1/package.txt @@ -0,0 +1,2 @@ +NAME=signal1~ +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/signal1/signal1.mcp b/externals/grill/trunk/flext/tutorial/signal1/signal1.mcp new file mode 100644 index 0000000000000000000000000000000000000000..32e827710d1f6c13dd097903d8d0fe657ff9d6e6 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/signal1/signal1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/signal1/signal1.vcproj b/externals/grill/trunk/flext/tutorial/signal1/signal1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..136003b77921866e3ff3cc89a0a8ba2d038be510 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/signal1/signal1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="signal1" + SccProjectName="max/flext/tutorial/signal1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/signal1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/signal1~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/signal1~.pdb" + ImportLibrary=".\msvc/signal1~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/signal1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/signal1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile="msvc-debug/signal1~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/signal1~.pdb" + ImportLibrary=".\msvc-debug/signal1~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/signal1.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/signal2/Makefile.am b/externals/grill/trunk/flext/tutorial/signal2/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..6aaf483d5dfc929fd9ad2e4efd220b4a2d6fa0fd --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/signal2/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = signal2 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/signal2/main.cpp b/externals/grill/trunk/flext/tutorial/signal2/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7793bb00ab8593e64d861324f7c0f47b7b0f518d --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/signal2/main.cpp @@ -0,0 +1,69 @@ +/* +flext tutorial - signal 2 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This is an object showing varous parameters of the pd audio system +*/ + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +// define the class that stands for a pd/Max object +// Attention: the class name must be the same as the object name!! (without the ~) + +class signal2: + // inherit from flext dsp class + public flext_dsp +{ + // obligatory flext header (class name,base class name) + FLEXT_HEADER(signal2,flext_dsp) + +public: + // constructor + signal2(); + +protected: + void m_bang(); // method for bang + +private: + FLEXT_CALLBACK(m_bang) // callback for method "m_bang" +}; + +// instantiate the class +FLEXT_NEW_DSP("signal2~",signal2) + + +signal2::signal2() +{ + // define inlets: + // first inlet must always by of type anything (or signal for dsp objects) + AddInAnything(); // add one inlet for any message + + // add outlets for sample rate, block size, audio in and out channel count + AddOutFloat(1); + AddOutInt(3); // although PD knows no int type, flext does! + + // register methods + FLEXT_ADDBANG(0,m_bang); // register method "m_bang" for bang message into inlet 0 +} + +void signal2::m_bang() +{ + // output various parameters of the pd audio system + ToOutFloat(0,Samplerate()); + ToOutInt(1,Blocksize()); + ToOutInt(2,CntInSig()); + ToOutInt(3,CntOutSig()); +} + diff --git a/externals/grill/trunk/flext/tutorial/signal2/package.txt b/externals/grill/trunk/flext/tutorial/signal2/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..a258255c905a5b8f5b55e99cdc14e3afa622081f --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/signal2/package.txt @@ -0,0 +1,2 @@ +NAME=signal2~ +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/signal2/signal2.mcp b/externals/grill/trunk/flext/tutorial/signal2/signal2.mcp new file mode 100644 index 0000000000000000000000000000000000000000..260893e22dae2a9be3ecb858f881a8adfe90e124 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/signal2/signal2.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/signal2/signal2.vcproj b/externals/grill/trunk/flext/tutorial/signal2/signal2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..4923b1a725d52ca72d0363c3819805c4838b275a --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/signal2/signal2.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="signal2" + SccProjectName="max/flext/tutorial/signal2" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/signal2.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile="msvc-debug/signal2~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/signal2~.pdb" + ImportLibrary=".\msvc-debug/signal2~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/signal2.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/signal2.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/signal2~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/signal2~.pdb" + ImportLibrary=".\msvc/signal2~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/signal2.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/simple1/Makefile.am b/externals/grill/trunk/flext/tutorial/simple1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..d918a68deb8c601f31bb693aceff58e605eb7a4c --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = simple1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/simple1/main.cpp b/externals/grill/trunk/flext/tutorial/simple1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed3c3ea310c05a33e0f98eff1c1171eb2ff65c05 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple1/main.cpp @@ -0,0 +1,73 @@ +/* +flext tutorial - simple 1 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This is an example of a simple object doing a float inversion +*/ + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +// define the class that stands for a pd/Max object +// Attention: the class name must be the same as the object name!! (without an eventual ~) +// Special names are possible with the usage of libraries (see the lib1 tutorial example) + +class simple1: + // inherit from basic flext class + public flext_base +{ + // obligatory flext header (class name,base class name) + FLEXT_HEADER(simple1,flext_base) + +public: + // constructor + simple1() + { + // define inlets: + // first inlet must always be of type anything (or signal for dsp objects) + AddInAnything(); // add one inlet for any message + + // define outlets: + AddOutFloat(); // add one float outlet (has index 0) + + // register methods + FLEXT_ADDMETHOD(0,m_float); // register method (for float messages) "m_float" for inlet 0 + } + +protected: + void m_float(float input) // method for float values + { + float result; + + if(input == 0) { + // special case 0 + post("%s - zero can't be inverted!",thisName()); + result = 0; + } + else + // normal case + result = 1/input; + + // output value to outlet + ToOutFloat(0,result); // (0 stands for the outlet index 0 - the leftmost outlet) + } + +private: + FLEXT_CALLBACK_1(m_float,float) // callback for method "m_float" (with one float argument) +}; + +// instantiate the class +FLEXT_NEW("simple1",simple1) + + diff --git a/externals/grill/trunk/flext/tutorial/simple1/package.txt b/externals/grill/trunk/flext/tutorial/simple1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..8a3da41683044734e94ae5ef631a034118f94ed5 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple1/package.txt @@ -0,0 +1,2 @@ +NAME=simple1 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/simple1/simple1.mcp b/externals/grill/trunk/flext/tutorial/simple1/simple1.mcp new file mode 100755 index 0000000000000000000000000000000000000000..6e778ba54d91954ad37e411669fc75ff75e7f182 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/simple1/simple1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/simple1/simple1.vcproj b/externals/grill/trunk/flext/tutorial/simple1/simple1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..e6ad7d68f87212abfadb5208916c9c0981ea3d52 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple1/simple1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="simple1" + SccProjectName="simple1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/simple1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/simple1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/simple1.pdb" + ImportLibrary=".\msvc-debug/simple1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/simple1.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/simple1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/simple1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/simple1.pdb" + ImportLibrary=".\msvc/simple1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/simple1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/simple2/Makefile.am b/externals/grill/trunk/flext/tutorial/simple2/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..696c144bdd8c5558616db7c83e5b0395382fc0cf --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple2/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = simple2 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/simple2/main.cpp b/externals/grill/trunk/flext/tutorial/simple2/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..894ceb47c879aca4cea5eedf98b8757c34617f20 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple2/main.cpp @@ -0,0 +1,77 @@ +/* +flext tutorial - simple 2 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This is an example of a simple object doing a float addition +*/ + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +class simple2: + public flext_base +{ + FLEXT_HEADER(simple2,flext_base) + +public: + // constructor with float argument + simple2(float init); + +protected: + void m_float1(float f); + void m_float2(float f); + + // stored argument of right inlet + float arg; + +private: + // FLEXT_CALLBACK_F(...) is a shortcut for FLEXT_CALLBACK_1(...,float) + FLEXT_CALLBACK_F(m_float1) // callback for method "m_float1" (with one float argument) + FLEXT_CALLBACK_F(m_float2) // callback for method "m_float2" (with one float argument) +}; + +// instantiate the class (constructor has one float argument) +FLEXT_NEW_1("simple2",simple2,float) + + +simple2::simple2(float init): + arg(init) // store argument +{ + // define inlets + AddInAnything(); // first inlet of type anything (index 0) + AddInFloat(); // additional float inlet (index 1) + + // define outlets + AddOutFloat(); // one float outlet (has index 0) + + // register methods + FLEXT_ADDMETHOD(0,m_float1); // register method (for floats) "m_float1" for inlet 0 + FLEXT_ADDMETHOD(1,m_float2); // register method (for floats) "m_float2" for inlet 1 +} + +void simple2::m_float1(float f) +{ + float res; + res = arg+f; + + // output value to outlet + ToOutFloat(0,res); // (0 stands for the outlet index 0) +} + +void simple2::m_float2(float f) +{ + // store float + arg = f; +} + diff --git a/externals/grill/trunk/flext/tutorial/simple2/package.txt b/externals/grill/trunk/flext/tutorial/simple2/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..fd8b2a2524d776c3b2527fd2b7cb51896ff4cceb --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple2/package.txt @@ -0,0 +1,2 @@ +NAME=simple2 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/simple2/simple2.mcp b/externals/grill/trunk/flext/tutorial/simple2/simple2.mcp new file mode 100755 index 0000000000000000000000000000000000000000..6ada3deb7536f581e1a0bc0d518c5d00a21a99c5 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/simple2/simple2.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/simple2/simple2.vcproj b/externals/grill/trunk/flext/tutorial/simple2/simple2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..5402924e414dc7f105334c9323b2d751acda6581 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple2/simple2.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="simple2" + SccProjectName="simple2" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/simple2.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/simple2.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/simple2.pdb" + ImportLibrary=".\msvc-debug/simple2.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/simple2.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/simple2.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/simple2.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/simple2.pdb" + ImportLibrary=".\msvc/simple2.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/simple2.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/simple3/Makefile.am b/externals/grill/trunk/flext/tutorial/simple3/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..f4436562ef1978c1bf3d833474df5378b243a11b --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple3/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = simple3 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/simple3/main.cpp b/externals/grill/trunk/flext/tutorial/simple3/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d1630e7747c2a71873befc3592d4cebcf8989bca --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple3/main.cpp @@ -0,0 +1,91 @@ +/* +flext tutorial - simple 3 + +Copyright (c) 2002-2006 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +------------------------------------------------------------------------- + +This is an example of an object digesting several "tagged" messages + +*/ + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500) +#error You need at least flext version 0.5.0 +#endif + +class simple3: + public flext_base +{ + FLEXT_HEADER(simple3,flext_base) + +public: + // constructor with no arguments + simple3(); + +protected: + void m_tag(); + void m_tag_and_int(int i); + void m_sym(t_symbol *s); + + // override default flext help function + void m_help(); + +private: + + FLEXT_CALLBACK(m_tag) // callback for method "m_tag" (no arguments) + FLEXT_CALLBACK_I(m_tag_and_int) // callback for method "m_tag_and_int" (int arguments) + FLEXT_CALLBACK_S(m_sym) // callback for method "m_sym" (with one symbol argument) + + FLEXT_CALLBACK(m_help) // callback for method "m_help" (no arguments) +}; + +// instantiate the class (constructor takes no arguments) +FLEXT_NEW("simple3",simple3) + + +simple3::simple3() +{ + // define inlets + AddInAnything(); // add inlet of type anything (index 0) + + // register methods + FLEXT_ADDMETHOD_(0,"born",m_tag); // register method for tag "born" + FLEXT_ADDMETHOD_(0,"to",m_tag); // register method for tag "to" + FLEXT_ADDMETHOD_(0,"hula",m_tag); // register method for tag "hula" + FLEXT_ADDMETHOD_I(0,"hula",m_tag_and_int); // register method for tag "hula" and int argument + + FLEXT_ADDMETHOD(0,m_sym); // register method for all other symbols + + FLEXT_ADDMETHOD_(0,"help",m_help); // register method for "help" message +} + +void simple3::m_tag() +{ + post("tag recognized"); +} + +void simple3::m_tag_and_int(int i) +{ + post("tag recognized (has int arg: %i)",i); +} + +void simple3::m_sym(t_symbol *s) +{ + post("symbol: %s",GetString(s)); +} + + +void simple3::m_help() +{ + // post a help message + // thisName() returns a char * for the object name + post("%s - example for tagged messages",thisName()); +} + + diff --git a/externals/grill/trunk/flext/tutorial/simple3/package.txt b/externals/grill/trunk/flext/tutorial/simple3/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..acfca5e297f978bb562a7baa4b00f2a665c06371 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple3/package.txt @@ -0,0 +1,2 @@ +NAME=simple3 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/simple3/simple3.mcp b/externals/grill/trunk/flext/tutorial/simple3/simple3.mcp new file mode 100644 index 0000000000000000000000000000000000000000..bda7a203b2d210d1bc8c3d8eb8e2fd12c97ab028 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/simple3/simple3.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/simple3/simple3.vcproj b/externals/grill/trunk/flext/tutorial/simple3/simple3.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..cfb4fc087da42f15c32dc98c22ae5e8cf6cef888 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/simple3/simple3.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="simple3" + SccProjectName="simple3" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/simple3.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/simple3.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/simple3.pdb" + ImportLibrary=".\msvc/simple3.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/simple3.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/simple3.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/simple3.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/simple3.pdb" + ImportLibrary=".\msvc-debug/simple3.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/simple3.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/sndobj1/Makefile.am b/externals/grill/trunk/flext/tutorial/sndobj1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..40dcd384e76e9775ae25da55a46813a27abd2d00 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/sndobj1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = sndobj1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/sndobj1/main.cpp b/externals/grill/trunk/flext/tutorial/sndobj1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d5587c7372da4df70ed6acea5685ad146af603a1 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/sndobj1/main.cpp @@ -0,0 +1,101 @@ +/* +flext tutorial - sndobj 1 + +Copyright (c) 2002-2006 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +------------------------------------------------------------------------- + +This is an example of an external using the SndObj library. +See http://www.may.ie/academic/music/musictec/SndObj/ + +The SndObj library should be compiled multithreaded. + +This external features simple stereo pitch shifting. + +*/ + +#define FLEXT_ATTRIBUTES 1 + +#include <flsndobj.h> + +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 with sndobj support +#endif + + +class sndobj1: + public flext_sndobj +{ + FLEXT_HEADER_S(sndobj1,flext_sndobj,Setup) + +public: + sndobj1(); + + // these are obligatory! + virtual bool NewObjs(); + virtual void FreeObjs(); + virtual void ProcessObjs(); + + // space for a few sndobjs + Pitch *obj1,*obj2; + + float sh1,sh2; + +private: + static void Setup(t_classid c); + + FLEXT_ATTRVAR_F(sh1) + FLEXT_ATTRVAR_F(sh2) +}; + +FLEXT_NEW_DSP("sndobj1~",sndobj1) + + +sndobj1::sndobj1(): + sh1(1),sh2(1), + obj1(NULL),obj2(NULL) +{ + AddInSignal(2); // audio ins + AddOutSignal(2); // audio outs +} + +void sndobj1::Setup(t_classid c) +{ + FLEXT_CADDATTR_VAR1(c,"shL",sh1); + FLEXT_CADDATTR_VAR1(c,"shR",sh2); +} + +// construct needed SndObjs +bool sndobj1::NewObjs() +{ + // set up objects + obj1 = new Pitch(.1f,&InObj(0),sh1,Blocksize(),Samplerate()); + obj2 = new Pitch(.1f,&InObj(1),sh2,Blocksize(),Samplerate()); + return true; +} + +// destroy the SndObjs +void sndobj1::FreeObjs() +{ + if(obj1) delete obj1; + if(obj2) delete obj2; +} + +// this is called on every DSP block +void sndobj1::ProcessObjs() +{ + // set current pitch shift + obj1->SetPitch(sh1); + obj2->SetPitch(sh2); + + // do processing here!! + obj1->DoProcess(); + obj2->DoProcess(); + + // output + *obj1 >> OutObj(0); + *obj2 >> OutObj(1); +} + diff --git a/externals/grill/trunk/flext/tutorial/sndobj1/package.txt b/externals/grill/trunk/flext/tutorial/sndobj1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..21948caa5068fa66bc2f61c6c8746133f99424a1 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/sndobj1/package.txt @@ -0,0 +1,2 @@ +NAME=sndobj1~ +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/sndobj1/sndobj1.mcp b/externals/grill/trunk/flext/tutorial/sndobj1/sndobj1.mcp new file mode 100644 index 0000000000000000000000000000000000000000..8385296a9fd4d23241326b6fbf2d14779d63405f Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/sndobj1/sndobj1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/sndobj1/sndobj1.vcproj b/externals/grill/trunk/flext/tutorial/sndobj1/sndobj1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..013442b4ed5e5fc5ad23ba4496d7187a707981b3 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/sndobj1/sndobj1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="sndobj1" + SccProjectName="sndobj1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source,f:\prog\audio\sndobj\include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/sndobj1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib sndobj.lib" + OutputFile="msvc-debug/sndobj1~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc,f:\prog\audio\sndobj\lib" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/sndobj1~.pdb" + ImportLibrary=".\msvc-debug/sndobj1~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/sndobj1.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source,f:\prog\audio\sndobj\include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/sndobj1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib sndobj.lib" + OutputFile="../pd-msvc/sndobj1~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc,f:\prog\audio\sndobj\lib" + ProgramDatabaseFile=".\msvc/sndobj1~.pdb" + ImportLibrary=".\msvc/sndobj1~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/sndobj1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/stk1/Makefile.am b/externals/grill/trunk/flext/tutorial/stk1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..3449f410629c902301bd25c7f43eed49f8a15505 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/stk1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = stk1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/stk1/main.cpp b/externals/grill/trunk/flext/tutorial/stk1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..278529e026cb8c0c9e2a63f8ed0e00012c17d0f6 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/stk1/main.cpp @@ -0,0 +1,90 @@ +/* +flext tutorial - stk 1 + +Copyright (c) 2002-2010 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +------------------------------------------------------------------------- + +This is an example of an external using the STK ("synthesis toolkit") library. +For STK see http://ccrma-www.stanford.edu/software/stk + +STK needs C++ exceptions switched on. + +The STK tutorial examples assume that a static stk library exists which contains all the +source files (except rt*.cpp) of the stk/src directory. +The library should be compiled multithreaded and with the appropriate compiler flags for +the respective platform (e.g. __OS_WINDOWS__ and __LITTLE_ENDIAN__ for Windows) + +*/ + +#include <flstk.h> + +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 with STK support +#endif + +#include "Noise.h" + +using namespace stk; + +class stk1: + public flext_stk +{ + FLEXT_HEADER(stk1,flext_stk) + +public: + stk1(); + +protected: + // these are obligatory! + virtual bool NewObjs(); // create STK instruments + virtual void FreeObjs(); // destroy STK instruments + virtual void ProcessObjs(int n); // do DSP processing + +private: + Noise *inst; +}; + +FLEXT_NEW_DSP("stk1~",stk1) + + +stk1::stk1(): + inst(NULL) +{ + AddInAnything(); + AddOutSignal(); +} + + +// create STK instruments +bool stk1::NewObjs() +{ + bool ok = true; + + // set up objects + try { + inst = new Noise; + } + catch (StkError &) { + post("%s - Noise() setup failed!",thisName()); + ok = false; + } + return ok; +} + + +// destroy the STK instruments +void stk1::FreeObjs() +{ + if(inst) delete inst; +} + +// this is called on every DSP block +void stk1::ProcessObjs(int n) +{ + while(n--) Outlet(0).tick(inst->tick()); +} + + diff --git a/externals/grill/trunk/flext/tutorial/stk1/package.txt b/externals/grill/trunk/flext/tutorial/stk1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..5f31c5af3a17a71ec48e03bc0c00299996ec14a6 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/stk1/package.txt @@ -0,0 +1,2 @@ +NAME=stk1~ +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/stk1/stk1.vcproj b/externals/grill/trunk/flext/tutorial/stk1/stk1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..b1d9edfabdbcc9b9840fadc21fb28b49f489c67f --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/stk1/stk1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="stk1" + SccProjectName="stk1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD;FLEXT_THREADS" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/stk1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib pthreadVC.lib flext_td-pdwin.lib stk_d.lib" + OutputFile="msvc-debug/stk1~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc,f:\prog\audio\stk\lib" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/stk1~.pdb" + ImportLibrary=".\msvc-debug/stk1~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/stk1.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD;FLEXT_THREADS" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/stk1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib pthreadVC.lib flext_t-pdwin.lib stk.lib" + OutputFile="../pd-msvc/stk1~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc,f:\prog\audio\stk\lib" + ProgramDatabaseFile=".\msvc/stk1~.pdb" + ImportLibrary=".\msvc/stk1~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/stk1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;FLEXT_THREADS;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;FLEXT_THREADS;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/stk2/Makefile.am b/externals/grill/trunk/flext/tutorial/stk2/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..fe13e6a3c7ccd43dac0a88fea4be1340e92b438f --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/stk2/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = stk2 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/stk2/main.cpp b/externals/grill/trunk/flext/tutorial/stk2/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3fd120fdfd3bec82094f80981105944793414622 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/stk2/main.cpp @@ -0,0 +1,112 @@ +/* +flext tutorial - stk 2 + +Copyright (c) 2002-2010 Thomas Grill (gr@grrrr.org) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +------------------------------------------------------------------------- + +This is an example of an external using the STK ("synthesis toolkit") library. +For STK see http://ccrma-www.stanford.edu/software/stk + +STK needs C++ exceptions switched on. + +The STK tutorial examples assume that a static stk library exists which contains all the +source files (except rt*.cpp) of the stk/src directory. +The library should be compiled multithreaded and with the appropriate compiler flags for +the respective platform (e.g. __OS_WINDOWS__ and __LITTLE_ENDIAN__ for Windows) + +*/ + +#include <flstk.h> + +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) +#error You need at least flext version 0.4.1 with STK support +#endif + +#include "PitShift.h" + +using namespace stk; + +class stk2: + public flext_stk +{ + FLEXT_HEADER_S(stk2,flext_stk,Setup) + +public: + stk2(); + + void m_sh1(float f) { if(inst[0]) inst[0]->setShift(f); } + void m_sh2(float f) { if(inst[1]) inst[1]->setShift(f); } + + // these are obligatory! + virtual bool NewObjs(); // create STK instruments + virtual void FreeObjs(); // destroy STK instruments + virtual void ProcessObjs(int n); // do DSP processing + + PitShift *inst[2]; + StkFrames vec; + +private: + static void Setup(t_classid c); + + FLEXT_CALLBACK_F(m_sh1) + FLEXT_CALLBACK_F(m_sh2) +}; + +FLEXT_NEW_DSP("stk2~",stk2) + + +stk2::stk2() +{ + AddInSignal(); + AddOutSignal(2); + + inst[0] = inst[1] = NULL; +} + +void stk2::Setup(t_classid c) +{ + FLEXT_CADDMETHOD_F(c,0,"shL",m_sh1); + FLEXT_CADDMETHOD_F(c,0,"shR",m_sh2); +} + + +// create STK instruments +bool stk2::NewObjs() +{ + bool ok = true; + + try { + // set up objects + for(int i = 0; i < 2; ++i) + inst[i] = new PitShift; + + // reserve one signal vector too + vec.resize(Blocksize()); + } + catch (StkError &) { + post("%s - Creation failed!",thisName()); + ok = false; + } + return ok; +} + + +// destroy the STK instruments +void stk2::FreeObjs() +{ + for(int i = 0; i < 2; ++i) + if(inst[i]) delete inst[i]; +} + +// this is called on every DSP block +void stk2::ProcessObjs(int n) +{ + for(int i = 0; i < 2; ++i) { + Inlet(0).tick(vec); + inst[i]->tick(vec); + Outlet(i).tick(vec); + } +} diff --git a/externals/grill/trunk/flext/tutorial/stk2/package.txt b/externals/grill/trunk/flext/tutorial/stk2/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..27b74e307fe6e4d58f04585a839136ceace029cd --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/stk2/package.txt @@ -0,0 +1,2 @@ +NAME=stk2~ +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/stk2/stk2.vcproj b/externals/grill/trunk/flext/tutorial/stk2/stk2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..2958a08b98ad837cfb95e9a8ea05dde4255bb2b6 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/stk2/stk2.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="stk2" + SccProjectName="stk2" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD;FLEXT_THREADS" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/stk2.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib pthreadVC.lib flext_t-pdwin.lib stk.lib" + OutputFile="../pd-msvc/stk2~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc,f:\prog\audio\stk\lib" + ProgramDatabaseFile=".\msvc/stk2~.pdb" + ImportLibrary=".\msvc/stk2~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/stk2.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD;FLEXT_THREADS" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/stk2.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib pthreadVC.lib flext_td-pdwin.lib stk_d.lib" + OutputFile="msvc-debug/stk2~.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc,f:\prog\audio\stk\lib" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/stk2~.pdb" + ImportLibrary=".\msvc-debug/stk2~.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/stk2.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;FLEXT_THREADS;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;FLEXT_THREADS;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/thread1/Makefile.am b/externals/grill/trunk/flext/tutorial/thread1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..e8965b1421b64082638555374d3fc825dd9cd09d --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/thread1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = thread1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/thread1/main.cpp b/externals/grill/trunk/flext/tutorial/thread1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e5e0c0e3bcbf5f32c335a27d7d7798b0220e19c0 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/thread1/main.cpp @@ -0,0 +1,83 @@ +/* +flext tutorial - threads 1 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This shows an example of a method running as a thread +*/ + +/* define FLEXT_THREADS for thread usage. Flext must also have been compiled with that defined! + it's even better to define that as a compiler flag (-D FLEXT_THREADS) for all files of the + flext external +*/ +#ifndef FLEXT_THREADS +#define FLEXT_THREADS +#endif + +#include <flext.h> + +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +class thread1: + public flext_base +{ + FLEXT_HEADER(thread1,flext_base) + +public: + thread1(); + +protected: + void m_start(); // method function + +private: + // define threaded callback for method m_start + // the same syntax as with FLEXT_CALLBACK is used here + FLEXT_THREAD(m_start) +}; + +FLEXT_NEW("thread1",thread1) + + + +thread1::thread1() +{ + AddInAnything(); + AddOutInt(); + + FLEXT_ADDBANG(0,m_start); // register method +} + +void thread1::m_start() +{ + // Please note that this functions needs about 10 seconds to complete + // Without threads it would block the real-time system + + // Okay, that functionality would be far more elegant with timers + // ... but hey, it's a demo! + + for(int i = 0; i < 20 && !ShouldExit(); ++i) { + ToOutInt(0,i); // output loop count +// post("%i",i); + + // wait for half a second + for(int j = 0; j < 5 && !ShouldExit(); ++j) Sleep(0.1f); + // note: we shall not block a thread for a longer time. + // The system might want to destroy the object in the meantime and + // expects thread termination. In such a case flext waits + // for 1 second by default, then it aborts the thread brutally + } + + // output a final zero + ToOutInt(0,0); +// post("end"); +} + + + diff --git a/externals/grill/trunk/flext/tutorial/thread1/package.txt b/externals/grill/trunk/flext/tutorial/thread1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..3b07a03eb9381f3a44c58be8756ffd11e329c6b2 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/thread1/package.txt @@ -0,0 +1,3 @@ +NAME=thread1 +BUILDTYPE=multi +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/thread1/thread1.mcp b/externals/grill/trunk/flext/tutorial/thread1/thread1.mcp new file mode 100644 index 0000000000000000000000000000000000000000..54fc8624dbb34f579d67463b0a7b21afec83e21e Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/thread1/thread1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/thread1/thread1.vcproj b/externals/grill/trunk/flext/tutorial/thread1/thread1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..3cf34ebfe10093c84209aa65781b325d2cf67701 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/thread1/thread1.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="thread1" + SccProjectName="thread1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD;FLEXT_THREADS" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/thread1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_t-pdwin.lib pthreadVC.lib" + OutputFile="../pd-msvc/thread1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="C:\Programme\audio\pd\bin;..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/thread1.pdb" + ImportLibrary=".\msvc/thread1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/thread1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FLEXT_THREADS" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/thread1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_td-pdwin.lib pthreadVC.lib" + OutputFile=".\msvc-debug/thread1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="C:\Programme\audio\pd\bin; ..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/thread1.pdb" + ImportLibrary=".\msvc-debug/thread1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/thread1.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;FLEXT_THREADS;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;FLEXT_THREADS;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/thread2/Makefile.am b/externals/grill/trunk/flext/tutorial/thread2/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..8b0e89da0a321d3f9eed6a3dd44ad664c17e56e6 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/thread2/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = thread2 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/thread2/main.cpp b/externals/grill/trunk/flext/tutorial/thread2/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..40e82b3c63920fdd689fcdcf49bec2e36facf42d --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/thread2/main.cpp @@ -0,0 +1,134 @@ +/* +flext tutorial - threads 2 + +Copyright (c) 2002,2003 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. + +------------------------------------------------------------------------- + +This shows an example of multiple threads and syncing with a thread conditional +*/ + +/* define FLEXT_THREADS for thread usage. Flext must also have been compiled with that defined! + it's even better to define that as a compiler flag (-D FLEXT_THREADS) for all files of the + flext external +*/ +#ifndef FLEXT_THREADS +#define FLEXT_THREADS +#endif + +#include <flext.h> + +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +class thread2: + public flext_base +{ + FLEXT_HEADER(thread2,flext_base) + +public: + thread2(int del); + +protected: + void m_start(int st); + void m_stop(); + void m_text(); + + void m_textout(); + +private: + FLEXT_THREAD_I(m_start) // define threaded callback for method m_start + FLEXT_CALLBACK(m_stop) // normal callback for m_stop + FLEXT_CALLBACK(m_text) // turn on console output + + FLEXT_THREAD(m_textout) // text output + + float delay; + volatile int count; + + // caution: CodeWarrior seems to ignore volatile modifier!! + volatile bool stopit,running,blipping; // flags for running and stopping + + // thread conditional for stop signal + ThrCond cond; +}; + +FLEXT_NEW_1("thread2",thread2,int) + + + +thread2::thread2(int del): + delay(del/1000.f), + stopit(false), + running(false),blipping(false) +{ + AddInAnything(); + AddOutInt(2); + + FLEXT_ADDMETHOD(0,m_start); // register start for integer numbers (floats in PD) + FLEXT_ADDMETHOD_(0,"text",m_text); // register m_text method for "text" tag + FLEXT_ADDMETHOD_(0,"stop",m_stop); // register m_text method for "stop" tag +} + +void thread2::m_start(int st) +{ + // if already running, just set back the counter + if(running) { count = st; return; } + + running = true; + + // loop until either the system exit flag or the "stopit" flag is set + for(count = st; !ShouldExit() && !stopit; ++count) + { + Sleep(delay); + ToOutInt(0,count); // output loop count + } + + running = false; // change state flag +// cond.Lock(); // lock conditional + cond.Signal(); // signal changed flag to waiting "stop" method +// cond.Unlock(); // unlock conditional +} + +void thread2::m_stop() +{ +// cond.Lock(); // lock conditional + stopit = true; // set termination flag + + while(*(&running) || *(&blipping)) // workaround for CodeWarrior (doesn't honor volatile modifier!) + { + cond.Wait(); // wait for signal by running threads + } + + // --- Here, the threads should have stopped --- + + stopit = false; // reset flag +// cond.Unlock(); // unlock conditional +} + + +void thread2::m_text() +{ + FLEXT_CALLMETHOD(m_textout); +} + +void thread2::m_textout() +{ + if(blipping) return; + blipping = true; + + while(!ShouldExit() && !stopit) { + post("%i",count); + Sleep(1.f); + } + + blipping = false; // change state flag +// cond.Lock(); // lock conditional + cond.Signal(); // signal changed flag to waiting "stop" method +// cond.Unlock(); // unlock conditional +} + diff --git a/externals/grill/trunk/flext/tutorial/thread2/package.txt b/externals/grill/trunk/flext/tutorial/thread2/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d7ae4e8c797c535a1cc7be2b8b468f841bbaca1 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/thread2/package.txt @@ -0,0 +1,3 @@ +NAME=thread2 +BUILDTYPE=multi +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/thread2/thread2.mcp b/externals/grill/trunk/flext/tutorial/thread2/thread2.mcp new file mode 100755 index 0000000000000000000000000000000000000000..9d0511538f3b110a3a244c2efdc7f0acdc3bc91d Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/thread2/thread2.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/thread2/thread2.vcproj b/externals/grill/trunk/flext/tutorial/thread2/thread2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..99a25bad6d47761bd26b3c0ac3d1920d9833139b --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/thread2/thread2.vcproj @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="thread2" + SccProjectName="max/flext/tutorial/thread2" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD;FLEXT_THREADS" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/thread2.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_t-pdwin.lib pthreadVC.lib" + OutputFile="../pd-msvc/thread2.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="C:\Programme\audio\pd\bin;..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/thread2.pdb" + ImportLibrary=".\msvc/thread2.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/thread2.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FLEXT_THREADS" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/thread2.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_td-pdwin.lib pthreadVC.lib" + OutputFile=".\msvc-debug/thread2.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="c:\programme\audio\pd\bin;..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/thread2.pdb" + ImportLibrary=".\msvc-debug/thread2.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/thread2.tlb" + HeaderFileName=""/> + <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> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;FLEXT_THREADS;$(NoInherit)"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;FLEXT_THREADS;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/timer1/Makefile.am b/externals/grill/trunk/flext/tutorial/timer1/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..c5ab15f392b564fc953e77ba2b5afab817061f43 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/timer1/Makefile.am @@ -0,0 +1,51 @@ +# +# automake template +# added by tim blechmann +# + +NAME = timer1 + +BUILT_SOURCES = main.cpp + +EXTRA_DIST = main.cpp \ + $(NAME).mcp \ + $(NAME).vcproj + +CXXFLAGS = @CXXFLAGS@ \ + @OPT_FLAGS@ \ + @INCLUDEDIR@ \ + -I../../source \ + $(DEFS) \ + -DFLEXT_SHARED + +LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ + $(patsubst %,-framework %,$(FRAMEWORKS)) + +LIBS = @LIBS@ -lflext-pd + +FRAMEWORKS = @FRAMEWORKS@ + +TARGETDIR = @TARGETDIR@ + +TARGET =$(NAME).@EXTENSION@ + +OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) + +SYSDIR = @SYSDIR@ + + +# ----------------------------- targets -------------------------------- + +all-local: $(OBJECTS) + $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) + strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) + +./%.@OBJEXT@ : %.cpp + $(CXX) -c $(CXXFLAGS) $< -o $@ + +clean-local: + rm -f ../$(TARGETDIR)/$(TARGET) + rm -f ./$(OBJECTS) + +install-exec-local: + install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/trunk/flext/tutorial/timer1/main.cpp b/externals/grill/trunk/flext/tutorial/timer1/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d751c7842d7a7a0d51e8794a32aed0294a11c926 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/timer1/main.cpp @@ -0,0 +1,100 @@ +/* +flext tutorial - timer 1 + +Copyright (c) 2003 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. + +------------------------------------------------------------------------- + +This is an example of an object using timers +*/ + +// enable flext attributes +#define FLEXT_ATTRIBUTES 1 + +// include flext header +#include <flext.h> + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 403) +#error You need at least flext version 0.4.3 +#endif + + +// define the class that stands for a pd/Max object + +class timer1: + // inherit from basic flext class + public flext_base +{ + // obligatory flext header (class name,base class name) + FLEXT_HEADER_S(timer1,flext_base,Setup) + +public: + // constructor + timer1(); + +protected: + // timers + Timer tmrA,tmrB; + + void m_getostime(float &f) { f = (float)GetOSTime(); } // method for operating system time attribute + void m_getrttime(float &f) { f = (float)GetTime(); } // method for real-time system time attribute + + void m_timerA(void *) { ToOutString(0,"Timer A"); } // timer A method + void m_timerB(void *) { ToOutString(0,"Timer B"); } // timer B method + + void m_resetA() { tmrA.Reset(); } // timer A reset + void m_resetB() { tmrB.Reset(); } // timer B reset + void m_oneshotA(int del) { tmrA.Delay(del*0.001); } // timer A one shot + void m_oneshotB(int del) { tmrB.Delay(del*0.001); } // timer B one shot + void m_periodicA(int del) { tmrA.Periodic(del*0.001); } // timer A periodic + void m_periodicB(int del) { tmrB.Periodic(del*0.001); } // timer B periodic + +private: + static void Setup(t_classid c); + + // register timer callbacks + FLEXT_CALLBACK_T(m_timerA) + FLEXT_CALLBACK_T(m_timerB) + + // register method callbacks + FLEXT_CALLGET_F(m_getostime) + FLEXT_CALLGET_F(m_getrttime) + FLEXT_CALLBACK(m_resetA) + FLEXT_CALLBACK(m_resetB) + FLEXT_CALLBACK_I(m_oneshotA) + FLEXT_CALLBACK_I(m_oneshotB) + FLEXT_CALLBACK_I(m_periodicA) + FLEXT_CALLBACK_I(m_periodicB) +}; + +// instantiate the class +FLEXT_NEW("timer1",timer1) + +// class setup function +void timer1::Setup(t_classid c) +{ + FLEXT_CADDATTR_GET(c,"ostime",m_getostime); // register attribute for OS time + FLEXT_CADDATTR_GET(c,"time",m_getrttime); // register attribute for RT time + + FLEXT_CADDMETHOD_(c,0,"resetA",m_resetA); // register reset method for timer A + FLEXT_CADDMETHOD_(c,0,"resetB",m_resetB); // register reset method for timer B + FLEXT_CADDMETHOD_(c,0,"oneshotA",m_oneshotA); // register one shot method for timer A + FLEXT_CADDMETHOD_(c,0,"oneshotB",m_oneshotB); // register one shot method for timer B + FLEXT_CADDMETHOD_(c,0,"periodicA",m_periodicA); // register periodic method for timer A + FLEXT_CADDMETHOD_(c,0,"periodicB",m_periodicB); // register periodic method for timer B +} + +// class constructor +timer1::timer1(): + tmrA(false),tmrB(false) +{ + AddInAnything("Control timers"); // add inlet for control commands + AddOutAnything("Timer output"); // add outlet for timer output + + // register methods + FLEXT_ADDTIMER(tmrA,m_timerA); // register method "m_timerA" for timer A + FLEXT_ADDTIMER(tmrB,m_timerB); // register method "m_timerB" for timer B +} diff --git a/externals/grill/trunk/flext/tutorial/timer1/package.txt b/externals/grill/trunk/flext/tutorial/timer1/package.txt new file mode 100644 index 0000000000000000000000000000000000000000..4a23dcaefe934a8b04b06d80f426bc216e15c354 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/timer1/package.txt @@ -0,0 +1,2 @@ +NAME=timer1 +SRCS=main.cpp diff --git a/externals/grill/trunk/flext/tutorial/timer1/timer1.mcp b/externals/grill/trunk/flext/tutorial/timer1/timer1.mcp new file mode 100755 index 0000000000000000000000000000000000000000..af4e978a6b604243fc61578f46a1a9222a3d7dc8 Binary files /dev/null and b/externals/grill/trunk/flext/tutorial/timer1/timer1.mcp differ diff --git a/externals/grill/trunk/flext/tutorial/timer1/timer1.vcproj b/externals/grill/trunk/flext/tutorial/timer1/timer1.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..ba39e622ba51d3d8dbc845c938b20342efb0d1b8 --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/timer1/timer1.vcproj @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="timer1" + SccProjectName="timer1" + SccAuxPath="" + SccLocalPath="." + SccProvider="MSSCCI:Jalindi Igloo"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\msvc-debug" + IntermediateDirectory=".\msvc-debug" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc-debug/timer1.pch" + AssemblerListingLocation=".\msvc-debug/" + ObjectFile=".\msvc-debug/" + ProgramDataBaseFileName=".\msvc-debug/" + BrowseInformation="1" + BrowseInformationFile=".\msvc-debug/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="4" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext_d-pdwin.lib" + OutputFile=".\msvc-debug/timer1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile=".\msvc-debug/timer1.pdb" + ImportLibrary=".\msvc-debug/timer1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc-debug/timer1.tlb" + HeaderFileName=""/> + <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="Release|Win32" + OutputDirectory=".\msvc" + IntermediateDirectory=".\msvc" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\source" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" + StringPooling="TRUE" + RuntimeLibrary="4" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderFile=".\msvc/timer1.pch" + AssemblerListingLocation=".\msvc/" + ObjectFile=".\msvc/" + ProgramDataBaseFileName=".\msvc/" + WarningLevel="3" + SuppressStartupBanner="TRUE" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="pd.lib flext-pdwin.lib" + OutputFile="../pd-msvc/timer1.dll" + LinkIncremental="1" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="..\..\pd-msvc" + ProgramDatabaseFile=".\msvc/timer1.pdb" + ImportLibrary=".\msvc/timer1.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="TRUE" + SuppressStartupBanner="TRUE" + TargetEnvironment="1" + TypeLibraryName=".\msvc/timer1.tlb" + HeaderFileName=""/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="main.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/grill/trunk/flext/tutorial/tutorial.sln b/externals/grill/trunk/flext/tutorial/tutorial.sln new file mode 100644 index 0000000000000000000000000000000000000000..7d3ab1e85cb8b399a009b746ebec64cd6292e9ff --- /dev/null +++ b/externals/grill/trunk/flext/tutorial/tutorial.sln @@ -0,0 +1,473 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv1", "adv1\adv1.vcproj", "{A90E248D-52FD-458F-90A5-F20F7ED1D564}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv2", "adv2\adv2.vcproj", "{B0C13353-9F2E-4714-A85C-6904B75B4345}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv3", "adv3\adv3.vcproj", "{3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "attr1", "attr1\attr1.vcproj", "{9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "attr2", "attr2\attr2.vcproj", "{D891041F-303E-4E99-868F-11FF58E0C779}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "attr3", "attr3\attr3.vcproj", "{EA839AFE-95F0-47CF-9A78-72EF51CB9940}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bind1", "bind1\bind1.vcproj", "{C568D327-EA97-49C8-AF05-5FD7D35B6191}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "buffer1", "buffer1\buffer1.vcproj", "{723071BA-FE33-4C29-AB7B-6AB30B6057F7}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flext", "..\flext.vcproj", "{A0882797-7925-4AA3-93EA-7241487CECC5}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib1", "lib1\lib1.vcproj", "{4560EF26-304A-424F-B882-1F65A1F4DC67}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "signal1", "signal1\signal1.vcproj", "{5F58157D-ABB1-4066-A143-C14515A3D7F9}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "signal2", "signal2\signal2.vcproj", "{B6D40688-2D3E-4DAA-8004-706FAA731F18}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple1", "simple1\simple1.vcproj", "{CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple2", "simple2\simple2.vcproj", "{4880ABD9-1598-4D5E-B4D3-558E8648405D}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple3", "simple3\simple3.vcproj", "{325D0FC7-AED9-487E-9FE5-4DEC305C2799}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sndobj1", "sndobj1\sndobj1.vcproj", "{A9B22491-39A4-4010-ABDF-5C8EF80432D7}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stk1", "stk1\stk1.vcproj", "{AD7C94F9-BB76-4588-BF89-491D7C6D40EC}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stk2", "stk2\stk2.vcproj", "{18A3D222-AC98-4CFF-82C0-E5421AB39981}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thread1", "thread1\thread1.vcproj", "{702908EB-47A9-45D0-BCC5-3448C98C73E6}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thread2", "thread2\thread2.vcproj", "{4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timer1", "timer1\timer1.vcproj", "{EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}" + ProjectSection(ProjectDependencies) = postProject + {A0882797-7925-4AA3-93EA-7241487CECC5} = {A0882797-7925-4AA3-93EA-7241487CECC5} + EndProjectSection +EndProject +Global + GlobalSection(SourceCodeControl) = preSolution + SccNumberOfProjects = 21 + SccProjectUniqueName0 = adv1\\adv1.vcproj + SccProjectName0 = adv1 + SccLocalPath0 = adv1 + SccProvider0 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName1 = adv2\\adv2.vcproj + SccProjectName1 = adv2 + SccLocalPath1 = adv2 + SccProvider1 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName2 = adv3\\adv3.vcproj + SccProjectName2 = adv3 + SccLocalPath2 = adv3 + SccProvider2 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName3 = attr1\\attr1.vcproj + SccProjectName3 = attr1 + SccLocalPath3 = attr1 + SccProvider3 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName4 = attr2\\attr2.vcproj + SccProjectName4 = attr2 + SccLocalPath4 = attr2 + SccProvider4 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName5 = attr3\\attr3.vcproj + SccProjectName5 = attr3 + SccLocalPath5 = attr3 + SccProvider5 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName6 = bind1\\bind1.vcproj + SccProjectName6 = max/flext/tutorial/bind1 + SccLocalPath6 = bind1 + SccProvider6 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName7 = buffer1\\buffer1.vcproj + SccProjectName7 = max/flext/tutorial/buffer1 + SccLocalPath7 = buffer1 + SccProvider7 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName8 = ..\\flext.vcproj + SccProjectName8 = max/flext + SccLocalPath8 = .. + SccProvider8 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName9 = lib1\\lib1.vcproj + SccProjectName9 = lib1 + SccLocalPath9 = lib1 + SccProvider9 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName10 = signal1\\signal1.vcproj + SccProjectName10 = max/flext/tutorial/signal1 + SccLocalPath10 = signal1 + SccProvider10 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName11 = signal2\\signal2.vcproj + SccProjectName11 = max/flext/tutorial/signal2 + SccLocalPath11 = signal2 + SccProvider11 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName12 = simple1\\simple1.vcproj + SccProjectName12 = simple1 + SccLocalPath12 = simple1 + SccProvider12 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName13 = simple2\\simple2.vcproj + SccProjectName13 = simple2 + SccLocalPath13 = simple2 + SccProvider13 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName14 = simple3\\simple3.vcproj + SccProjectName14 = simple3 + SccLocalPath14 = simple3 + SccProvider14 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName15 = sndobj1\\sndobj1.vcproj + SccProjectName15 = sndobj1 + SccLocalPath15 = sndobj1 + SccProvider15 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName16 = stk1\\stk1.vcproj + SccProjectName16 = stk1 + SccLocalPath16 = stk1 + SccProvider16 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName17 = stk2\\stk2.vcproj + SccProjectName17 = stk2 + SccLocalPath17 = stk2 + SccProvider17 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName18 = thread1\\thread1.vcproj + SccProjectName18 = thread1 + SccLocalPath18 = thread1 + SccProvider18 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName19 = thread2\\thread2.vcproj + SccProjectName19 = max/flext/tutorial/thread2 + SccLocalPath19 = thread2 + SccProvider19 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + SccProjectUniqueName20 = timer1\\timer1.vcproj + SccProjectName20 = timer1 + SccLocalPath20 = timer1 + SccProvider20 = MSSCCI:Jalindi\u0020Igloo + CanCheckoutShared = true + EndGlobalSection + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + Threads Debug = Threads Debug + Threads DLL Debug = Threads DLL Debug + Threads DLL Release = Threads DLL Release + Threads Release = Threads Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Debug.ActiveCfg = Debug|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Debug.Build.0 = Debug|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Release.ActiveCfg = Release|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Release.Build.0 = Release|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Threads Debug.ActiveCfg = Debug|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Threads Debug.Build.0 = Debug|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Threads DLL Debug.Build.0 = Debug|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Threads DLL Release.ActiveCfg = Release|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Threads DLL Release.Build.0 = Release|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Threads Release.ActiveCfg = Release|Win32 + {A90E248D-52FD-458F-90A5-F20F7ED1D564}.Threads Release.Build.0 = Release|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Debug.ActiveCfg = Debug|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Debug.Build.0 = Debug|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Release.ActiveCfg = Release|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Release.Build.0 = Release|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Threads Debug.ActiveCfg = Debug|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Threads Debug.Build.0 = Debug|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Threads DLL Debug.Build.0 = Debug|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Threads DLL Release.ActiveCfg = Release|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Threads DLL Release.Build.0 = Release|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Threads Release.ActiveCfg = Release|Win32 + {B0C13353-9F2E-4714-A85C-6904B75B4345}.Threads Release.Build.0 = Release|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Debug.ActiveCfg = Debug|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Debug.Build.0 = Debug|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Release.ActiveCfg = Release|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Release.Build.0 = Release|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Threads Debug.ActiveCfg = Debug|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Threads Debug.Build.0 = Debug|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Threads DLL Debug.Build.0 = Debug|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Threads DLL Release.ActiveCfg = Release|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Threads DLL Release.Build.0 = Release|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Threads Release.ActiveCfg = Release|Win32 + {3F3FDEA7-90CC-43CF-A2C5-2BF345705B02}.Threads Release.Build.0 = Release|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Debug.ActiveCfg = Debug|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Debug.Build.0 = Debug|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Release.ActiveCfg = Release|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Release.Build.0 = Release|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Threads Debug.ActiveCfg = Debug|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Threads Debug.Build.0 = Debug|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Threads DLL Debug.Build.0 = Debug|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Threads DLL Release.ActiveCfg = Release|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Threads DLL Release.Build.0 = Release|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Threads Release.ActiveCfg = Release|Win32 + {9A54D435-A3E6-4AA6-ACE3-702D7C411E4E}.Threads Release.Build.0 = Release|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Debug.ActiveCfg = Debug|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Debug.Build.0 = Debug|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Release.ActiveCfg = Release|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Release.Build.0 = Release|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Threads Debug.ActiveCfg = Debug|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Threads Debug.Build.0 = Debug|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Threads DLL Debug.Build.0 = Debug|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Threads DLL Release.ActiveCfg = Release|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Threads DLL Release.Build.0 = Release|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Threads Release.ActiveCfg = Release|Win32 + {D891041F-303E-4E99-868F-11FF58E0C779}.Threads Release.Build.0 = Release|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Debug.ActiveCfg = Debug|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Debug.Build.0 = Debug|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Release.ActiveCfg = Release|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Release.Build.0 = Release|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Threads Debug.ActiveCfg = Debug|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Threads Debug.Build.0 = Debug|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Threads DLL Debug.Build.0 = Debug|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Threads DLL Release.ActiveCfg = Release|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Threads DLL Release.Build.0 = Release|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Threads Release.ActiveCfg = Release|Win32 + {EA839AFE-95F0-47CF-9A78-72EF51CB9940}.Threads Release.Build.0 = Release|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Debug.ActiveCfg = Debug|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Debug.Build.0 = Debug|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Release.ActiveCfg = Release|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Release.Build.0 = Release|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Threads Debug.ActiveCfg = Debug|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Threads Debug.Build.0 = Debug|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Threads DLL Debug.Build.0 = Debug|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Threads DLL Release.ActiveCfg = Release|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Threads DLL Release.Build.0 = Release|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Threads Release.ActiveCfg = Release|Win32 + {C568D327-EA97-49C8-AF05-5FD7D35B6191}.Threads Release.Build.0 = Release|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Debug.ActiveCfg = Debug|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Debug.Build.0 = Debug|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Release.ActiveCfg = Release|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Release.Build.0 = Release|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Threads Debug.ActiveCfg = Debug|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Threads Debug.Build.0 = Debug|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Threads DLL Debug.Build.0 = Debug|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Threads DLL Release.ActiveCfg = Release|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Threads DLL Release.Build.0 = Release|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Threads Release.ActiveCfg = Release|Win32 + {723071BA-FE33-4C29-AB7B-6AB30B6057F7}.Threads Release.Build.0 = Release|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Debug.ActiveCfg = Debug|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Debug.Build.0 = Debug|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Release.ActiveCfg = Release|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Release.Build.0 = Release|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Threads Debug.ActiveCfg = Threads Debug|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Threads Debug.Build.0 = Threads Debug|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Threads DLL Debug.ActiveCfg = Threads DLL Debug|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Threads DLL Debug.Build.0 = Threads DLL Debug|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Threads DLL Release.ActiveCfg = Threads DLL Release|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Threads DLL Release.Build.0 = Threads DLL Release|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Threads Release.ActiveCfg = Threads Release|Win32 + {A0882797-7925-4AA3-93EA-7241487CECC5}.Threads Release.Build.0 = Threads Release|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Debug.ActiveCfg = Debug|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Debug.Build.0 = Debug|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Release.ActiveCfg = Release|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Release.Build.0 = Release|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Threads Debug.ActiveCfg = Debug|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Threads Debug.Build.0 = Debug|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Threads DLL Debug.Build.0 = Debug|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Threads DLL Release.ActiveCfg = Release|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Threads DLL Release.Build.0 = Release|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Threads Release.ActiveCfg = Release|Win32 + {4560EF26-304A-424F-B882-1F65A1F4DC67}.Threads Release.Build.0 = Release|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Debug.ActiveCfg = Debug|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Debug.Build.0 = Debug|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Release.ActiveCfg = Release|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Release.Build.0 = Release|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Threads Debug.ActiveCfg = Debug|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Threads Debug.Build.0 = Debug|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Threads DLL Debug.Build.0 = Debug|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Threads DLL Release.ActiveCfg = Release|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Threads DLL Release.Build.0 = Release|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Threads Release.ActiveCfg = Release|Win32 + {5F58157D-ABB1-4066-A143-C14515A3D7F9}.Threads Release.Build.0 = Release|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Debug.ActiveCfg = Debug|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Debug.Build.0 = Debug|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Release.ActiveCfg = Release|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Release.Build.0 = Release|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Threads Debug.ActiveCfg = Debug|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Threads Debug.Build.0 = Debug|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Threads DLL Debug.Build.0 = Debug|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Threads DLL Release.ActiveCfg = Release|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Threads DLL Release.Build.0 = Release|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Threads Release.ActiveCfg = Release|Win32 + {B6D40688-2D3E-4DAA-8004-706FAA731F18}.Threads Release.Build.0 = Release|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Debug.ActiveCfg = Debug|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Debug.Build.0 = Debug|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Release.ActiveCfg = Release|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Release.Build.0 = Release|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Threads Debug.ActiveCfg = Debug|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Threads Debug.Build.0 = Debug|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Threads DLL Debug.Build.0 = Debug|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Threads DLL Release.ActiveCfg = Release|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Threads DLL Release.Build.0 = Release|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Threads Release.ActiveCfg = Release|Win32 + {CF5E59F3-2AEE-40DD-8D59-8E8C407864F9}.Threads Release.Build.0 = Release|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Debug.ActiveCfg = Debug|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Debug.Build.0 = Debug|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Release.ActiveCfg = Release|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Release.Build.0 = Release|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Threads Debug.ActiveCfg = Debug|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Threads Debug.Build.0 = Debug|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Threads DLL Debug.Build.0 = Debug|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Threads DLL Release.ActiveCfg = Release|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Threads DLL Release.Build.0 = Release|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Threads Release.ActiveCfg = Release|Win32 + {4880ABD9-1598-4D5E-B4D3-558E8648405D}.Threads Release.Build.0 = Release|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Debug.ActiveCfg = Debug|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Debug.Build.0 = Debug|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Release.ActiveCfg = Release|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Release.Build.0 = Release|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Threads Debug.ActiveCfg = Debug|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Threads Debug.Build.0 = Debug|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Threads DLL Debug.Build.0 = Debug|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Threads DLL Release.ActiveCfg = Release|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Threads DLL Release.Build.0 = Release|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Threads Release.ActiveCfg = Release|Win32 + {325D0FC7-AED9-487E-9FE5-4DEC305C2799}.Threads Release.Build.0 = Release|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Debug.ActiveCfg = Debug|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Debug.Build.0 = Debug|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Release.ActiveCfg = Release|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Release.Build.0 = Release|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Threads Debug.ActiveCfg = Debug|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Threads Debug.Build.0 = Debug|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Threads DLL Debug.Build.0 = Debug|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Threads DLL Release.ActiveCfg = Release|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Threads DLL Release.Build.0 = Release|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Threads Release.ActiveCfg = Release|Win32 + {A9B22491-39A4-4010-ABDF-5C8EF80432D7}.Threads Release.Build.0 = Release|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Debug.ActiveCfg = Debug|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Debug.Build.0 = Debug|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Release.ActiveCfg = Release|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Release.Build.0 = Release|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Threads Debug.ActiveCfg = Debug|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Threads Debug.Build.0 = Debug|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Threads DLL Debug.Build.0 = Debug|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Threads DLL Release.ActiveCfg = Release|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Threads DLL Release.Build.0 = Release|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Threads Release.ActiveCfg = Release|Win32 + {AD7C94F9-BB76-4588-BF89-491D7C6D40EC}.Threads Release.Build.0 = Release|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Debug.ActiveCfg = Debug|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Debug.Build.0 = Debug|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Release.ActiveCfg = Release|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Release.Build.0 = Release|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Threads Debug.ActiveCfg = Debug|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Threads Debug.Build.0 = Debug|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Threads DLL Debug.Build.0 = Debug|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Threads DLL Release.ActiveCfg = Release|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Threads DLL Release.Build.0 = Release|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Threads Release.ActiveCfg = Release|Win32 + {18A3D222-AC98-4CFF-82C0-E5421AB39981}.Threads Release.Build.0 = Release|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Debug.ActiveCfg = Debug|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Debug.Build.0 = Debug|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Release.ActiveCfg = Release|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Release.Build.0 = Release|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Threads Debug.ActiveCfg = Debug|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Threads Debug.Build.0 = Debug|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Threads DLL Debug.Build.0 = Debug|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Threads DLL Release.ActiveCfg = Release|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Threads DLL Release.Build.0 = Release|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Threads Release.ActiveCfg = Release|Win32 + {702908EB-47A9-45D0-BCC5-3448C98C73E6}.Threads Release.Build.0 = Release|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Debug.ActiveCfg = Debug|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Debug.Build.0 = Debug|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Release.ActiveCfg = Release|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Release.Build.0 = Release|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Threads Debug.ActiveCfg = Debug|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Threads Debug.Build.0 = Debug|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Threads DLL Debug.Build.0 = Debug|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Threads DLL Release.ActiveCfg = Release|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Threads DLL Release.Build.0 = Release|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Threads Release.ActiveCfg = Release|Win32 + {4CC4B09F-1D36-46C7-A1DE-3C4DC366F485}.Threads Release.Build.0 = Release|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Debug.ActiveCfg = Debug|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Debug.Build.0 = Debug|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Release.ActiveCfg = Release|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Release.Build.0 = Release|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Threads Debug.ActiveCfg = Debug|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Threads Debug.Build.0 = Debug|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Threads DLL Debug.ActiveCfg = Debug|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Threads DLL Debug.Build.0 = Debug|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Threads DLL Release.ActiveCfg = Release|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Threads DLL Release.Build.0 = Release|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Threads Release.ActiveCfg = Release|Win32 + {EAA8D47B-CFD7-40AC-92A8-189BEF3E8C64}.Threads Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal