python/aubio/aubioclass.py: update peakpicker class
authorPaul Brossier <piem@piem.org>
Tue, 6 Oct 2009 15:04:18 +0000 (17:04 +0200)
committerPaul Brossier <piem@piem.org>
Tue, 6 Oct 2009 15:04:18 +0000 (17:04 +0200)
python/aubio/aubioclass.py

index c2c221ea1760cd2415338a14ff59dc11d0eaef36..58c8fe17f1a076798e95eb6c84ac2ab49a60f149 100644 (file)
@@ -43,7 +43,7 @@ class sndfile:
         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 @@ class peakpick:
     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)