From 89bc2975e951e2a20aa2d02bdb34cc268bb5c5cd Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 2 Mar 2015 19:09:44 +0100 Subject: audio: change playback speed directly in resampler Although the libraries we use for resampling (libavresample and libswresample) do not support changing sampelrate on the fly, this makes it easier to make sure no audio buffers are implicitly dropped. In fact, this commit adds additional code to drain the resampler explicitly. Changing speed twice without feeding audio in-between made it crash with libavresample inc ertain cases (libswresample is fine). This is probably a libavresample bug. Hopefully this will be fixed, and also I attempted to workaround the situation that crashes it. (It seems to point in direction of random memory corruption, though.) --- audio/filter/af.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'audio/filter/af.c') diff --git a/audio/filter/af.c b/audio/filter/af.c index 846ebea3c3..2889e87bb7 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -54,7 +54,6 @@ extern const struct af_info af_info_center; extern const struct af_info af_info_sinesuppress; extern const struct af_info af_info_karaoke; extern const struct af_info af_info_scaletempo; -extern const struct af_info af_info_forcespeed; extern const struct af_info af_info_bs2b; extern const struct af_info af_info_lavfi; extern const struct af_info af_info_convert24; @@ -87,7 +86,6 @@ static const struct af_info *const filter_list[] = { &af_info_center, &af_info_sinesuppress, &af_info_karaoke, - &af_info_forcespeed, &af_info_scaletempo, #if HAVE_LIBBS2B &af_info_bs2b, -- cgit v1.2.3