path: root/audio
diff options
authorwm4 <wm4@nowhere>2015-11-04 21:31:53 +0100
committerwm4 <wm4@nowhere>2015-11-04 21:49:54 +0100
commit3108a3a0019a7c39c490413aa92ceea9e25a295f (patch)
tree171497f793fb9ed226665ac7a00f26c98d1f9006 /audio
parent8f7cf9443f9336c7ca94301aa302612937c463ca (diff)
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.
Diffstat (limited to 'audio')
1 files changed, 0 insertions, 3 deletions
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