From 3108a3a0019a7c39c490413aa92ceea9e25a295f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 4 Nov 2015 21:31:53 +0100 Subject: audio: do not require full audio chain reinit for speed changes Actually, it didn't really require that before (most work was avoided), but some bits had to be run anyway. Separate the speed change into a light-weight function, which merely updates already created filters, and a heavy-weight one which messes with filter insertion. This also happens to fix the case where the filters would "forget" the current speed (force resampling, change speed, hit a volume control to force af_volume insertion - it will reset speed and desync). Since we now always run the light-weight function, remove the af_scaletempo verbose message that is printed on speed setting. Other than that, all setters are cheap. --- audio/filter/af_scaletempo.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'audio') diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c index 131dc5d511..4f0eb13091 100644 --- a/audio/filter/af_scaletempo.c +++ b/audio/filter/af_scaletempo.c @@ -286,9 +286,6 @@ static void update_speed(struct af_instance *af, float speed) s->frames_stride_scaled = s->scale * s->frames_stride; s->frames_stride_error = MPMIN(s->frames_stride_error, s->frames_stride_scaled); - - MP_VERBOSE(af, "%.3f speed * %.3f scale_nominal = %.3f\n", - s->speed, s->scale_nominal, s->scale); } // Initialization and runtime control -- cgit v1.2.3