aubiopitch~.c: get samplerate from pd
authorPaul Brossier <piem@piem.org>
Thu, 19 Dec 2013 22:49:15 +0000 (17:49 -0500)
committerPaul Brossier <piem@piem.org>
Thu, 19 Dec 2013 22:49:15 +0000 (17:49 -0500)
aubiopitch~.c

index 27bbb35..0b3ce9a 100644 (file)
@@ -75,9 +75,8 @@ static void *aubiopitch_tilde_new (t_symbol * s)
        x->bufsize   = 2048;
        x->hopsize   = x->bufsize / 2;
 
-       //FIXME: get the real samplerate
   x->o = new_aubio_pitch(s->s_name, x->bufsize,
-      x->hopsize, 44100. );
+      x->hopsize, (uint_t)sys_getsr() );
        aubio_pitch_set_tolerance (x->o, 0.7);
        x->vec = (fvec_t *)new_fvec(x->hopsize);
        x->pitchvec = (fvec_t *)new_fvec(1);