[vlc-devel] [PATCH 2/3] soxr: instantly change the rate

Thomas Guillem thomas at gllm.fr
Mon May 4 14:47:00 CEST 2020


The core is already taking care of smooth rate change (when the resampler is
used to catch up a delay).
---
 modules/audio_filter/resampler/soxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_filter/resampler/soxr.c b/modules/audio_filter/resampler/soxr.c
index 757edd5d7e4..81590c827f8 100644
--- a/modules/audio_filter/resampler/soxr.c
+++ b/modules/audio_filter/resampler/soxr.c
@@ -317,7 +317,7 @@ Resample( filter_t *p_filter, block_t *p_in )
         if( f_ratio != p_sys->f_fixed_ratio )
         {
             /* using variable resampler */
-            soxr_set_io_ratio( p_sys->vr_soxr, 1 / f_ratio, i_olen );
+            soxr_set_io_ratio( p_sys->vr_soxr, 1 / f_ratio, 0 /* instant change */ );
             soxr = p_sys->vr_soxr;
         }
         else if( f_ratio == 1.0f )
-- 
2.20.1



More information about the vlc-devel mailing list