aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext')
-rw-r--r--externals/grill/flext/flext.cwbin506677 -> 506677 bytes
-rw-r--r--externals/grill/flext/readme.txt2
-rw-r--r--externals/grill/flext/source/flext.cpp4
-rw-r--r--externals/grill/flext/source/flsupport.cpp6
-rw-r--r--externals/grill/flext/source/flthr.cpp8
5 files changed, 15 insertions, 5 deletions
diff --git a/externals/grill/flext/flext.cw b/externals/grill/flext/flext.cw
index c38d4c10..0afabe2e 100644
--- a/externals/grill/flext/flext.cw
+++ b/externals/grill/flext/flext.cw
Binary files differ
diff --git a/externals/grill/flext/readme.txt b/externals/grill/flext/readme.txt
index cb9f90a1..9afb459d 100644
--- a/externals/grill/flext/readme.txt
+++ b/externals/grill/flext/readme.txt
@@ -122,6 +122,8 @@ Version history:
- 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
0.4.2:
- started port for jMax
diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp
index e6003466..a5ee5a59 100644
--- a/externals/grill/flext/source/flext.cpp
+++ b/externals/grill/flext/source/flext.cpp
@@ -169,10 +169,6 @@ void flext_base::Setup(t_classid id)
AddMethod(id,0,"getattributes",(methfun)cb_ListAttrib);
SetProxies(c);
-
-#ifdef FLEXT_THREADS
- thrid = GetThreadId();
-#endif
}
#if FLEXT_SYS == FLEXT_SYS_JMAX
diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp
index dcac4c75..26ddc51f 100644
--- a/externals/grill/flext/source/flsupport.cpp
+++ b/externals/grill/flext/source/flsupport.cpp
@@ -31,6 +31,11 @@ const t_symbol *flext::sym_signal = NULL;
void flext::Setup()
{
+ static bool issetup = false;
+ if(issetup)
+ return;
+ else issetup = true;
+
#if FLEXT_SYS == FLEXT_SYS_PD
sym_anything = &s_anything;
sym_pointer = &s_pointer;
@@ -57,6 +62,7 @@ void flext::Setup()
#endif
#ifdef FLEXT_THREADS
+ thrid = GetThreadId();
StartHelper();
#endif
}
diff --git a/externals/grill/flext/source/flthr.cpp b/externals/grill/flext/source/flthr.cpp
index d15e33d0..df8fb1a1 100644
--- a/externals/grill/flext/source/flthr.cpp
+++ b/externals/grill/flext/source/flthr.cpp
@@ -43,6 +43,12 @@ static flext::ThrCond *thrhelpcond = NULL;
bool flext::StartHelper()
{
if(thrhelpid) return true;
+
+ if(!thrid) {
+ // system thread has not been set
+ ERRINTERNAL();
+ return false;
+ }
bool ok = false;
#if FLEXT_THREADS == FLEXT_THR_POSIX
@@ -96,7 +102,7 @@ void flext::ThrHelper(void *)
pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
#endif
-// post("Helper");
+// post("Helper thread started");
// set thread priority one point below normal
// so thread construction won't disturb real-time audio