ref: 9f07d52148a0c25c53eabc3521e29464013107b4
parent: 247ce7d3ff68897d62c7fc0f9f9e2fed46d68172
author: Paul Brossier <[email protected]>
date: Sun Oct 18 11:20:00 EDT 2009
python/aubio/aubioclass.py: update peakpicker usage
--- a/python/aubio/aubioclass.py
+++ b/python/aubio/aubioclass.py
@@ -79,9 +79,12 @@
class peakpick:
""" class for aubio_peakpicker """
def __init__(self,threshold=0.1):
- self.pp = new_aubio_peakpicker(threshold)
+ self.pp = new_aubio_peakpicker(1)
+ self.out = new_fvec(1, 1)
+ aubio_peakpicker_set_threshold (self.pp, threshold)
def do(self,fv):
- return aubio_peakpicker_do(self.pp, fv())
+ aubio_peakpicker_do(self.pp, fv(), self.out)
+ return fvec_read_sample(self.out, 0, 0)
def getval(self):
return aubio_peakpicker_get_adaptive_threshold(self.pp)
def __del__(self):