From c6ba54641bcf5e44fa914476d72455a524ed172f Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sun, 10 Apr 2005 22:24:13 +0000 Subject: added xcode project cleaner error reporting added generic numpy support (not working) use lock count instead of message queuing to avoid py->py messaging deadlock fixing strange gcc behavior fixes for maxmsp support for buffer objects (preliminary) fixed reference count bug use optimized version updates for DSP processing adjust pd and py files for correct argument passing more optimizations fixed numarray headers little restructuring svn path=/trunk/; revision=2708 --- externals/grill/py/scripts/sig.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'externals/grill/py/scripts') diff --git a/externals/grill/py/scripts/sig.py b/externals/grill/py/scripts/sig.py index 23fc4c60..8aa1ce65 100644 --- a/externals/grill/py/scripts/sig.py +++ b/externals/grill/py/scripts/sig.py @@ -39,7 +39,10 @@ class gain(pyext._class): def _signal(self): # Multiply input vector by gain and copy to output - self._outvec(0)[:] = self._invec(0)*self.gain + try: + self._outvec(0)[:] = self._invec(0)*self.gain + except: + pass class gain2(pyext._class): @@ -48,6 +51,10 @@ class gain2(pyext._class): gain = 0 def _dsp(self): + if not self._arraysupport(): + print "No DSP support" + return False + # cache vectors in this scope self.invec = self._invec(0) self.outvec = self._outvec(0) @@ -56,6 +63,7 @@ class gain2(pyext._class): self._signal = self.signal1 else: self._signal = self.signal2 + return True def signal1(self): # Multiply signal vector in place @@ -78,6 +86,10 @@ class pan(pyext._class): self.fl = math.cos(x) self.fr = math.sin(x) + def _dsp(self): + # if _dsp is present it must return True to enable DSP + return pyext._arraysupport() + def _signal(self): # Multiply input vector by gain and copy to output iv = self._invec(0) -- cgit v1.2.1