summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-11 21:32:01 +0100
committerwm4 <wm4@nowhere>2015-02-11 21:32:01 +0100
commit6299da2047a6b7a7eb493480e6c745006d2510e2 (patch)
tree10b89dbccfecdc3dd8420c588ac294e0ea835dbb
parent2522bff5657c7566ac956998bcb32a0c9c3d2667 (diff)
downloadmpv-6299da2047a6b7a7eb493480e6c745006d2510e2.tar.bz2
mpv-6299da2047a6b7a7eb493480e6c745006d2510e2.tar.xz
af_rubberband: fix breakage
The previous commit on this filter accidentally removed the RubberBandOptionProcessRealTime option. Without it, the lib prints a warning and passes the audio through. Also add the RubberBandOptionSmoothingOn option back. Though for some reason the output sounds still very wrong.
-rw-r--r--audio/filter/af_rubberband.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/filter/af_rubberband.c b/audio/filter/af_rubberband.c
index 76dced3990..12c400594f 100644
--- a/audio/filter/af_rubberband.c
+++ b/audio/filter/af_rubberband.c
@@ -62,7 +62,8 @@ static int control(struct af_instance *af, int cmd, void *arg)
int opts = p->opt_stretch | p->opt_transients | p->opt_detector |
p->opt_phase | p->opt_window | p->opt_smoothing |
- p->opt_formant | p->opt_pitch | p-> opt_channels;
+ p->opt_formant | p->opt_pitch | p-> opt_channels |
+ RubberBandOptionProcessRealTime;
p->rubber = rubberband_new(in->rate, in->channels.num, opts, 1.0, 1.0);
if (!p->rubber) {
@@ -188,6 +189,7 @@ const struct af_info af_info_rubberband = {
.speed = 1.0,
.opt_stretch = RubberBandOptionStretchPrecise,
.opt_pitch = RubberBandOptionPitchHighConsistency,
+ .opt_smoothing = RubberBandOptionSmoothingOn,
},
.options = (const struct m_option[]) {
OPT_CHOICE("stretch", opt_stretch, 0,