From 2aefe91f615726931d9e99d5009e1f6e57f623c9 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 7 Oct 2005 12:58:48 +0000 Subject: bugfixes and optimizations, especially for DSP under Max/MSP fixed dsp vector offset bug preprocessed class names now also reflect debug mode (to avoid name clashes) svn path=/trunk/; revision=3676 --- externals/grill/flext/changes.txt | 1 + externals/grill/flext/source/fldsp.h | 12 +++++++++--- externals/grill/flext/source/flprefix.h | 20 +++++++++++++++----- 3 files changed, 25 insertions(+), 8 deletions(-) (limited to 'externals') diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index b4e8af87..8e85e7c5 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -18,6 +18,7 @@ Version history: - 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) 0.5.0: - fixes for 64 bit builds (size_t is integer type of pointer size) diff --git a/externals/grill/flext/source/fldsp.h b/externals/grill/flext/source/fldsp.h index 91cbccb0..b85bbe07 100644 --- a/externals/grill/flext/source/fldsp.h +++ b/externals/grill/flext/source/fldsp.h @@ -55,13 +55,19 @@ public: t_sample *const *InSig() const { return vecs; } //! returns input vector - t_sample *InSig(int i) const { return vecs[i]; } + t_sample *InSig(int i) const { return InSig()[i]; } //! returns array of output vectors (CntOutSig() vectors) - t_sample *const *OutSig() const { return vecs+CntInSig(); } + // \todo cache that returned pointer + t_sample *const *OutSig() const + { + int i = CntInSig(); + // we have at least one actual dsp in vector + return vecs+(i?i:1); + } //! returns output vector - t_sample *OutSig(int i) const { return vecs[CntInSig()+i]; } + t_sample *OutSig(int i) const { return OutSig()[i]; } //! typedef describing a signal vector typedef t_sample *t_signalvec; diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h index 36a7dbbe..4568a1cc 100755 --- a/externals/grill/flext/source/flprefix.h +++ b/externals/grill/flext/source/flprefix.h @@ -366,12 +366,22 @@ WARRANTIES, see the file, "license.txt," in this distribution. */ #ifdef __DOXYGEN__ #define FLEXT_CLASSDEF(CL) CL -#elif defined(FLEXT_SHARED) - #define FLEXT_CLASSDEF(CL) CL##_shared -#elif defined(FLEXT_THREADS) - #define FLEXT_CLASSDEF(CL) CL##_multi +#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 - #define FLEXT_CLASSDEF(CL) CL##_single + #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 -- cgit v1.2.1