shithub: aubio

Download patch

ref: b07ff1eed805c44bd84c62706e625239bdaae779
parent: eb089fbb0fc96a2187629924ec8639c676f2fea9
author: Paul Brossier <piem@piem.org>
date: Tue Oct 6 13:04:18 EDT 2009

python/aubio/aubioclass.py: update peakpicker class

--- a/python/aubio/aubioclass.py
+++ b/python/aubio/aubioclass.py
@@ -43,7 +43,7 @@
         else:
             self.file = new_aubio_sndfile_ro(filename)
         if self.file == None:
-            raise(ValueError, "failed opening file %s" % filename)
+            raise IOError, "failed opening file %s" % filename
     def __del__(self):
         if self.file != None: del_aubio_sndfile(self.file)
     def info(self):
@@ -81,9 +81,9 @@
     def __init__(self,threshold=0.1):
         self.pp = new_aubio_peakpicker(threshold)
     def do(self,fv):
-        return aubio_peakpick_pimrt(fv(),self.pp)
+        return aubio_peakpicker_do(self.pp, fv())
     def getval(self):
-        return aubio_peakpick_pimrt_getval(self.pp)
+        return aubio_peakpicker_get_adaptive_threshold(self.pp)
     def __del__(self):
         del_aubio_peakpicker(self.pp)