diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2015-02-12 00:58:40 +0100 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2015-02-12 00:58:40 +0100 |
commit | 2dc49ea866471d9fb90c5f2276c2c40bcf2473ac (patch) | |
tree | 350973e1b78e91a938d9961627b918ea1c76259b /audio/filter | |
parent | 6299da2047a6b7a7eb493480e6c745006d2510e2 (diff) | |
download | mpv-2dc49ea866471d9fb90c5f2276c2c40bcf2473ac.tar.bz2 mpv-2dc49ea866471d9fb90c5f2276c2c40bcf2473ac.tar.xz |
af_rubberband: change defaults
After some testing, I am fairly convinced that these defaults sound
better than the previous settings. This also eliminates some issue
with random crackling and noise.
Also remove the `stretch` option since it has no effect in
realtime mode.
Diffstat (limited to 'audio/filter')
-rw-r--r-- | audio/filter/af_rubberband.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/audio/filter/af_rubberband.c b/audio/filter/af_rubberband.c index 12c400594f..b2080ae59f 100644 --- a/audio/filter/af_rubberband.c +++ b/audio/filter/af_rubberband.c @@ -32,7 +32,7 @@ struct priv { // I could not find a way to do this with the librubberband API. double rubber_delay; // command line options - int opt_stretch, opt_transients, opt_detector, opt_phase, opt_window, + int opt_transients, opt_detector, opt_phase, opt_window, opt_smoothing, opt_formant, opt_pitch, opt_channels; }; @@ -60,9 +60,9 @@ static int control(struct af_instance *af, int cmd, void *arg) if (p->rubber) rubberband_delete(p->rubber); - 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 | + int opts = p->opt_transients | p->opt_detector | p->opt_phase | + p->opt_window | p->opt_smoothing | p->opt_formant | + p->opt_pitch | p-> opt_channels | RubberBandOptionProcessRealTime; p->rubber = rubberband_new(in->rate, in->channels.num, opts, 1.0, 1.0); @@ -187,14 +187,11 @@ const struct af_info af_info_rubberband = { .priv_size = sizeof(struct priv), .priv_defaults = &(const struct priv) { .speed = 1.0, - .opt_stretch = RubberBandOptionStretchPrecise, .opt_pitch = RubberBandOptionPitchHighConsistency, - .opt_smoothing = RubberBandOptionSmoothingOn, + .opt_transients = RubberBandOptionTransientsMixed, + .opt_formant = RubberBandOptionFormantPreserved, }, .options = (const struct m_option[]) { - OPT_CHOICE("stretch", opt_stretch, 0, - ({"elastic", RubberBandOptionStretchElastic}, - {"precise", RubberBandOptionStretchPrecise})), OPT_CHOICE("transients", opt_transients, 0, ({"crisp", RubberBandOptionTransientsCrisp}, {"mixed", RubberBandOptionTransientsMixed}, |