From 1d9134d044193020e5addf95561db10400f63425 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 12 Feb 2015 11:58:35 +0100 Subject: player: use af_scaletempo when slowing down audio too In my opinion the artifacts created by af_scaletempo on extreme slowdown (50% or so) are too bothersome - but users disagree. So use af_scaletempo on any speed changes, not just on speedup. --- DOCS/man/options.rst | 2 +- player/audio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 83bb05cdad..648eabcf4d 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -794,7 +794,7 @@ Audio ----- ``--audio-pitch-correction=`` - If this is enabled (default), playing with a speed higher than normal + If this is enabled (default), playing with a speed different from normal automatically inserts the ``scaletempo`` audio filter. For details, see audio filter section. diff --git a/player/audio.c b/player/audio.c index b63201029f..c4329f07c6 100644 --- a/player/audio.c +++ b/player/audio.c @@ -72,7 +72,7 @@ static int recreate_audio_filters(struct MPContext *mpctx) if (speed != 1.0) { int method = AF_CONTROL_SET_PLAYBACK_SPEED_RESAMPLE; - if (speed > 1.0 && opts->pitch_correction) + if (opts->pitch_correction) method = AF_CONTROL_SET_PLAYBACK_SPEED; if (!af_control_any_rev(afs, method, &speed)) { if (af_remove_by_label(afs, "playback-speed") < 0) -- cgit v1.2.3