ref: 85755eb4cd902f386421db340d8be2d2b449469f
parent: a0a4d018bf73924b7d3b8231d703a5740fedff9b
author: Paul Brossier <piem@piem.org>
date: Thu Sep 29 10:23:58 EDT 2016
src/effects/timestretch_rubberband.c: invert stretch ratio
--- 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 @@
{
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);