aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-09-12 10:27:40 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-09-12 10:27:40 +0000
commitb8827f17107c537f192c60eef0d7840ba1d2d3e8 (patch)
treec6bca0b6b8b354e633218ffbd75166ae53ffe18e /externals/grill/flext
parent4aa3cf590de6c27f0e43be1bb29923097dbf0c96 (diff)
changed initialization functions accordingly
minimal additions for buffers and exception handling change click modifier to shift (seems to work) small fixes for tutorial examples added flfeatures.h for compile-time version-specific feature detection added typed flext::NewAligned fixed severe Altivec bug adapted for pd-devel 0.39 - better handling of click callback slimmed object data structures update DSP methods for SndObj and STK classes - more compatible handling of attributes in patcher (hiding is now an option - define FLEXT_ATTRHIDE) better buffer checking svn path=/trunk/; revision=3537
Diffstat (limited to 'externals/grill/flext')
-rw-r--r--externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc1
-rw-r--r--externals/grill/flext/changes.txt2
-rw-r--r--externals/grill/flext/flext.vcproj8
-rw-r--r--externals/grill/flext/source/flbase.cpp1
-rw-r--r--externals/grill/flext/source/flbuf.cpp5
-rw-r--r--externals/grill/flext/source/fldsp.h6
-rw-r--r--externals/grill/flext/source/flext.cpp2
-rwxr-xr-xexternals/grill/flext/source/flmsg.cpp3
-rw-r--r--externals/grill/flext/source/flsndobj.cpp13
-rw-r--r--externals/grill/flext/source/flsndobj.h6
-rw-r--r--externals/grill/flext/source/flstk.cpp13
-rw-r--r--externals/grill/flext/source/flstk.h4
-rw-r--r--externals/grill/flext/source/flsupport.h9
13 files changed, 47 insertions, 26 deletions
diff --git a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc
index 3808d6bb..cc26b0ae 100644
--- a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc
+++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc
@@ -16,3 +16,4 @@ TARGETPOST=$(INSTTARGET)/Contents/Pkginfo
$(INSTTARGET)/Contents/Pkginfo:
echo "iLaX????" >> $@
+
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt
index 516e10ca..d601330c 100644
--- a/externals/grill/flext/changes.txt
+++ b/externals/grill/flext/changes.txt
@@ -15,6 +15,8 @@ Version history:
- 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
0.5.0:
- fixes for 64 bit builds (size_t is integer type of pointer size)
diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj
index 4dde8462..5b05af23 100644
--- a/externals/grill/flext/flext.vcproj
+++ b/externals/grill/flext/flext.vcproj
@@ -121,10 +121,10 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="c:\data\pd\pd-cvs\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
+ AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-0\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;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT;_WIN32_WINNT=0x501"
BasicRuntimeChecks="3"
- RuntimeLibrary="3"
+ RuntimeLibrary="1"
RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="flext.h"
@@ -171,11 +171,11 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-test4\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
+ AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-0\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD;FLEXT_EXPORTS;FLEXT_DEBUGMEM;_WIN32_WINNT=0x400"
StringPooling="TRUE"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="5"
RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="flext.h"
diff --git a/externals/grill/flext/source/flbase.cpp b/externals/grill/flext/source/flbase.cpp
index 63017d47..c3d94d83 100644
--- a/externals/grill/flext/source/flbase.cpp
+++ b/externals/grill/flext/source/flbase.cpp
@@ -25,6 +25,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#pragma warning (push)
#pragma warning (disable:4091)
#endif
+// for canvas_realizedollar (should be noon-critical)
#include <g_canvas.h>
#ifdef _MSC_VER
#pragma warning (pop)
diff --git a/externals/grill/flext/source/flbuf.cpp b/externals/grill/flext/source/flbuf.cpp
index 529d32d0..a807c20b 100644
--- a/externals/grill/flext/source/flbuf.cpp
+++ b/externals/grill/flext/source/flbuf.cpp
@@ -326,11 +326,10 @@ void flext::buffer::ClearDirty()
bool flext::buffer::IsDirty() const
{
- FLEXT_ASSERT(sym);
+ if(!sym) return false;
#if FLEXT_SYS == FLEXT_SYS_PD
- FLEXT_ASSERT(arr);
#ifdef _FLEXT_HAVE_PD_GARRAYUPDATETIME
- return isdirty || garray_updatetime(arr) > cleantime;
+ 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;
diff --git a/externals/grill/flext/source/fldsp.h b/externals/grill/flext/source/fldsp.h
index d9dbb1fe..19b4b3cb 100644
--- a/externals/grill/flext/source/fldsp.h
+++ b/externals/grill/flext/source/fldsp.h
@@ -54,9 +54,15 @@ public:
//! returns array of input vectors (CntInSig() vectors)
t_sample *const *InSig() const { return invecs; }
+ //! returns input vector
+ t_sample *InSig(int i) const { return invecs[i]; }
+
//! returns array of output vectors (CntOutSig() vectors)
t_sample *const *OutSig() const { return outvecs; }
+ //! returns output vector
+ t_sample *OutSig(int i) const { return outvecs[i]; }
+
//! typedef describing a signal vector
#if FLEXT_SYS == FLEXT_SYS_JMAX
typedef fts_symbol_t t_signalvec;
diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp
index d37df1f0..70184bef 100644
--- a/externals/grill/flext/source/flext.cpp
+++ b/externals/grill/flext/source/flext.cpp
@@ -175,7 +175,7 @@ void flext_base::CbClick() {}
#if FLEXT_SYS == FLEXT_SYS_PD
void flext_base::cb_click(t_gobj *c,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt)
{
- if(alt) thisObject(c)->CbClick();
+ if(shift) thisObject(c)->CbClick();
}
#endif
diff --git a/externals/grill/flext/source/flmsg.cpp b/externals/grill/flext/source/flmsg.cpp
index 1ab4b4a7..640c90cd 100755
--- a/externals/grill/flext/source/flmsg.cpp
+++ b/externals/grill/flext/source/flmsg.cpp
@@ -253,12 +253,15 @@ bool flext_base::CbMethodHandler(int inlet,const t_symbol *s,int argc,const t_at
}
catch(std::exception &x) {
error("%s - Exception while processing method: %s",thisName(),x.what());
+ ret = false;
}
catch(const char *txt) {
error("%s - Exception while processing method: %s",thisName(),txt);
+ ret = false;
}
catch(...) {
error("%s - Unknown exception while processing method",thisName());
+ ret = false;
}
end:
diff --git a/externals/grill/flext/source/flsndobj.cpp b/externals/grill/flext/source/flsndobj.cpp
index 830a7b46..b884ce73 100644
--- a/externals/grill/flext/source/flsndobj.cpp
+++ b/externals/grill/flext/source/flsndobj.cpp
@@ -50,7 +50,7 @@ void flext_sndobj::ClearObjs()
}
}
-void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out)
+bool flext_sndobj::CbDsp()
{
// called on every rebuild of the dsp chain
@@ -68,13 +68,13 @@ void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out)
inobj = new Inlet *[inobjs];
tmpobj = new SndObj *[inobjs];
for(i = 0; i < inobjs; ++i) {
- inobj[i] = new Inlet(in[i],blsz,smprt);
+ 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(out[i],blsz,smprt);
+ for(i = 0; i < outobjs; ++i) outobj[i] = new Outlet(OutSig(i),blsz,smprt);
}
if(!NewObjs()) ClearObjs();
@@ -82,12 +82,13 @@ void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out)
else {
// assign changed input/output vectors
- for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(in[i]);
- for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(out[i]);
+ 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::m_signal(int n,t_sample *const *in,t_sample *const *out)
+void flext_sndobj::CbSignal()
{
for(int i = 0; i < inobjs; ++i) *tmpobj[i] << *inobj[i];
ProcessObjs();
diff --git a/externals/grill/flext/source/flsndobj.h b/externals/grill/flext/source/flsndobj.h
index 9cff9461..dee6c9de 100644
--- a/externals/grill/flext/source/flsndobj.h
+++ b/externals/grill/flext/source/flsndobj.h
@@ -41,9 +41,6 @@ protected:
virtual bool Init();
virtual void Exit();
- virtual void m_dsp(int n,t_sample *const *in,t_sample *const *out);
- virtual void m_signal(int n,t_sample *const *in,t_sample *const *out);
-
private:
//! SndObj for reading from inlet buffer
class Inlet:
@@ -75,6 +72,9 @@ private:
t_sample *buf;
};
+ virtual bool CbDsp();
+ virtual void CbSignal();
+
void ClearObjs();
int inobjs,outobjs;
diff --git a/externals/grill/flext/source/flstk.cpp b/externals/grill/flext/source/flstk.cpp
index b3a6204c..f3161565 100644
--- a/externals/grill/flext/source/flstk.cpp
+++ b/externals/grill/flext/source/flstk.cpp
@@ -45,7 +45,7 @@ void flext_stk::ClearObjs()
}
}
-void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out)
+bool flext_stk::CbDsp()
{
// called on every rebuild of the dsp chain
@@ -64,12 +64,12 @@ void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out)
if(inobjs) {
inobj = new Input *[inobjs];
for(i = 0; i < inobjs; ++i)
- inobj[i] = new Input(in[i],blsz);
+ inobj[i] = new Input(InSig(i),blsz);
}
if(outobjs) {
outobj = new Output *[outobjs];
for(i = 0; i < outobjs; ++i)
- outobj[i] = new Output(out[i],blsz);
+ outobj[i] = new Output(OutSig(i),blsz);
}
if(!NewObjs()) ClearObjs();
@@ -77,12 +77,13 @@ void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out)
else {
// assign changed input/output vectors
- for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(in[i]);
- for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(out[i]);
+ 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::m_signal(int n,t_sample *const *in,t_sample *const *out)
+void flext_stk::CbSignal()
{
if(inobjs || outobjs) ProcessObjs(blsz);
}
diff --git a/externals/grill/flext/source/flstk.h b/externals/grill/flext/source/flstk.h
index 7f15edd9..4a9b7ece 100644
--- a/externals/grill/flext/source/flstk.h
+++ b/externals/grill/flext/source/flstk.h
@@ -79,8 +79,8 @@ protected:
Output &Outlet(int ix) { return *outobj[ix]; }
private:
- virtual void m_dsp(int n,t_sample *const *in,t_sample *const *out);
- virtual void m_signal(int n,t_sample *const *in,t_sample *const *out);
+ virtual bool CbDsp();
+ virtual void CbSignal();
void ClearObjs();
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h
index b6bb4eaa..25622b07 100644
--- a/externals/grill/flext/source/flsupport.h
+++ b/externals/grill/flext/source/flsupport.h
@@ -200,7 +200,14 @@ public:
/*! \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 && data; }
+ 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()