diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-04-10 22:24:13 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-04-10 22:24:13 +0000 |
commit | c6ba54641bcf5e44fa914476d72455a524ed172f (patch) | |
tree | 162399832d1ec063b0863b99d49ce3ff35072b0a /externals/grill/py/scripts | |
parent | ce10fc0a7c760656a3577068e1457043a3d6ffd1 (diff) |
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
Diffstat (limited to 'externals/grill/py/scripts')
-rw-r--r-- | externals/grill/py/scripts/sig.py | 14 |
1 files changed, 13 insertions, 1 deletions
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)
|