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/source/fldsp.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'externals/grill/flext/source/fldsp.h') 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; -- cgit v1.2.1