From: Paul Brossier Date: Tue, 6 Oct 2009 15:04:18 +0000 (+0200) Subject: python/aubio/aubioclass.py: update peakpicker class X-Git-Tag: bzr2git~206 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b07ff1eed805c44bd84c62706e625239bdaae779;p=aubio.git python/aubio/aubioclass.py: update peakpicker class --- diff --git a/python/aubio/aubioclass.py b/python/aubio/aubioclass.py index c2c221ea..58c8fe17 100644 --- a/python/aubio/aubioclass.py +++ b/python/aubio/aubioclass.py @@ -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)