0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

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.
This commit is contained in:
wm4 2015-02-11 21:32:01 +01:00
parent 2522bff565
commit 6299da2047

View File

@ -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,