aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/flext/flext.vcproj21
-rw-r--r--externals/grill/flext/source/flbase.h2
-rw-r--r--externals/grill/flext/source/fldsp.cpp2
-rwxr-xr-xexternals/grill/flext/source/flqueue.cpp29
4 files changed, 30 insertions, 24 deletions
diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj
index 315be37d..8c043589 100644
--- a/externals/grill/flext/flext.vcproj
+++ b/externals/grill/flext/flext.vcproj
@@ -122,7 +122,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="c:\data\prog\pd\pd-cvs\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="TRUE"
@@ -172,7 +172,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="c:\programme\audio\pd\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD;FLEXT_EXPORTS"
StringPooling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -224,7 +224,7 @@
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="c:\programme\audio\pd\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_USE_SIMD"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
@@ -274,7 +274,7 @@
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="c:\programme\audio\pd\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD;FLEXT_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
@@ -350,10 +350,7 @@
<Tool
Name="VCMIDLTool"/>
<Tool
- Name="VCPostBuildEventTool"
- Description="copy flext to vibrez"
- CommandLine="copy c:\data\pdmax\flext\pd-msvc\flext_d.dll c:\data\vibrez\debug
-"/>
+ Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
@@ -415,13 +412,7 @@
<Tool
Name="VCMIDLTool"/>
<Tool
- Name="VCPostBuildEventTool"
- Description="copy flext to vibrez"
- CommandLine="copy c:\data\pdmax\flext\source\*.h c:\data\vibrez\api\include\flext
-copy c:\data\pdmax\flext\pd-msvc\flext_l.lib c:\data\vibrez\api\lib
-copy c:\data\pdmax\flext\pd-msvc\flext.dll c:\data\vibrez\release
-copy c:\data\pdmax\flext\pd-msvc\flext.dll c:\data\prog\dll
-"/>
+ Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h
index d6c34e29..732cccbe 100644
--- a/externals/grill/flext/source/flbase.h
+++ b/externals/grill/flext/source/flbase.h
@@ -105,7 +105,7 @@ class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj):
FLEXT_CLASSDEF(flext_obj)();
//! Destructor
- virtual ~FLEXT_CLASSDEF(flext_obj)() = 0;
+ virtual ~FLEXT_CLASSDEF(flext_obj)();
/*! \brief Signal a construction problem
\note This should only be used in the constructor. Object creation will be aborted.
diff --git a/externals/grill/flext/source/fldsp.cpp b/externals/grill/flext/source/fldsp.cpp
index f27ae032..3dd97f4c 100644
--- a/externals/grill/flext/source/fldsp.cpp
+++ b/externals/grill/flext/source/fldsp.cpp
@@ -89,7 +89,7 @@ void flext_dsp::dspmeth(fts_word_t *w)
#else
t_int *flext_dsp::dspmeth(t_int *w)
{
- flext_dsp *obj = (flext_dsp *)w[1];
+ flext_dsp *obj = (flext_dsp *)(size_t)w[1];
/*
#ifdef FLEXT_DEBUG
if(!obj->thisHdr()) {
diff --git a/externals/grill/flext/source/flqueue.cpp b/externals/grill/flext/source/flqueue.cpp
index 7c47cac6..a7a7ceda 100755
--- a/externals/grill/flext/source/flqueue.cpp
+++ b/externals/grill/flext/source/flqueue.cpp
@@ -58,7 +58,9 @@ private:
const t_atom *argv;
};
-// _should_ work without locks.... have yet to check if it really does....
+/* \TODO This is only thread-safe if called fro one thread which need NOT be the case.
+ Reimplement in a thread-safe manner!!!
+*/
class Queue:
public flext
{
@@ -222,7 +224,7 @@ static void QWork(bool syslock)
if(!qc) break;
#if FLEXT_QMODE == 2
- if(syslock) sys_lock();
+ if(syslock) flext::Lock();
#endif
// once more, because flushing in destructors could have reduced the count
@@ -232,7 +234,7 @@ static void QWork(bool syslock)
} // inner loop
#if FLEXT_QMODE == 2
- if(syslock) sys_unlock();
+ if(syslock) flext::Unlock();
#endif
}
@@ -253,13 +255,23 @@ static void QTick(flext_base *c)
}
#elif FLEXT_QMODE == 1
+#ifndef FLEXT_SHARED
+static bool qtickactive = false;
+#endif
static t_int QTick(t_int *)
{
+#ifndef FLEXT_SHARED
+ qtickactive = false;
+#endif
QWork(false);
#ifdef FLEXT_SHARED
- return 1;
+ // will be run in the next idle cycle
+ return 2;
#else
- return 0;
+ // 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
@@ -287,7 +299,10 @@ static void Trigger()
// wake up worker thread
qthrcond.Signal();
#elif FLEXT_QMODE == 1 && !defined(FLEXT_SHARED)
- set_callback(QTick,NULL,0);
+ if(!qtickactive) {
+ sys_callback(QTick,NULL,0);
+ qtickactive = true;
+ }
#elif FLEXT_QMODE == 0
clock_delay(qclk,0);
#endif
@@ -324,7 +339,7 @@ void flext_base::StartQueue()
#if FLEXT_QMODE == 1
#ifdef FLEXT_SHARED
- set_callback(QTick,NULL,0);
+ sys_callback(QTick,NULL,0);
#endif
#elif FLEXT_QMODE == 2
LaunchThread(QWorker,NULL);