]> git.parisson.com Git - timeside.git/commitdiff
Fix #64
authorThomas Fillon <thomas@parisson.com>
Thu, 18 Dec 2014 16:31:18 +0000 (17:31 +0100)
committerThomas Fillon <thomas@parisson.com>
Thu, 18 Dec 2014 16:31:18 +0000 (17:31 +0100)
timeside/analyzer/externals/aubio_pitch.py

index 6e9cdc64c425fbd73b07d97771f14dbd3bebffc6..dc3735e40a0241dc97f05997c1f3a0ceab88db70 100644 (file)
@@ -51,12 +51,6 @@ class AubioPitch(Analyzer):
     @interfacedoc
     def setup(self, channels=None, samplerate=None,
               blocksize=None, totalframes=None):
-        super(AubioPitch, self).setup(channels,
-                                      samplerate,
-                                      blocksize,
-                                      totalframes)
-
-
         # Frame parameters setup
         if self._blocksize_s:
             self.input_blocksize = nextpow2(self._blocksize_s * samplerate)
@@ -68,6 +62,13 @@ class AubioPitch(Analyzer):
         else:
             self.input_stepsize = self.input_blocksize / 2
 
+        # Now that frames size metadata are properly set, we can do the set-up
+        super(AubioPitch, self).setup(channels,
+                                      samplerate,
+                                      blocksize,
+                                      totalframes)
+
+
         # Aubio Pitch set-up
         self.aubio_pitch = pitch(
             "default", self.input_blocksize, self.input_stepsize,