From: Paul Brossier Date: Thu, 29 Sep 2016 12:23:58 +0000 (+0200) Subject: src/effects/timestretch_rubberband.c: invert stretch ratio X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=fb5bd55fc0e5517bf37b12311f7aaa86f2826f18;p=aubio.git src/effects/timestretch_rubberband.c: invert stretch ratio --- diff --git a/src/effects/timestretch_rubberband.c b/src/effects/timestretch_rubberband.c index 2f259dfc..c2f383fc 100644 --- a/src/effects/timestretch_rubberband.c +++ b/src/effects/timestretch_rubberband.c @@ -31,7 +31,7 @@ #include "rubberband/rubberband-c.h" #define MIN_STRETCH_RATIO 0.025 -#define MAX_STRETCH_RATIO 10. +#define MAX_STRETCH_RATIO 40. /** generic time stretching structure */ struct _aubio_timestretch_t @@ -133,7 +133,7 @@ aubio_timestretch_set_stretch (aubio_timestretch_t * p, smpl_t stretch) { if (stretch >= MIN_STRETCH_RATIO && stretch <= MAX_STRETCH_RATIO) { p->stretchratio = stretch; - rubberband_set_time_ratio(p->rb, p->stretchratio); + rubberband_set_time_ratio(p->rb, 1./p->stretchratio); return AUBIO_OK; } else { AUBIO_ERR("timestretch: could not set stretch ratio to %.2f\n", stretch);